Forum Moderators: open

Message Too Old, No Replies

onClick return refresh

i want to my main page isn't refresh

         

fenomen

1:50 am on Sep 23, 2005 (gmt 0)

10+ Year Member




i have a code:

<input name=Submit type=submit value=OK onClick=javascript:window.open(easy.php,anket,width=155,height=380,) />

when i clicked OK button, my main page is refreshed and open a popup. but i want to my main page isn't refresh. only a popup window must open.

what's wrong?

Dijkgraaf

2:42 am on Sep 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why are you using a submit button?

Why not use a standard button?

<button onClick="javascript:window.open(easy.php,anket,width=155,height=380,)">Submit</button>

If you do want to use a submit button, then you will need to trap the submit.
<form name="forname" onsubmit="return false">

fenomen

9:55 am on Sep 27, 2005 (gmt 0)

10+ Year Member



but, when i apply it, the form doesn't send form variables.

gsnider

4:21 pm on Sep 27, 2005 (gmt 0)

10+ Year Member



If you want the form values to go to the opened page, you have to change the target in the <form> tag.

<form action="easy.php" method="post" target="_new">
<input name="Submit" type="submit" value="OK">
</form>