PDA

View Full Version : submit button to URL..


tommy916
05-02-2003, 01:32 PM
i forgot the code how to make the serveral submit buttons to go to the specific URL for each button. it has something with the javascript like..
<input type="submit" name="blah" value="Yahoo" onclick="javascript:...http://yahoo.com">

I don't want to use the <form action=url.>.

tommy916
05-02-2003, 05:10 PM
<input class="button" type="submit" value="Yahoo" onclick="javascript:location.href='http://www.yahoo.com'">

i got the code but it doesn't work in netscape. can anyone help me out?

scoutt
05-02-2003, 05:15 PM
I will take a guess as to why it deosn't work in NS. you aren't using the <form> tag huh? yuo have to use a form tag even though you don't have a action in it. NS will not run forms without a form tag, opening and closing.

if you don't want to use one then turn your submit into a button.

<input class="button" type="button" value="Yahoo" onclick="javascript:location.href='http://www.yahoo.com'">