Navigating within the same asp page

Results 1 to 2 of 2

Thread: Navigating within the same asp page

  1. #1
    Join Date
    Dec 1969

    Default Navigating within the same asp page

    (Using Visual Interdev)<BR>I would like a user to be sent to an anchor point on the page when they click an item in a drop down list. This sounds simple but I have been unable to produce the code that does this.

  2. #2
    LeeAnnie Guest

    Default RE: Navigating within the same asp page

    This would require an onChange event that triggers a JavaScript function. I don&#039t have sample code on hand but you could try to find a similar solution at<BR><BR>A solution may look like this though:<BR><BR>&#060;select name="selectBox" style="z-index:0" onchange="goToAnchor(); return false;"&#062;<BR>&#060;option value=""&#062; ------ Select ------<BR>&#060;option value="A"&#062; A<BR>&#060;option value="B"&#062; B<BR>&#060;option value="C"&#062; C<BR>&#060;/select&#062; <BR><BR><BR>Then your function may look something like this:<BR><BR>function goToAnchor() {<BR> if (document.yourForm.selectBox.value == &#039A&#039) {<BR> // go to so-and-so URL<BR> } <BR>}<BR><BR>If you have a lot of values in your select box, you could use a case statement within your function, instead of the if/then statment.<BR><BR>HTH<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts