Hey all,
I am using client side cookies to track if a user has been to my site before or not. In my html head section I call an asp.net subroutine shown below to decide whether my body tag has the onload method or not. If the user has a cookie then the body tag does not have an onload event and if the user does not have a cookie i have an onload event that calls a javascript function to pop-up my registration page also. The problem is that I can't seem to use the correct syntax in the Response.write method to write the javascript because of 2 apostrophie's needed in the syntax shown below. Could anyone show me the correct syntax so I don't recieve a javascript syntax error for first time users?
If IsNothing(Request.Cookies("cookieEmailAddress"
) = True Then
Response.Write("<Body vLink='#0000c0' aLink='#0000c0' link='#0000c0' bgColor='#cccccc' onload='Javascript: window.open(' MS_POSITIONING='GridLayout'>"
Else
Response.Write("<Body vLink='#0000c0' aLink='#0000c0' link='#0000c0' bgColor='#cccccc'>"
End If
See the problem in the onload event with the 2 apostrophies?
Thanks all! Errol Barratt
work: 856-810-5712
home: 856-697-1593
*** If there is a possibility, I'm sure all the smart ones out there will enlighten me 8p
I am using client side cookies to track if a user has been to my site before or not. In my html head section I call an asp.net subroutine shown below to decide whether my body tag has the onload method or not. If the user has a cookie then the body tag does not have an onload event and if the user does not have a cookie i have an onload event that calls a javascript function to pop-up my registration page also. The problem is that I can't seem to use the correct syntax in the Response.write method to write the javascript because of 2 apostrophie's needed in the syntax shown below. Could anyone show me the correct syntax so I don't recieve a javascript syntax error for first time users?
If IsNothing(Request.Cookies("cookieEmailAddress"
Response.Write("<Body vLink='#0000c0' aLink='#0000c0' link='#0000c0' bgColor='#cccccc' onload='Javascript: window.open(' MS_POSITIONING='GridLayout'>"
Else
Response.Write("<Body vLink='#0000c0' aLink='#0000c0' link='#0000c0' bgColor='#cccccc'>"
End If
See the problem in the onload event with the 2 apostrophies?
Thanks all! Errol Barratt
work: 856-810-5712
home: 856-697-1593
*** If there is a possibility, I'm sure all the smart ones out there will enlighten me 8p