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.
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?
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:
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?
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.
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 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....
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.
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:
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.
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?
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?
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,
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?
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?
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?
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?????
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.
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?
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.
I have been using an image instead of a button to submit a form, this works fine within firefox, however when i come to test it in IE6 it doesnt submit the form... If i add a proper button then it works fine, however in keeping with the look and feel of the site it is important that i use an image. the code i have is as follows:
Code: <input type="image" name="Submit" value="Submit" src="images/proceed.gif" alt="Proceed to the next step" width="221" height="29" border="0" /> The form posts back to the same page to do some validation routines, but when it is not an image then as i have said in IE it doesnt work
I have two radio button and one input filed on my form. What I want a do when user change the selection then I want a display the today date into enterdate input filed. Then later I can add this date into database. How can I do that.
i have created 2 .asp pages which, 1. Index page 2. Adding asp function
User will start to add contents in index.asp, then clicked on the "Add" button. the form will post to addContent.asp to add the contents to the database, then prompt the user for Adding contents complete and lastly display the added content to the Index page.
However, when i clicked on the "back" Button at the IE Standard Bar, it display the addContent.asp page and prompt user for the last msg -> "Adding contents Successfully". how can i redirect the page to the previous page before the adding page when the user clicked on the "Back" button at the IE Bar?
The main idea goes like this: I have a textarea, on the right I have a listbox whose elements are loaded from an Oracle Database, I want to have an "Add" Button which when pushed will insert in the textarea the value selected on the listbox between "{ }" (ej, The {white} cat), you can add as many values as you wish and also manually edit the text, and a Submit button which open another ASP page that will check the sintax of the textarea and insert it on the Database. So far I already have the part which checks the sintax and inserts it on the db, and the listbox with the elements you can insert on the textarea, but my boss really wants the "Add-Remove" feature and I need to finish this for Tuesday
I have a search form. It has 2 radio buttons - 'all words' and 'any words'. The 'all words' is checked when the page is loaded. If the user checks the second radio button, then searches, on the results page (the search inputs stay at the top of the page as the form submits to itself), the checked radio button goes back to its checked default of 'all words'. Is there any way of making the checked button stay on the button the user clicked when going to the results page? Hope this makes sense.