Jump to content

form issue


point86

Recommended Posts

Hi,

I am pretty new to javascript and would like some help please!

Basically I have a form which searches through text for a keyword using:

var highlight = document.getElementById('highlightWords').value;

And then new Ajax.Updater ... '&highlight=' + highlight etc.

I need to add another form box that does exactly the same thing, ie searches for a keyword, but for a different keyword than box one.

I know this is pretty simple but like I said, Im new! Anyone any ideas?

Thanks!
Link to comment
Share on other sites

Well I have two form boxes, in each of which a user can enter a keyword. My program then searches a text file for the search term and highlights it. Box 1 I have got working fine, using:

var highlight = document.getElementById('highlightWords').value;

But I dont know how to code the other box so it does the same thing as box 1, but using a different keyword; i.e. the user can select two keywords to use in the search.

Hope this clears things up,

Thanks

Point.
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.