Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5962337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:05:29+00:00 2026-05-22T19:05:29+00:00

I have a code like this. <html> <head> <title>Captcha With Refresh Feature</title> <script src=jquery.js

  • 0

I have a code like this.

<html>
<head>
<title>Captcha With Refresh Feature</title>
<script src="jquery.js" type="text/javascript"></script>
<script type="text/javascript">

function check1(){ 
var search_val=$("#security_code").val(); 
if(search_val == ''){
alert("Please enter code");
return false;
}else{
$.ajax({
type: "POST",
url: "find.php",
data: "search_term="+search_val,
success: function(msg){

 if(msg == 'failure'){
 document.myform.submit();
 }else{
 alert("Please enter correct code");
 return false;
 }
 }
 });
 }
 return false;
}  
}
</script>
</head>
<body onLoad="new_captcha();">
<form action="check.php" method="post" name="myform" id="myform" onSubmit="return     check1()">
<table>
<tr>
<td>&nbsp;</td>
<td><img border="0" id="captcha" src="image.php" alt="">
&nbsp;<a href="JavaScript: new_captcha();"><img border="0" alt="" src="refresh.png"     align="bottom"></a></td></tr>
<tr><td>Name</td><td><input type="text" name="u_name" id="u_name" /></td></tr>
<tr>
<td>Security Code:</td>
<td><input type="text" name="security_code" id="security_code">
 &nbsp;</td><td><input type="submit" name="submit" value="Check"></td>&nbsp;<td><label id="security_code_error"></label><label id="security_code_error1"></label></td></tr>         </table>
</form>
 </body>
</html>

My ajax response will be either success or failure.
I can alert and check my ajax response.
Now, i have problem with form submit.

I am getting this below error:
document.myform.submit is not a function

How to force or make my form submit if the response is success.
Could you help me on this.

Thanks –
Haan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T19:05:30+00:00Added an answer on May 22, 2026 at 7:05 pm

    document.myform.submit is finding the control called “submit” within the form called “myform”. Rename your button and see if the standard submit() function comes back.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a code like this <html> <head>Title <script> function callme() { alert(Hi); document.test.action
Let's say I have some code like this: <html> <head><title>Title</title></head> <body> <?php if (!$someCondition){
So if I have HTML code like this: <HTML> <HEAD> <TITLE>This is a test</TITLE>
Say I have jquery code like this: html += '<div class=index>' + item.index +
I have a web site like this: <html xmlns=http://www.w3.org/1999/xhtml> <head> <title></title> <link rel=stylesheet type=text/css
I have HTML code like this : <div> <a>Link A1</a> <a>Link A2</a> <a>Link A3</a>
I have html code that looks roughly like this: <div id=id1> <div id=id2> <p>some
I have code like this: var newMsg = new Msg { Var1 = var1,
I have code like this: template <typename T, typename U> struct MyStruct { T
I have code like this to move the player in my game left, right,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.