473,698 Members | 2,923 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Linking submit button to new page

3 New Member
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 2348
r035198x
13,262 MVP
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=JavaSc ript><!--
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="retur n validate(this)" >
<P align=center><S TRONG><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.cl icked=true type=button value=Done><BR> <BR>Extension wire has been removed.<INPUT onclick=this.cl icked=true type=button value=Done><BR> <BR>Extra devices hve been removed from the line.<INPUT onclick=this.cl icked=true type=button value=Done><BR> <BR>Microfilter s have been swapped.<INPUT onclick=this.cl icked=true type=button value=Done> <BR><BR><BR><BR ><INPUT type=submit onchange="if (this.disabled) this.selectedIn dex=0" value="Complete d 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 Recognized Expert Moderator MVP
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
sumeetmakkar
3 New Member
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 Recognized Expert Moderator MVP
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
sumeetmakkar
3 New Member
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
2862
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 simple which i am doign wrong. wehn i clcik to the submit button ....its absolutely dead nothing happens!!!!!!!!!!!!!!! why so :-((((((( this is my select.asp script:
15
6572
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 the buttons. The problem is when I post a form to itself, the Enter key will not submit the form, it only clears the contents of the text box. The only way I can submit is to click the submit button. Here is a simplified version of my code that I...
6
3100
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 should be submitted as if the button is pressed. Is this correct? Does this behaviour vary across browsers? Chris
9
1960
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 work. It does however work in a hand coded html or aspx page.
1
1615
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 javascript that does this, but it fails when their is a validator monitoring the text box (in firefox, but that's 10% of my visitors).
0
7186
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 the way. First, deep linking is not something that a completely AJAX web site should be able to do by it's very nature of everything being on one page basically. So how can a person deep link to something that is on one page? This question...
1
1320
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 page and i click countryname then it shows country table and then if i entered i want to go another page for result so my codings are in one form design is in one form.In submit form i am using one image.I gave link in image button but its not...
1
1632
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 details about the registration and then the form fields for the user to fill the registration page. i have used php to validate the form, presently when a user clicks the submit button and
4
5507
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 call a form's submit. I've found how to post programatically, but I need to use the form's target attribute so that the response goes into another frame, and I can't figure out how to do that programatically.
0
8683
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9031
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8902
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7740
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4623
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2339
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.