Refresh Causes Double Submit
If user refreshes the browser window, or if user clicks twice onto the submit button, SQL query is executed twice, the table gets two new rows.I found many possible solutions, but not the complete one - every solution has it's problems.
View Replies
ADVERTISEMENT
I have a series a forms that submit data to different tables in a database. As it stands, when a user completes FORM 1 and clicks the SUBMIT button, the FORM 1 data is submitted (action = form2.asp, method = post) to ASP code at the top of FORM 2 (request.form("form1 field name") etc...), and submitted to the database with SQL code, also at the top of FORM 2(INSERT into...). Hence the submit button on FORM 1 directs the user to FORM 2, and submits the data which is exaclty what I wanted. However, I now need the users to submit multiple sets of data with FORM 1, and direct them to FORM 2 once they have finished using FORM 1. Most importantly, I need to pass a few parameters from FORM 1 to FORM 2, and have these parameters submitted to the database.
My main problem is getting a fresh form1 after submiting the same form1, in preparation for anoter set of data using the same form. Basically, the database has 'one to many' relationship tables. Form1 and form2 are both populating the 'many' tables, so that each form needs to be filled-in several times while retaining the key field of the 'one' table. At the moment submiting form1 takes me to form2. Is is possible to submit the data to the database, get form1 back again to submit more data, as many times as required, then click another button to load form2 when the user is finished with form1?
Can anyone please give me some pointers? or at least explain the concept of what I need to do. I am a novice and it's taking me a while to get to this stage. Any help will be greatly appreciated.
Is it possible to post FORM1 to itself and insert the data (i.e. place the request.form at the top of FORM 1) If so, how do I direct users to FORM 2 while retaining my parameters?
View Replies
View Related
I have a page with 2 frames. The first one has a link that loads a page in the second frame. This page has a button on it. When the button is hit, the page does some processing and loads another page in the same frame (the second).
I use ASP and response.redirect or javascript in the onclick event of the button to do the redirection. When I refresh the page by clicking the button on the browser (IE), the second frame becomes empty. Please note that the src attribute of the frame is not set.
If I set the src attribute of the second frame to some asp page and then navigate to another page inside the same frame, when I refresh the page, the initial asp page is loaded in the frame regardless of the asp page currently loaded into the frame.
It seems that when you refresh the page, the frames are reinitialized no matter what pages are currently loaded in the frames.
I solved the problem by redirecting to the main page in the top frame, passing some parameters and resetting the src of the frame to the desired asp page. Thus, when the page is refreshed, all the frames are properly refreshed too.
View Replies
View Related
I have an ASP site that uses frames two frames. (yes I
should be using include files, but we started ou using
frames so we have been stuck with frames.)
When I get a page expired warning (I am not caching pages)
and a user clicks refresh from the menu bar the user is
taken back to the home page! The home page is a frame with
a top frame that is repeated on each subsequent asp pages
The lower half of the home page is a login screen.
After login the next page is shown in the lower half of
the frame. Refreshing within the individual frames is ok.
But when the Refresh from the menu bar is used the home
page is returned any ideas why?
View Replies
View Related
I am having a problem with an update date query ( there is something wrong with my query both locally and live.
So it has to be the query as my system settings are UK format.
Basically when I go to amend a record without actually doing any changes whatsoever. an click submit, when I see the amend the date switches format, regardless of entering any information.
If I go back and amend the article without doing any changes the date format again is switched back to normal. This is causing big issues, that really need correcting but I cannot figure what I have done wrong. I did previosuly post a message, but this appears to be something diffirent other than local settings. Code:
View Replies
View Related
i'm trying to get a drop down menu to submit automatically when an option is clicked. i've tried various javascripts and they don't seem to work correctly with asp. does anybody know of anything that will work properly?
View Replies
View Related
I am pulling data from a table to create a <select> list. I need to wrap the value= in double quotes. Code:
View Replies
View Related
I have a form online, and I don't know if people are double clicking the submit button or what is happening really, but sometimes I will have two or more matching entries in a row. Is there any code I can use to filter out double clicks or tripple clicks even? These forms are done in asp and sent to sendcontactform.asp to process.
View Replies
View Related
how can I double split this string and pu the values into an array?
string = 2_3, 4_5, 6_8;6_9, 4_6; 3_1
I need the split after "," and ";"
View Replies
View Related
I have an asp page.I have all the form tags, javascripts etc in that. For e.g In my asp page I have mentioned my form tag as
<form name=frmupdateskill method=post>
and javascript as
<script language=javascript>
some code...
</script>
I send this asp page to my onsite person. When he replaces the old asp page with the one I sent the following are the things I come across. Code:
View Replies
View Related
I am using an HTML form to post data to my database, but when a users enter contact info into my database I am getting the same info twice, although the user only submits once. Here is my code:
sSQL = "INSERT INTO Lead_Data (username)" & _
"VALUES ('" & User_Name & "')"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "DSN=", "", ""
objConn.Execute(sSql)
objConn.Close
Set objConn = Nothing
Response.Redirect("addpass.htm")
View Replies
View Related
I'm trying to pass data from a <textarea> box to a confirmation page and then pass the same information from the confirmation page to a final page.
When the information gets passed to the final page it is truncating it where there are double quotes. I've tried to do a replace() function to try and escape the quotes out but it's not working.
confirmation page
Code:
<input type="hidden" name="results" value="<%=results%>" />
final page
Code:
results = request.form("results")
results = replace(results,""","""")
results = replace(results,vbcrlf,"<br />")
View Replies
View Related
What I would like to do is the following: Menu box 1 populates all 50 states from an SQL table. Use selects State. Menu box 2 gets populated from SQL table with Al counties in that State. User selects prefered county then hits submit The part I am having trouble with is populating the county menu box.
View Replies
View Related
I have a active server page where records are displayed from a query. The
display right now is read only. However, with text box this display can also
be edited. The first column shows category while the second category shows
category total sales.
I would like to double click on category field to get
to another asp page that would show the details of sales for that category
value double clicked.
My question is: If there is any double click event that would allow me to
pass values to open another asp page.
View Replies
View Related
I have an order form that dynamically populates item names and item ids from my MS SQL database. These values get put into three arrays that are looped based on the qty selected for insert into a cart table. Everything works except that the values are inserted into the database twice. Here's the insert code:
View Replies
View Related
Got a stubborn problem with double quotes
i can replace two single quotes but how do i replace a quotation mark e.g. (") and not ('')
Replace(rstSimple3.Fields("Description"), "''", " ") works
Replace(rstSimple3.Fields("Description"), """, " ") cuases error!
View Replies
View Related
i want to know how to include double quotes in " "
such as
somevariable=" "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("kb.mdb")" "
note this is example given by me.
i only want to know that
how to include double quotes within double quotes.
View Replies
View Related
I got to place a loop to create a call to javascript with different ID' s generated by asp like in the following code ...
View Replies
View Related
I need to output a string with double qoute ex. "$5.24" using asp and vb script. Greatly appreciate for any assistant.
View Replies
View Related
I am going to use the date as my filename. How can I convert date() ["5/18/04"] to "20040518"? Thanks a thousand.
View Replies
View Related
converting a single
digit (ie: 1, 2, 3, etc) to double digits (ie: 01, 02, 03, etc).
I am trying to convert the date in DD/MM/YYYY format so it is always displayed as 01/01/2004 instead of 1/1/2004.The script I am trying to embed this into has similar attributes to the Calendar on this site located at http://www.asp101.com/samples/calendar.asp.and the objects that require to be double digits are iCurrent and Month(dDate).
View Replies
View Related
I have some data string like ~!@#$%'^&(*("}[;asd"> which contains double quote and greater then sign, first I need to insert this value into database, second this inserted value I have display in a textbox by retriving from database, as it has "> at end of the string values are getting discarded.
View Replies
View Related
If rs("MyString") is Hello "Jim" Lad
<input type=text value="<%=rs("MyString")%>">
prints as <input type=text value=" Hello "Jim" Lad">
How can I get double quotes to display in a text box or textarea? Using a backslash or &Quot; (with Replace() e.g.) just prints out the backslash or &Quot;
View Replies
View Related
Here's an example of using ASP, CDO and a Microsoft Access database to create a double opt in mailing list for subscribers. It lets the user subscribe and then sends them a confirmation email with a random url that has to be clicked to confirm the subscription.
I had a hard time finding a free example so I threw this together for other's searching for something to start their own with.
View Replies
View Related
When you want to put double quotes inside a string, how do you verify that the double quotes are not the end to a string? For example, what if you want to write this. Code:
"Response.Write("The words "DEV SHED FORUMS" are in double quotes")
View Replies
View Related
Here's the line I need to insert into an ASP page.
<script Language="JavaScript" src="/blarg.js"></script></head>
Right now it throws off the asp include with the quotes.
View Replies
View Related
I have created an Intranet in my office using ASP (of course). Within it is a booking system, allowing booking of conference rooms, digital camera and other equipment. It works perfectly...almost, as there is no way to prevent double bookings.
I really don't know where to begin with this one. All bookings go to an Access DB, into a single table. The bookings have a start time and an end time (24hr).
I would like it so that when the user submits the form, if there is a clash in times instead of saying, thanks for your booking, to redirect them back to the booking page saying there is already a booking for this time and that I am very sorry!
I guess I have to check some value in access and return the info back to the webpage before it chooses where to redirect the user.
View Replies
View Related
I've got a form which lets users input HTML code into a database (the user enters their code into a form field, then submits, and the HTML is written to a db). This code is then pulled out of the database onto a web page. It must validate - so needs to have all characters intact.
How do I perform an update statement which lets me insert double quotes into the database? I know it's possible to achieve a similar thing by replacing the double quotes with some other characters on insert, then replacing these other characters with double quotes when the data is pulled out of the db, but this seems a bit messy.
View Replies
View Related
Some basics to check, does this happen on all machines that submit, or only one. If it is only one, then chances are it has to do with mouse settings on that machine (i.e. double click speed type of thing).
Try checking and submitting on another machine. If it only happens on one machine, try changing the mouse settings on the original machine. Try submitting on the original machine. If this doesn't work, then worry about programming around the event.
View Replies
View Related
How can i prevent double sign in with same account?
View Replies
View Related
How should I pass a " (doble-quote) character to response.write() in order for it to be sent to the output ?
View Replies
View Related
Could someone explain when to use double and single quotes? I'm having a problem with an insert statement and I think it may be the quotes. The error I get is a sql syntax error.
Here is the sql statement:
strSQL = "INSERT INTO [Members] (Website, email, category, phone_no, fax) " _
& "VALUES ('" & web & "','" & mail & "','" & cat & "','" & phone & "','" & fax & "')"
The values are variables. I checked the input statements first then assigned to variables. I hoped it would make the sql statement easier for me too read. Also does Access accept null?
View Replies
View Related
IE6 users submit a request to an ASP page which (among other things) sends an e-mail, however, the page appears to be submitted twice since two e-mails are sent.
I have verified that the page is being submitted twice (by IE6 somehow and not through user action) by attaching a time to the content of the sent e-mail. With a single submit at the client end, the server process the page twice and two messages (with slightly different times) are sent.
It would seem that the initial submit initiates the ASP page on the server, then there is a reset at the server end and the submit is reprocessed before the HTML is returned to the client. Code:
View Replies
View Related