point86 Posted November 9, 2006 Share Posted November 9, 2006 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! Quote Link to comment Share on other sites More sharing options...
trq Posted November 9, 2006 Share Posted November 9, 2006 That isn't php. Its javascript. Quote Link to comment Share on other sites More sharing options...
point86 Posted November 9, 2006 Author Share Posted November 9, 2006 Sorry, my mistake- just me getting confused! :)The point still stands.Thanks. Quote Link to comment Share on other sites More sharing options...
fenway Posted November 10, 2006 Share Posted November 10, 2006 I don't understand what your question means... "other than box one"? Quote Link to comment Share on other sites More sharing options...
point86 Posted November 10, 2006 Author Share Posted November 10, 2006 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,ThanksPoint. Quote Link to comment Share on other sites More sharing options...
fenway Posted November 12, 2006 Share Posted November 12, 2006 What's the name of the other text input field (which you call a box)? Just duplicate the code you have for "box one". Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.