How do i calling a javascript in an IF statsment.
Hi
I have this link
Code:
<a id="yesnocancelbuttons" runat="server">Message in modal view.</a>
Thats open a popup box.
My question is, how can i call that id in an If statsment !?
if i have something like this
Code:
if session("activ") = "Y" Then
Do nothing
Elseif session("activ") = "N" Then
CALL THE ID, Javascript and show the popup.
End if
Re: How do i calling a javascript in an IF statsment.
Hello,
Ok, first question...
How exactly is that anchor element calling some JavaScript? Have yo omitted some code?
What I would suggest is that you do this work in the code behind, before it actually gets to the server.
If the Session variable is set, make an anchor element visible on the page. If the session variable is not set, then make a little text element visible on the page, and hide the anchor tag. That way, you are displaying HTML content that actually makes sense. If the link it not clickable, then you used render a link.
Gary