Jump to content

Help with html name anchor


Riparian

Recommended Posts

Is there a way the trigger a html name anchor as a result of a search ?

 

Explanation : A page of names and details with say 50 entries. I would like a quick name search at the top that jumps to a named anchor that I have set up during the while loop.

 

I currently have this working by displaying a hyperlink  after the search has found the name but I have to click the hyperlink... 2 actions for the same process and 3 refreshes of the screen :(

 

Any help is greatly appreciated

 

Thanks heaps

Brian

Link to comment
Share on other sites

I don't quite understand. I hope this helps. Someone simply enters the name of the anchor into the text field and it searches for that anchor and brings you to the name of that anchor.

<script>
function search_anchor(object)
{
_anchor = object.value;
parent.location = '#' +  _anchor;
}
</script>

<input id="search" type="text" name="search" />
<input type="button" value="Search" onClick="search_anchor(search)"/>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.