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! Link to comment https://forums.phpfreaks.com/topic/26708-form-issue/ Share on other sites More sharing options...
trq Posted November 9, 2006 Share Posted November 9, 2006 That isn't php. Its javascript. Link to comment https://forums.phpfreaks.com/topic/26708-form-issue/#findComment-122174 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. Link to comment https://forums.phpfreaks.com/topic/26708-form-issue/#findComment-122175 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"? Link to comment https://forums.phpfreaks.com/topic/26708-form-issue/#findComment-122821 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. Link to comment https://forums.phpfreaks.com/topic/26708-form-issue/#findComment-122916 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". Link to comment https://forums.phpfreaks.com/topic/26708-form-issue/#findComment-123417 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.