473,239 Members | 1,496 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,239 software developers and data experts.

Linking submit button to new page

Hi all,
I am a begineer and working on a project. Facing trouble linking a submit buuton to a page of my choice.Script i am using is:

Expand|Select|Wrap|Line Numbers
  1. <SCRIPT language=JavaScript><!--
  2. function validate(form) {
  3.   for (var i=0; i <form.elements.length; i++) {
  4.     if (form.elements[i].type == 'button') {
  5.       if (!form.elements[i].clicked) {
  6.         alert('Complete the 1st line checks!');
  7.         return false;
  8.       }
  9.     }
  10.   }
  11.   return true;
  12. }
  13. //--></SCRIPT>
  14.  
  15. <FORM onsubmit="return validate(this)">
  16. <P align=center><STRONG><FONT size=3>Error 680-Flashing adsl light</FONT></STRONG></P>
  17. <P> </P>
  18. <P> </P>
  19. <P> </P>
  20. <P> </P>
  21. <P>Modem is connected to master bt socket.<INPUT onclick=this.clicked=true type=button value=Done><BR><BR>Extension wire has been removed.<INPUT onclick=this.clicked=true type=button value=Done><BR><BR>Extra devices hve been removed from the line.<INPUT onclick=this.clicked=true type=button value=Done><BR><BR>Microfilters have been swapped.<INPUT onclick=this.clicked=true type=button value=Done> <BR><BR><BR><BR><INPUT type=submit onchange="if (this.disabled) this.selectedIndex=0" value="Completed the 1st line checks." name=mySel><A onclick="rusure(); return false;" href=""></A></P></FORM>
  22.  



I want to link the submit button with value=" Completed the 1st line checks" to a new page as well or in other words once the user has completed all the checks and then presses the submit button it takes him to a page of my choice.

Can any one help,please?
Aug 30 '07 #1
5 2315
r035198x
13,262 8TB
Hi all,
I am a begineer and working on a project. Facing trouble linking a submit buuton to a page of my choice.Script i am using is:


<SCRIPT language=JavaScript><!--
function validate(form) {
for (var i=0; i <form.elements.length; i++) {
if (form.elements[i].type == 'button') {
if (!form.elements[i].clicked) {
alert('Complete the 1st line checks!');
return false;
}
}
}
return true;
}
//--></SCRIPT>

<FORM onsubmit="return validate(this)">
<P align=center><STRONG><FONT size=3>Error 680-Flashing adsl light</FONT></STRONG></P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P>Modem is connected to master bt socket.<INPUT onclick=this.clicked=true type=button value=Done><BR><BR>Extension wire has been removed.<INPUT onclick=this.clicked=true type=button value=Done><BR><BR>Extra devices hve been removed from the line.<INPUT onclick=this.clicked=true type=button value=Done><BR><BR>Microfilters have been swapped.<INPUT onclick=this.clicked=true type=button value=Done> <BR><BR><BR><BR><INPUT type=submit onchange="if (this.disabled) this.selectedIndex=0" value="Completed the 1st line checks." name=mySel><A onclick="rusure(); return false;" href=""></A></P></FORM>





I want to link the submit button with value=" Completed the 1st line checks" to a new page as well or in other words once the user has completed all the checks and then presses the submit button it takes him to a page of my choice.

Can any one help,please?
Hi and Welcome to TSDN.
Use code tags next time when posting code.
Set the destination path as the action of the form being submitted.

Moved to Javascript forum.
Aug 30 '07 #2
acoder
16,027 Expert Mod 8TB
I want to link the submit button with value=" Completed the 1st line checks" to a new page as well or in other words once the user has completed all the checks and then presses the submit button it takes him to a page of my choice.
You don't even need Javascript for this. Just set the action attribute:
[HTML]<form name="..." action="theURL.php" onsubmit="...">[/HTML]
Aug 31 '07 #3
You don't even need Javascript for this. Just set the action attribute:
[HTML]<form name="..." action="theURL.php" onsubmit="...">[/HTML]



Thankyou so much,
but i didn't get it. Could you reply with the complete script. I am very new to scripts. I dont know what to put in form name="..." and onsubmit="...".
Could you please reply with the complete script.
Aug 31 '07 #4
acoder
16,027 Expert Mod 8TB
Thankyou so much,
but i didn't get it. Could you reply with the complete script. I am very new to scripts. I dont know what to put in form name="..." and onsubmit="...".
Could you please reply with the complete script.
For name, just put any name that you want for your form. I left the onsubmit out because you already had that in your original code.
Aug 31 '07 #5
Thnky you once again.
You are a genious.
Will get back to you if i face any more issues.
Aug 31 '07 #6

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

Similar topics

4
by: janet | last post by:
hey hi... this in in continuation to my other post. i am trying hard and cannot find out whats the problem. i am getting crazy...please asp experts ...do resolve the problem...its something very...
15
by: M Smith | last post by:
I have a form I want to submit to itself. I want to be able to type in a list of numbers and submit the form and have that list show up on the same form under the text box I typed them into and...
6
by: CJM | last post by:
Can somebody clarify if/how/when a simple form is submitted when the <Enter> key is pressed? As I understood it, if you have a form with a single submit button, if enter is pressed, the form...
9
by: Eric George | last post by:
Hi, Has anyone had any success using jscript submit method in their VS.NET projects? For example I have some client processing in a script function then call <form name>.submit(); This won't...
1
by: Joel Barsotti | last post by:
Is there anything builtin to ASP.net that allows you to tie a text box to a button so when you press enter in the text box it emulates clicking a near by button. I've coded up some client side...
0
by: Tarik Monem | last post by:
I have been working on an all AJAX/DOM web site which is set to go live today and I thought I'd share my discoveries with all of you whom have helped me when I have encountered different issues along...
1
by: kavithadevan | last post by:
Hi, I am creating websites in my event search form i am have 2 options(which is in radio button)one is countryname and another one is state name with search field(Its in first table).If i run my...
1
by: Sudhakar | last post by:
i am using a self submitting for using php <form action="<?php echo $_SERVER; ?>" method="POST" id="test2" name="registrationform"> the registration page starts with a lot of terms and other...
4
by: j1dopeman | last post by:
Hi, I'd like to use a button to save and then submit a form. I can set the onlick of the button to mahButton_click or submit, but I can't figure out how to do both. It looks like c# can't...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.