PDA

View Full Version : Need help urgently—form is not getting submitted after clicking the submit button



chandu_kcp
01-23-2007, 07:04 AM
function submit_form()
{
x = '<SPAN class=textChgTemp id="ProcessMessage" style="COLOR: red">Your request is being processed, Please wait..<\/SPAN>';
document.getElementById('showMessage').innerHTML = x;
setTimeout("document.forms.verifyImageForm.submit()",400);


x = '<input type="submit" id="___signon_js2" name="___signon_js2" title="Your request is being processed, Please wait" value="Sign In" class="btn1" alt="Your request is being processed, Please wait" >';
document.getElementById('buttonJS').innerHTML = x;
document.getElementById('___signon_js2').focus();
setTimeout("disable()",775);
}
function disable()
{
document.getElementById('___signon_js2').disabled = true;
}

I have the above peace of Java Script code. when the customer clicks the submit button in the form, I am calling the submit_form(). But when the customer clicks the submit button, it is not getting submitted.

Please help me

jscheuer1
01-23-2007, 10:46 AM
Hard to be sure without seeing the markup but, for one thing, I see you are using innerHTML in a form. Apparent you are replacing the submit button, no less. This is bound to mess things up.

A link to your page would be more helpful in diagnosing this.

Please provide your code -

PLEASE: Include the URL to your problematic webpage that you want help with. (Best)

OR:

Put code tags:




code goes here



around your code (as explained here (http://www.dynamicdrive.com/forums/misc.php?do=bbcode#code)) in a message here so that it appears like so:




code goes here

chandu_kcp
01-23-2007, 11:27 AM
<sample JSP file code>


<script type="text/javascript">
function signin1()
{
x = ' <input type="submit" id="___signon_js" name="___signon_js" title="Sign In" value="Sign In" class="btn1" alt="Sign In" onclick="submit_form(); return false;">';
document.getElementById('buttonJS').innerHTML = x;
}
</script>

<div id="buttonJS"></div>

<script type="text/javascript" language="javascript">
signin1();
</script>

once the form is loaded... the button is created with name "sign -in". my JOB is to change the title of the message to "your request is processing ..PLZ wait".
so in the JS file i have the below peace of code


setTimeout("document.forms.verifyImageForm.submit()",400);
z = ' <input type="submit" id="___signon_js2" name="___signon_js" title="Your request is being processed, Please wait" value="Sign In" class="btn1" alt="Your request is being processed, Please wait" onclick="submit_form(); return false;">';

document.getElementById('___signon_js2').focus();

setTimeout("disable()",375);
}
function disable()
{
document.getElementById('___signon_js2').disabled = true;
}

here the form is not getting submitted in NS,FF browser and it is working in IE.
please help me.. i need to fix it ASAP.