Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp syntax

Status
Not open for further replies.

joyceda59

Technical User
Apr 3, 2007
29
CA
Hi,

This question might stupid, but I am really not able to find the error!

I have these lines of code that I created. I knw that there is a problem with my formating in this line. Therefore, I get an error message on the browser. The problems occur wti hte two lines where I called the SendEmailUtil sub. Here are the lines:

If oRsSub("pdrStatus") = "IBM" Then
temp = temp & "<tr><td align='right'>" & "<input type = 'button' value = 'Send Notification E-mail' onclick = 'Call SendEmailUtil("ITS-IS-PTEM-CTA"','"canavan@ca.ibm.com, rejeanb@ca.ibm.com, jodip@ca.ibm.com"','" &userEmail &"','"& userGroupEmail &"')' />" & "</td></tr>"
End If

If oRsSub("pdrStatus") = "CTA" Then
temp = temp & "<tr><td align='right'>" & "<input type = 'button' value = 'Send Notification E-mail' onclick = ' Call SendEmailUtil("ITS-IS-PTEM-CTA", userEmail, userGroupEmail) ' />" & "</td></tr>"
End If

Please advise..thx!
 
You need to replace all your single quotes with 2 double quotes


' = ""

[monkey][snake] <.
 
I tried that. Im still gettin an erro msg though: the message is: "Expected end of statement"

temp = temp & "<tr><td align=""right"">" & "<input type = ""button"" value = ""Send Notification E-mail"" onclick = "" Call SendEmailUtil("ITS-IS-PTEM-CTA", "&userEmail& ", "&userGroupEmail&") "" />" & "</td></tr>"
End If
 
Your End of Statement error is because your syntax is off and it's not reading the end of your line properly. monksnake was right, but you need to tweak it a little better. Inside of your function call (SendEmailUtil), you will reference the variables you're passing through with single quotes. At least, I'm pretty certain this will work. (I know it can be confusing as I've occasionally had similar issues.) :) Try this:
Code:
temp = temp & "<tr><td align=""right"">" & "<input type = ""button"" value = ""Send Notification E-mail"" onclick = ""Call SendEmailUtil('ITS-IS-PTEM-CTA', '" & userEmail & "', '" & userGroupEmail & "')"" />" & "</td></tr>"


------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
Or you could push triple double quotes, but that tends to be very confusing. Either way, it should work for you...

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
Or, next time I'll see that you already found your answer before I post again... [lol] Glad you found it, anyway...

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
As written, your statement looks like this

Code:
temp = temp & "<tr><td align=""right"">" & "<input type = ""button"" value = ""Send Notification E-mail"" onclick = "" Call SendEmailUtil("

You need triple quotes in one place that it's missing them
(I think):

Code:
temp = temp & "<tr><td align=""right"">" & "<input type = ""button"" value = ""Send Notification E-mail"" onclick = "" Call SendEmailUtil("""ITS-IS-PTEM-CTA""", "&userEmail& ", "&userGroupEmail&") "" />" & "</td></tr>"

[monkey][snake] <.
 
Sorry, I had what I just posted typed up an hour ago, had to take care of something here at work first though.

[monkey][snake] <.
 
See, there goes that whole "work" thing getting in the way of TT again... ;-) Perhaps you should reset your priorities... [lol]

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
True, true Chopstik, I'll be damned if work will get in the way of TT again!!!

[monkey][snake] <.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top