473,403 Members | 2,359 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,403 software developers and data experts.

Auto submit form by javascript...

I want you to help me make a script:

1. Select 1 of 3 radio button in form
2. Write text to a text box in form
3. Auto submit form

Please help me, i'm from vietnam and i don't know english :)
Nov 24 '11 #1

✓ answered by johny10151981

Buddy Omer,

From your name I knew that you are from Pakistan,

But the way you describe your Identity, it seems that you expect people to think about Pakistan as a country of terror.

Anyway,

here is a simple example of verify and submit
Expand|Select|Wrap|Line Numbers
  1. <script>
  2. function verify()
  3. {
  4.  if(document.getElementById("cannotbenull").value=="")
  5.  return false;
  6.  
  7.  return true;
  8. }
  9. </script>
  10. <FORM onsubmit="return verify()">
  11. <input id=cannotbenull>
  12. <submit>
  13. </FORM >
  14.  
  15.  
in the above code, if you put the input box empty, Form wont submit.

6 2300
johny10151981
1,059 1GB
I am not from Vietnam and I don't know English either.

your question does not make any sense. Specially Auto submit, what do you mean by that?
Nov 25 '11 #2
acoder
16,027 Expert Mod 8TB
You can find the answers to these in probably all beginner tutorials.

1. Set the checked property:
Expand|Select|Wrap|Line Numbers
  1. btn[0].checked = true;//first button
2. Set the value of the text box
3. Use the form submit()
Expand|Select|Wrap|Line Numbers
  1. frm.submit();
Nov 25 '11 #3
omerbutt
638 512MB
i am from pakistan and i am not a terrorist :D, but i need to provide some code to elaborate my problem and more helpful for others to provide me with the solution,
regards,
Omer Aslam
Nov 28 '11 #4
johny10151981
1,059 1GB
Buddy Omer,

From your name I knew that you are from Pakistan,

But the way you describe your Identity, it seems that you expect people to think about Pakistan as a country of terror.

Anyway,

here is a simple example of verify and submit
Expand|Select|Wrap|Line Numbers
  1. <script>
  2. function verify()
  3. {
  4.  if(document.getElementById("cannotbenull").value=="")
  5.  return false;
  6.  
  7.  return true;
  8. }
  9. </script>
  10. <FORM onsubmit="return verify()">
  11. <input id=cannotbenull>
  12. <submit>
  13. </FORM >
  14.  
  15.  
in the above code, if you put the input box empty, Form wont submit.
Nov 29 '11 #5
omerbutt
638 512MB
its a movie by the way i reffered to :s , but you wouldnt have known any way was a dissapointment to read this message and being libral all people think that way , read above my post again , i still wrote there that i am NOT a terrorist but you still tried to notify me :D,
anyways be happy , no more comments from my side
regards,
Omer Aslam
Nov 29 '11 #6
@johny10151981
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Thanks for your answer
I have solved my question
Although not understand what you say but Vietnamese very gentle, Preferred peace.
Nov 29 '11 #7

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

Similar topics

4
by: Scott Castillo | last post by:
Does anybody know how to auto-submit a form in PHP without Javascript? For instance, submit form variables to self, validate the data in PHP on same page, then, if no errors, auto-submit the data...
2
by: vishal | last post by:
hello friends i have one php script which generates html page containing form. what i want is submit this form using php script. pls give me some idea that how can i submit form using php...
2
by: Matt | last post by:
The problem is I have 3 buttons that need to submit the form to different URL. My approach is to declare <input type="submit"> rather than <input type="button">. And put the following in the...
8
by: Prometheus Research | last post by:
http://newyork.craigslist.org/eng/34043771.html We need a JavaScript component which will auto-submit a form after a set period has elapsed. The component must display a counter that dynamically...
1
by: Matt | last post by:
The problem is I have 3 buttons that need to submit the form to different URL. My approach is to declare <input type="submit"> rather than <input type="button">. And put the following in the...
6
by: tencip | last post by:
Hi everyone, So, i've got a form that is very simple. It hold three elements: username, password, and domain. The goal here is to have the form submit the login to an administrative section...
5
by: Navillus | last post by:
Hey gang, I have a login form that is empty by default, but can be filled with values from a previous form: <input type=text maxlength="40" size="40" name="user" value="`usr`"> <input...
1
by: sam | last post by:
Hi All, I have a form with 4 checkboxes and 4 text boxes and one submit button. The form should work such a way when I select a particular checkbox and give a url in text box, the form should...
1
by: arggg | last post by:
I created a submit form that calls a javascript:AjAX Command that will call the data and submit it without have the page refresh. This works perfect in Firefox however in IE and Opera when the...
9
by: NitinSawant | last post by:
I have following HTML page created using javascript jquery, This doesn't work when I click on continue button, help <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
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: 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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.