|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
please help in preventing this auto assigning in onClink of an Anchor.
i m using
<% dim high high=0 %> <a href="#1" class="txt_normal_Bold" onClick="<% high=1 %>"> <%if( high=1 ) then%> <a name="1"></a> Internet services <% end if %> problem is that the assignment high=1 on onClick event in the above code automatically executes withought clicking on the link. i want that if this link is clicked only then the associated paragraph should be displayed. please help in preventing this auto assigning in onClink of an Anchor. arif. |
|
#2
|
||||
|
||||
|
I think you're going about this all wrong. With an onclick you should be using Javascript or at least a JavaScript/ASP combination. Onclick is a Javascript action so your onclick call won't work the way it's setup now. Best thing you could do right now is set your onclick to submit a form with the action= the current page and a URL parameter like whatever.asp?high=1 so that you could then do something like:
Code:
<form id="highForm" method="get" action="Request.ServerVariables("SCRIPT_NAME") & ?high=1">
<a href="#1" class="txt_normal_Bold" onClick="form.Submit();">
<%
Dim queryHigh
Set queryHigh = Request.Querystring("high")
If queryHigh = 1 Then%>
Response.Write "<a name="""1"""></a> Internet services"
End if
%>
Big question I have is what exactly are you envisioning happening here? What happens if you click the link? The anchor is not available before you click the link? Please describe more of your philosophy.
__________________
If you found a post of mine helpful, please click on the on my post to add to my reputation.
|
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > please help in preventing this auto assigning in onClink of an Anchor. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|