1 Form 1 Button 2 Actions.
Now I know what your saying check all the posts in relation to using one form for two actions etc, etc. I have done this and am still a little confused.
Using ASP & JS, I have 2 actions:
- The first being to insert a record into a table in a DB
- The second being passing the form data to the next page
Now I'm new at this so I know there is a simple solution. Currently I can perform one action or the other using the one button as the code illustrates below:
//Inserting data into a table
<form method="POST" action="<%=MM_editAction%>" name="form1">
//Sending data to next page
<form method="POST" action="test2.asp" name="form1">
How do i get the same button in the same form to perform both actions?
View Replies
ADVERTISEMENT
I need the form to submit to the database, and send a form to an email specified in the email on submit. I have searched the forums on this subject, and found memnoch's example below (2nd code)
I was wondering if this same code would apply to what I already have done here. (1st code) (I don't use strHTML and other parameters for example) Code:
View Replies
View Related
I'm just starting on ASP and I've found it extremely useful.I have a form page where I'm collecting some information - that information I want to have emailed to me and part of it needs to be directed to a Merchant Accounts providers site for user to complete their purchase.
Email part I can take care of using CDONTS and/or SoftArtisans.SMTPMail.Passing the data to Merchant Account Provider (MAP) I can take care of.Doing both simultaneously is a different issue.I would like to have one submit button that directs some info to the email and some to the MAP.
View Replies
View Related
I'm attempting to achieve a couple of things but I don't know if it's possible. I think the following piece of code will help explain what I'm trying to achieve:
<%
'test whether user checked a particular check box when the user clicks the submit button
If Request.Form("mycheckbox") = "YES"
Then
'I want the forms action to post all form data to THIS_PAGE.HTML
Else
'I want the forms action to post all form data to THAT_PAGE.HTML
end if
%>
View Replies
View Related
Is it possible to do more than one action on form submit without using javascript. What i want to do is still submit my hidden form but also send 2 emails, now i can write the email code easily, and the form works.
View Replies
View Related
I am working on this intranet website which includes access mdb for storing employee ratings. In this website I am using table which consists of username and paswords of the users who can log in. So whenver there is a login. the ASP code checks this table for matching results nd then it lets the user in.
Im using sessions to keep track of user. For viewing the records through the browser, I am not tracking the user But I want to record any actions by the user if he is updating the employee tables . SO I have created a seperate table for User_Actions...this table will record..timedayusernametable nameaction( insert or update or both)So every time the user updates or appends and the transaction is committed , this table would be populated.
View Replies
View Related
if i got two value need to be captured... by pressing buttonA and buttonB
buttonA call back itself... buttonB call another file...
so under <form action= ... >
how should i put it ?
View Replies
View Related
I have an asp page with a form. A user enters a serial number in a text box. I want to add a button next to the text box such as 'Check Serial' to run some SQL in the background to see if that serial exists in the table, and then output 'Serial found' or 'Serial Not Found' next to the text box, so the user can decide whether to continue with the form.
View Replies
View Related
I need a button on my form that opens a new window. I put in a submit button but it always returns to my first page. And then my first page is empty. What button do I need to go to another page (weapon_related)? This is what I use at the moment: Code:
View Replies
View Related
I have a form that comes up pre-filled with database results for the values. I'd like to add a button, though, that will clear all fields to start blank if desired.
A standard "reset" button, will only clear input that has been typed in, but won't clear the initial values. Does anyone have a script already that does this or could someone get me started on how I could do this?
View Replies
View Related
how to prevent submitting a form on the press Enter button before all fields on the form are filled up. People just enter the first field hit Enter and it submits the form and doing validation, of course flushing with the bunch of messages because rest of the fields are empty.
I remember I had some pages where wrote the code to go on the next field when pressed the Enter button (Tab like), because it didn't go anywhere at all. Tested it on a few machines, same result.
View Replies
View Related
What I'm trying to achieve is:
I have a form with two radio buttons, if a visitors check radio button 2 and click submit in the next page radio button 2 to be check by default
If I use this code:
<% If Request.Item("col")="firstcoll" Then Response.Write "Checked"%>
in .aspx page for example like that:
<input type="radio" name="col" value="firstcoll" <% If
Request.Item("col")="firstcoll" Then Response.Write "Checked"%>>
(I have try to omit the code and I have try <%@ but still the same)
it breaking the script and I'm getting error BC30800
I have post it below Code:
View Replies
View Related
I have a problem with my login form. I'm using a piece of graphic as a submit button. The problem is that is seems that i can't submit anything when i'm uisng this solution. If i replace the image submit button with a standard button then there is no problem....
View Replies
View Related
I'm reading data from an XML form and prepopulating a FORM. For the text inputs I have no problem prepopulating the Values from the file...
document.forms[0].elements['FormName'].value=xmlObj.childNodes(0).childNodes(0).firstChild.text;
But one of my fields is based on input from a radio input (three inputs with a value of 1,2,3). Since they all have the same name using the code above will not set they value for any of them. Anybody else run into this, or have a suggested way I should do this.
View Replies
View Related
I have created 2 asp pages called testa.asp and testb.asp
testa.asp has a link to go to next page testb.asp
testb.asp has a form that ask you for a reference number and post it
to the same page testb.asp
If the reference number is not blank, it will just write out what the
reference number is.
Now my problem....
If you go to testa.asp and click on the link to go to testb.asp you
will see the form. At this point, if you click the back button, it
till take you back to testa.asp ALL FINE SO FAR.
If you go to testb.asp again and see the form, enter a number say 33
and click on search. This will now show you the number you have just
entered. NOW - click on the BACK BUTTON, it will just show you exactly
the same page ! WHY does it not go back to the FORM in order to refill
in a different number. Code:
View Replies
View Related
I need to have my ASP form "post" action=? pass to a different confirmation page based on a radio button selection on the form, after submit.
Depending on which radio button they click on, they will receive the same confirmation but then be redirected to a selection specific page, based on the radio button selection. I'm assuming I need to create several different action pages, each with a different redirect, then have the radio button determine which action page the form is directed to based on the radio button selection.
I've tried several different options, such as creating a variable on the form, sDirectionVar, with redirect conditions, but I don't know how to call that on submit? I'm not sure I'm even going in the right direction.
View Replies
View Related
Are there ways to let browser forget about the previous submitted form data?
Or prevent user from pressing F5 to submit the same form again
Or prevent user from presising back on the browser?
View Replies
View Related
I know there really isn't a way to disable the "back button" on the browser BUT ... I'm trying to not allow multiple entries via a form submit when the back button is depressed on the browser.
Basically is there a code snippet that somebody can provide so that when a form is submitted and somebody attempts to go back by hitting the "back" button, that form information just entered won't resubmit into the database?
View Replies
View Related
I would like to know if it is possible to replace the dull-looking "submit" button in a form with my own image of a button?
View Replies
View Related
I want to understand the difference between submit button and regular button: <input type="submit"> and <input type="button">. My understanding is that submit button will send the entire HTML form to the web server, but regular button won't.
I have a problem that needs to pass HTML elements data back and forth in several ASP pages. I am using regular button to do that. But what's the approaches?
View Replies
View Related
i make a data display page, its showing all records, now i want user just press print button, and that print all data on screen, secondly user input 2 dats From ..... To......, so data in between that day will print,
View Replies
View Related
i wonder how to execute vbscript when user presses image .is it possible ... because i don't like the ordinary. Code:
<INPUT TYPE="SUBMIT" VALUE="Submit Information">
View Replies
View Related
<input type=button class="btn" name=edit value="Edit" onclick="self.location='admin_category_subsub.asp?c=<%=trim(server.urlencode(rs("cat_name")))%>&c_id=<%=rs("subsub_cat_id")%>'">
actually this is an example of a button called "Edit",however i am not sure of something.
what does this c=<%=trim(server.urlencode(rs("cat_name")))%>&c_id=<%=rs("subsub_cat_id")%>'"> mean??
and the "cat_name" and "subsub_cat_id" is it from the database table?
View Replies
View Related
i has installed IIS on Win2k Pro to test some horrible .asp stuff. I, er, he also has phptriad installed and rather like Apache as his localhost server from time to time. How can he switch IIS off?
View Replies
View Related
I have a list box that populates from db, and I would like to have a button that selects all items with on click.
View Replies
View Related
I have a submit button - I would like it to submit and then I would go to the next page when the submit button is pressed.
View Replies
View Related
I want to make it so that when the user is looking at a rendered ASP page
and they hit the ENTER key, one of the buttons on the form gets "clicked".
In other words I want for the user to not have to click on the button, and
just hit ENTER instead. How do I specify the button?
View Replies
View Related
I am trying to get a font of a label to change to times new roman when an option button is clicked, i have tried this:
Private Sub optHigh_Click()
lblHeading.FontName=Times New Roman
End Sub
This is wrong but i cant work out how to get the font to change,
View Replies
View Related
Does anyone know how to code a button that when hovered over moves. Then maybe on the 3rd roll over it will not move and actually allow the user to select it?????
View Replies
View Related
<INPUT TYPE="SUBMIT" VALUE="New Message" Style="Width:100px">
How can I change the font type and font size of value="New Message"?
Except create a customized button in photoshop as an image file.
View Replies
View Related
i am having problem with my submit function. When i refresh my page or select an option from the drop down list it is submiting the values into the database where it should submit when i click the submit values. Another problem is tat wad ever values i submit it is appearing with comma at the beginning of the value in the database.
View Replies
View Related
I'm using Frontpage to Design the page and .NET to edit the code behind it.
Is there an easy way, like a button, or some simple syntax to add a button to "browse PC" where when the user clicks on the button it opens up that standard HardDrive browse box and you can select a file?
And question 2, can you do directory reads where you open a directory and then just keep reading through each file in the directory till you get to the end?
View Replies
View Related
I have a question about using a image as a submit button. Basically I have:
<INPUT="image" SRC="c:whateverwhateverutton.jpg" NAME="Login">
Now I have two different buttons in one form. I trying to figure out how to get the page to know what button was pushed, and then do a set of actions. Such as:
If button1 is pushed then
blah
end if
if button2 is pushed then
blah
end if
Thats the basic pseudo code for what Im trying to do. Keep in mind this is a image button.
View Replies
View Related