|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
hi. i am very new to javascript. i have a form with two buttons. they both submit the same form. here is the general gist:
<form method="post" onSubmit="myOpenWindow()"> //some form fields <input type="button" class="button" onClick="this.form.submit()" value="submit form"> <input type="button" class="button" onClick="this.form.submit()" value="see demo"> </form> these do the same thing. just user experience different. and they are supposed to call the function, but appear to just reload the page: function myOpenWindow() { myWindowHandle = window.open('demo.html','Demo','toolbar=0,scrollba rs=0,location=0,statusbar=0,menubar=0,resizable=1, width=750,height=600'); } but it is not working. can anyone suggest a better solution? or tell me why it is not working? i know very little about javascript. |
|
#2
|
|||
|
|||
|
Quote:
Hi, Can u tell me what myOpenWindow() is doing in the script.. U need to call that function on a user Event right? Where did u called that ...please change your code to function myOpenWindow() { window.open('demo.html','Demo','toolbar=0,scrollba rs=0,location=0,statusbar=0,menubar=0,resizable=1, width=750,height=600'); document.forms[0].submit(); } and in Form <form method="post"> //some form fields <input type="button" class="button" onClick="myOpenWindow()" value="see demo"> </form> it will work ...Plz revert back to forum for any changes.. thanx |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > newbie form question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|