Forum Moderators: open

Message Too Old, No Replies

disabling submit button

         

mschultem

9:57 am on Mar 27, 2007 (gmt 0)

10+ Year Member



hi,
i have got the following working code which basically redirects onto a new page in a larger, empty window.


function startExp()
{
pagename = "http://LINK";
var newWind=window.open(pagename,"survey","height="+(screen.availHeight-60).toString()+",width="+(screen.availWidth-30).toString() +",scrollbars,status,resizable, left=2, top=2")
}

after pressing the submit button that triggers the above function:

<input type="button" name="Button" value="Start Survey" onClick="startExp()">

i would like to disable the submit button (that another start of the survey is not possible) ...
can anybody give me an idea of how to do that?

thanks a lot

m

daveVk

10:09 am on Mar 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



function startExp(but)
{
but.disabled=true;
pagename = "http://LINK";
var newWind=window.open(pagename,"survey","height="+(screen.availHeight-60).toString()+",width="+(screen.availWidth-30).toString() +",scrollbars,status,resizable, left=2, top=2")
}

after pressing the submit button that triggers the above function:

<input type="button" name="Button" value="Start Survey" onClick="startExp(this)">

mschultem

12:29 pm on Mar 27, 2007 (gmt 0)

10+ Year Member



thanks - that works!
m