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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calling an email function for the onclick attribute

Status
Not open for further replies.

joyceda59

Technical User
Apr 3, 2007
29
CA
Hi

i created this button that will call an email function when it is clicked. This email function is already written on a different page. This function basically takes the email text( mail to, mail from, cc, bcc, subject, body, text) as parameters. The problem is that when i click the button, nothing being sent. I think there is something wrong with my syntax, but not sure what is the problem. Please help!

'Send e-mail to appropriate emails based on the pdr status


'Send Notification E-mail
If oRsSub("pdrStatus") = "CTA" Then

temp = temp & "<tr><td>&nbsp;</td><td align=""left"">" & "<input type ='button' value = 'Send Notification E-mail' onclick = 'SendEmailUtil('sriram.sampath@td.com', 'sriram.sampath@td.com', 'sriram.sampath@td.com ', 'sriram.sampath@td.com ', 'test', 'this is a test', 'YES' ); "" />" & "</td></tr>"

End If
 
What if you tried this?

temp = temp & "<tr><td>&nbsp;</td><td align=""left"">" & _
"<input type =""button"" value =""Send Notification E-mail"" " & _
"onclick=""SendEmailUtil('sriram.sampath@td.com', 'sriram.sampath@td.com'," & _
" 'sriram.sampath@td.com ', 'sriram.sampath@td.com ', 'test', 'this is a test', 'YES' )"" /></td></tr>"

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
No sry it does not work. Thx though. I actually figured out how to send the email. Basically what i did was capture the button click and <b>then</b> called the function. Now it works fine. Thx! :)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top