I know very little about Javascript. So I was taking some of the javascript code from snitz and was playing with how the functions work. I have one piece of information that I can not figure out. I know someone here can help
I want to pass an argument to the function. So my test page calls the function this way:
response.write "<p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><a href=""javascript:email_all(" & strTopic & ")"">Click here to send email to the list of attendees.</a></font></p>" & vbNewLine
Now I am trying to pass the value of the strTopic to the function. I have tried several different variations but here is my last one (Does not work of course)
Response.Write " <script language=""JavaScript"" type=""text/javascript"">" & vbNewLine & _
" function email_all(strTP){" & vbNewLine & _
" var where_to= confirm(""Do you really want to Send email to all Attendees?"");" & vbNewLine & _
" if (where_to== true) {" & vbNewLine & _
" window.location=""eventlist.asp?email="" & strTP & vbNewLine & _
" }" & vbNewLine & _
" }" & vbNewLine & _
" //-->" & vbNewLine & _
" </script>" & vbNewLine
so the resulting link should be:
eventlist.asp?email=3
of course the 3 would be whatever the variable is.
Any help?
Thanks