473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

I have a problem submitting a form using javascript

108 100+
I have just started javascript and I want to submit a form usaing javasript.I came up with the following codes but I cannot see what mistake i've committed..

Expand|Select|Wrap|Line Numbers
  1. <html>
  2.     <head>
  3.  
  4.         <script type="text/javascript">
  5.             function submitfrm(){     
  6.                 document.updmem.submit();     alert("Injsa");      
  7.                 }
  8.         </script>
  9.     </head>
  10.     <body>
  11.                                 <form name="updmem" action="updatemember.php" method="get"><table border=0>
  12.                     <tr><th>Id</th><th>firstname</th><th>lastname</th><th>email</th><th>Username</th><th>Password</th><th>Homenum</th><th>mob num</th><th>Address</th><th>Address2</th><th></th><th></th></tr>
  13.  
  14.                     <tr>
  15.                     <td><input type=' text' name='updid' value=M0003 readonly ></td>
  16.                     <td><input type=' text' name='updfname' value=Say></td>
  17.                     <td><input type=' text'  name='updlname' value=Badea ></td>
  18.                     <td><input type=' text'  name='updemail' value=user@example.org></td>
  19.                     <td><input type=' text'  name='updusr' value=s readonly></td>
  20.                     <td><input type=' text'  name='updpass' value=sanj readonly></td>
  21.                     <td><input type=' text'  name='updhome' value=2613678 ></td>
  22.                     <td><input type=' text'  name='updmob' value=7451222></td>
  23.  
  24.                     <td><input type=' text'  name='updaddr1' value=morcellemnt ></td>
  25.                     <td><input type=' text'  name='updaddr2' value=NULL></td>
  26.                     <td><input type='submit'  name='submit' value='Update' ><img src="" alt="sdffds" onclick="submitfrm()"></td>
  27.                     </tr>
  28.  
  29.                     <tr>
  30.                         <td></td><td><div id="errfname"></div></td><td><div id="errlname"></div></td><td><div id="erremail"></div></td><td></td><td></td><td><div id="errhomenum"></div></td><td><div id="errmobnum"></div></td><td><div id="erraddr1">gjh</div></td><td><div id="erraddr2">dsdfs</div></td>
  31.                     </tr>
  32.  
  33.         </table></form>
  34.         <br>
  35.         <br><img src="" alt="Submit" onclick="submitfrm()">
  36.     </body>
  37. </html>
Plzzz help
Feb 11 '10 #1
1 1706
document.updmem.submit(); should be document.forms.updmem.submit();
Feb 11 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Display Name | last post by:
the customer I'm developing a site for uses a canned form-parsing page that allows her to have an email subscription opt-in page add emails to a list she can manage using a link that you point your...
2
by: Greg T | last post by:
Hi, I have a rather long form that I don't want people submitting unless they are absolutely sure they are ready. I figured the easiest way to prevent an accidental form submission by way of...
5
by: Don | last post by:
I have a need to submit a form, but don't need the user to click on a button. How do I do this? Is there some way, using JavaScript, to setup a <form> tag to do this? Thanks, Don ----==...
4
by: Rick | last post by:
Hello, I'm having trouble with submitting my form when checking to see if data is present in the user-inputted fields. What I want to happen is for the user to input various pieces of data,...
1
by: Hello | last post by:
Scenario: A page creates a pop up and that pop up submits a form. Is there a way to detect whether the submitting was successful or not, so true/false could be passed to the parent window?
16
by: browntown | last post by:
so I have this application I'm nearly finished with. The only thing the client has requested is the ability to submit the form by pressing "enter". I didn't think this would be a huge pain in the...
18
by: Axel Dahmen | last post by:
Hi, trying to submit an ASPX form using the key (using IE6) the page is not submitted in my web project. Trying to debug the pages' JavaScript code I noticed that there's some ASP.NET client...
18
by: NavinM | last post by:
I have a couple of forms that are misbehaving in FireFox, but work fine in IE. when i do submit( with submit button) a javascript function validates all of the fields entered, and stops the...
1
by: philguenet | last post by:
I have left my Web site out at my provider for a long while. Yesterday I tried changing quite a few things on it but it all ended in tears. None of the form submit button submit anymore. I am...
2
by: vikasbatra | last post by:
i m submitting (posting) a form to some external site url . By clicking on submit it opens up new window (target='_blank' set) and my form is submitted there. but if i tries to submit a form using...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.