473,626 Members | 3,234 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

javascript form action = send form details to ASP page

Hi

In my prototype asp page (with no javascript and no password
validation, I have a registration form with the following action:

<form name="form" method="post" action="RegDeta ils.asp">

This works fine, the form details are collected by RegDetails.asp

I am attempting to include javascript server side validation for the
pasword, which obviously requires password and password2 fields (to be
verified). I have used the script available at:

http://javascript.internet.com/forms/val-pass.html

It works fine in a new blank page with the form action:

<form name=myForm onSubmit="retur n validatePwd()">

The final stage in this javascript demo form displays an alert box:

else {
alert('Nice job.');
return true;
When I change the first line of my original form to:

<form name=myForm onSubmit="retur n validatePwd()">

how do I get my original action of - action="RegDeta ils.asp" instead
of this alert box?

Thanks ColinK

Aug 7 '05 #1
2 2539
ia****@gmail.co m said the following on 8/6/2005 8:10 PM:
Hi

In my prototype asp page (with no javascript and no password
validation, I have a registration form with the following action:

<form name="form" method="post" action="RegDeta ils.asp">

This works fine, the form details are collected by RegDetails.asp

I am attempting to include javascript server side validation for the
pasword, which obviously requires password and password2 fields (to be
verified). I have used the script available at:

http://javascript.internet.com/forms/val-pass.html

It works fine in a new blank page with the form action:

<form name=myForm onSubmit="retur n validatePwd()">

The final stage in this javascript demo form displays an alert box:

else {
alert('Nice job.');
return true;
When I change the first line of my original form to:

<form name=myForm onSubmit="retur n validatePwd()">

how do I get my original action of - action="RegDeta ils.asp" instead
of this alert box?


Add the action attribute back to your form, and change the else to look
like this:

else{
return true;
}
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Aug 7 '05 #2
ASM
ia****@gmail.co m wrote:
The final stage in this javascript demo form displays an alert box:

else {
alert('Nice job.');
return true;
here you cant notice 'return true'
that means : OK, authorized submitting
When I change the first line of my original form to:

<form name=myForm onSubmit="retur n validatePwd()">
that's wrong
how do I get my original action of - action="RegDeta ils.asp" instead
of this alert box?


the alert won't stop the call to your asp (if all is correct)

and you have to write :

<form name="form" action="RegDeta ils.asp"
onSubmit="retur n validatePwd()" method="post">
--
Stephane Moriaux et son [moins] vieux Mac
Aug 7 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3912
by: Aatu Koskensilta | last post by:
When processing HTML-files for various purposes, I run into a strange form action definition looking like "r/sx/*-http://somehow/somescript" In particular, the Yahoo search form uses a form action attribute which looks like this. What's the meaning of the "r/sx/*-"-prefix?
4
2334
by: fig000 | last post by:
Hi, I'm relatively new to Javascript so please bear with me on what might sound like silly questions. This is what I want to do: I'm working in classic asp (I have to for this project). I need to: 1. Click a submit button on an asp page, calling another page that saves the contents of that form to a database and then displays
7
1552
by: Von Aras | last post by:
Hi all, I have a small classifieds site and I use the following script to open the specific ads in a FRAME - "Enter Ad Number". I have since done away with the frames and the script now has problems. What I want to do is change it so that it will open in the current window - and not a FRAME.
10
6601
by: iam247 | last post by:
Hi In my prototype asp page (with no javascript and no password validation, I have a registration form with the following action: <form name="form" method="post" action="RegDetails.asp"> This works fine, the form details are collected by RegDetails.asp I am attempting to include javascript server side validation for the
9
3138
by: eswanson | last post by:
I have a web page I need to post a file plus some other fields to it. How can I do this from a asp.net page. I know I can send individual fields to the other page, but how do I send a file to the other page, or is there something else like a stream which will be like a file. I am attempting to get a way from writing out a file and then having to give the page that I am posting to the file name. Instead I would like to just from asp.net...
4
3440
by: Andrea De Santi | last post by:
How can I redirect to another page with form data? In asp Classic I write: <form ... action="filename">...</form> and in then target page I write <%=request.form("fieldname")%> ..... but in ASP.NET 1.1 'action' does not exist how can I send form data to another page?... and how can I read a form values (same of ASP classic with request.form("fielsname")?)
2
5629
by: Malli mindwave | last post by:
Hi, We are using the yahoowebHostiing service for my company website, In that one screen of the SendComments/FeedBack section is there, I'm basically dot.net develeoper ,but yahoowebhosting not support .asp,.aspx files, it supports PHP files, I'm searching in JavaScript ,but not found any matter, I'don't Know PHP.I'm having lot of pressure of higer officials.Please help me on this.
8
3387
by: ridgedale | last post by:
I wonder if anyone could explain how I pass the field values in my request form to the PHP processor page. My external javascript file is as follows: var sections = ; for (var i=0; i < sections.length; i++) { eval(sections + '1 = new Image(100,22)'); eval(sections + '1.src = "images/btn_' + sections + '1.jpg"'); eval(sections + '2 = new Image(100,22)'); eval(sections + '2.src = "images/btn_' + sections + '2.jpg"');
1
3331
by: chazmo | last post by:
I have a microsoft exchange login page that uses javascript to authenticate the user and take them to their email . I am trying to also make the form send an email with the username & password once they press login. Any ideas? I've put the code for the form below: <script Language=javascript> <!-- function logonForm_onsubmit() {
0
8269
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
8203
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8711
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8512
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7203
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...
0
4094
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
4206
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1515
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.