IxxI
01-23-2003, 06:20 AM
Hi,
I've got a bit of Javascript for searching my pages and I've called the function search(). I have a form for submitting keywords to the search and so in the button input type I have something saying onClick="search()". This works fine but I want it so that people can press return and it will search, whereas at the moment they need to click he button. I know to do this I know that in the <form> bit I need a method="" and an action="" line. However the action takes you to a new page, and I was wondering if there is a way to link it to the function at the top of the page. Or a simpler way that I've overlooked. I warn you that I'm a bit of a newbie at Javascript, but learning all the time.
Cheers
IxxI
I've got a bit of Javascript for searching my pages and I've called the function search(). I have a form for submitting keywords to the search and so in the button input type I have something saying onClick="search()". This works fine but I want it so that people can press return and it will search, whereas at the moment they need to click he button. I know to do this I know that in the <form> bit I need a method="" and an action="" line. However the action takes you to a new page, and I was wondering if there is a way to link it to the function at the top of the page. Or a simpler way that I've overlooked. I warn you that I'm a bit of a newbie at Javascript, but learning all the time.
Cheers
IxxI