Jump to content
xisto Community
Sign in to follow this  
Compute

Link In Search Form Open a link inside a text area...

Recommended Posts

i added a javascript search to my site
Search

basically i wanted to have links on there so that when u click the link it runs the search. instead of making ppl type it into the textarea and clicking go.

or have it so when u click the link it enters text into the text area and then searchs...

anyone know what im chatting about? ~thanks

Notice from mayank:
Please make sure that Topic title has to be descriptive.

Edited by mayank (see edit history)

Share this post


Link to post
Share on other sites

let us say your java script function is called myfunction().

Then in your link (a tag) instead of href, specify onclick attribute.

Ex:

<A href="" onclick="javascript:myfunction()">link text</a>

Share this post


Link to post
Share on other sites

or have it so when u click the link it enters text into the text area and then searchs...

If you're talking about the input/textarea dynamically autocompleting as people type a few letters, then you need to look into AJAX.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.