 |
|
|
hi, this was an excellent article on multiple actions on a single form. i used it. it worked ok, but no data was sent with it. when i got to the new page, and used request.form("field_name") not data was found. what can i do to send the data with this method? thanks.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
Hi, Coding is not my specialty so I am struggling with getting this to work. Basically, I need to have a simple form with a textarea and a submit button.
A user should input a number, if the number is 7 digits in length, it should go to one site, if less than 7 digits it should go to another website.
My code is: <html> <head> <script type="text/javascript"> function validate() { var accNo=document.getElementById("accNo").value submitOK="true"
if (accNo.length>7) { alert("The account number you entered is not valid. Please try again.") submitOK="false" }
<-- if (accNo.length==7)
( Set value to load page 1 ) Else Set value to load page 2
-->
if (submitOK=="false") { return false }
} </script> </head> <body> <form action="http://www.google.com.au" önsubmit="return validate()"> Account Number: <input type="text" id="accNo" size="20">
<input type="submit" value="Submit"> </form>
</body> </html>
Can anyone help me out? Any help would be greatly appreciated as I am going insane trying to do this - coding isnt my forte! (qesaf@hotmail.com) Cheers.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi !! A question: About this form, it is not possible to better it using only one single function for the two buttons, creating function called, for example, Onbutton ???
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Thanks, Chris, for spending that 1/2 day of messing around, and sharing the results so I didn't have to spend the same 1/2 day. You solved my problem in 5 minutes.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I'm trying to do this using an ASP requestor page that has dynamically filled dropdown info that I want to pass in the form. I keep getting "document.form1 is null or not an object" error. Obviously I am a newbie at this, but sure could use some help.
-- modified at 16:29 Thursday 1st June, 2006
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi I'm trying to do something related, but not quite the same Basically I have two sites that I want to log into, using one login form. The form needs a hidden input, but the value of that needs to be different for each site Also, the names of the inputs need to be different. For example in pseudo code
(hidden input Entity=1234) Login (name=loginname value="") Password (name=mypassword value="")
(INPUT type="button" value="Button1" name=button1 onclick="return OnButton1();") (INPUT type="button" value="Button2" name=button2 onclick="return OnButton2();")
onbutton1 Superloginname=loginname pswrd=mypassword
onbutton 2 lgntowebsite=loginname passcode=mypassword Entity=5678
Make any sense? Any ideas?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Now that I've thought this over a bit more, what I really need is to be able to input some values to generic named variables, then depending which buttons are pushed, assign SOME of those variable values to specifically named variables, and use those to post to a url. So basically say in the inputs are: name, password onbutton1 -> myname=name, pswrd=password, entity=1234 onbutton2 -> login=name, pass=password
so i wouldn't send the entity value to the 2nd url, just the 1st.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
This script is just what I need, but I dont understand .asp. I need the page 1 and 2 .asp scripts in javascript. Can anyone help? Thanks trixy.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi when i use a form along with post attribute.How will i retrieve the data send at the page specified in the action attribute??
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
I found your posts concerning this problem, and I have a question. I'm working on a site in which a page exists for requesting a brochure (with php for sending the data via e-mail and entering some info into a database). When clicking on the submit button, the client is taken to a thank you page. I've added two new buttons for people who wish to open a pdf and print the brochure themselves (at the bottom left of the URL below). We'd like to send the form data with these two new buttons, which also triggers the opening of the thank you page; and open the pdf in a new window. As of right now, the previous buttons still work fine (at the bottom right of the URL below), but the new input buttons I've implemented using Chris' code only open the pdf into a new window, and the thank you page does not load.
Can anyone help with ideas?
Here is the URL. It's in French, but that shouldn't matter to understand the code. http://www.businesstalkfrance.com/site/fr/brochure_frTest.php
TIA, Keith (keith@keithsarver.com)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
i've found one problem with Chris' code, if you have say a hidden field in your form named *action*, you'll get an error saying *object does not support this property or method*
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Dear, I want to know , how to send one message to many message boards, like "message board submitter". How the form action is created? please few examples of web sites. (or) How "one form" is used to post "multi message boards" ?
tgopala_krishna
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I know others have been asking the same thing... but i'm still confused on what to do.
I have 1 form in which i need to send credit card information to the merchant account via calling an asp script. But than i also need to send the form to a mail recipient using the form action as follows: http://www.onr.com/cgi-bin/formmail.cgi
Both are pretty simple to execute individually... but how can i do both with one submit button...
Please give it to me Barney style, as i'm not really good with coding yet... any help/suggestions/tips, is appreciated. Thanks in advance.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
I have a form in my asp page. Now when the form is submited i want to show the error messages on the client side in the page (eg inside a table)
Please tell me how will this be possible
I will be thankful if u refer some example link to me
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Can we do two actions with one button? I can make my form do an insert record into the database and I can also get it to send an e-mail. How do I get it to do both with one submit button. My users would be confused by two buttons.
Thanks. Judi
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
You can make one button open 2 windows - or open 1 window in a submit handler and then continue on with the submission. See window.open
cheers, Chris Maunder
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I tried to use this code , but it did not work.
<form name="form1" method="post" action="save.php" önSubmit="mailto:nie.then@mailcity.com?subject=test">
...
</form>
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
Hi there Chris, I just joined the code project. Any chance you can give us an example of having two actions and one button. I'm having trouble understanding how to use "window.open" Thank you for your time.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I was looking for a way to post from one frame to another. I ended up using javascript to construct a long get and set the frame src, but this looks like a better method I'm sure I can just replace target with the name of the other frame.
Thanks Buddy and Merry Chirstmas!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
i want a form to have two actions, but simultaneously, rather than a button for each. i.e., i have two different cgi prog's i want called when i hit submit, is this possible? any help at all i'd be really grateful - dan
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Easy: onclick="return (Action1() && Action2());" or onclick="Action1(); Action2();" if you're not interested in the return values.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi - I wonder if you can help me. I have a similar dilemma to this. From Page1.asp which has data from the database I need to forward that info to 2 locations.
First it needs to go to another server which provides a mailform facility as follows:
action="http://www.mysite/cgi-bin/mailform.pl"> <input type="hidden" name="recipient" value="me@ntlworld.com">
Second I need to remain on, or come back to, the original server and send some of the data to another .asp page.
i.e. action="page2.asp"
Thanks
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I am stuck off at a place. I need to call the same page as the i change a value in the combobox-one action. And then after getting all the values, I need to take all these values to the next page-second action. How do I do this in one page.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |