HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 18th, 2004, 06:58 AM
arif_1947 arif_1947 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 4 arif_1947 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old July 20th, 2004, 08:54 AM
shamrog12's Avatar
shamrog12 shamrog12 is offline
Newton's Apple Wizard
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 1,661 shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Weeks 2 Days 2 h 39 m 22 sec
Reputation Power: 34
Send a message via AIM to shamrog12
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.


Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > please help in preventing this auto assigning in onClink of an Anchor.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway