Error Trapping The Dreaded Refresh

My problem basically is as follows:

1) User enters their details to create a new account in my db.

2) They press the submit, the system successfully creates their new account
and then displays a page saying 'well done you've created your new account'.

3) The doofus (or clever clogs) clicks the Refresh button, which in turn
submits the details back to the db and creates a duplicate entry in my db.
I don't have a duplicate account num, as the system takes the max last one
and adds one to it so really no errors are generated, but it does mean that
they have 2 accounts now.

As mentioned above, this scenario crops up when doing a New Account page and
when they've just posted their order via the shopping cart final page (shall
we say). The latter worries me because duplicate orders would cause a lot
more hassle.

View Replies


ADVERTISEMENT

Dreaded Syntax Error

For some reason my page is giving me the dreaded syntax error.
Can anyone see what is wrong? It's probably something simple...it always is.Code:

sql_insert2 = "insert into users (PayrollNo, Firstname, Lastname, Password) values ('" & Payroll & "', '" & Firstname & "', '" & Lastname & "', '" & Password & "')"
Con.Execute (sql_insert2)

View Replies View Related

Error Trapping

Need help with some basic error trapping. This code traps the error and successfully redirects to the error handling page.

If Err.Number <> 0 Then
Response.Redirect("../main/ErrorHandler.asp?error=noconnection")
End If
On Error GoTo 0

I meant to use this code to send myself an email with error details but it is not working. I get my nicely formatted email but instead of error values there is nothing. Why would all Err. be empty?

I suspect that the problem is with the error occuring on one page but actual handling of the error is meant to be on some other page but I am not sure here. Code:

View Replies View Related

Trapping A Certain XML Error

I'm using the MSXML2.ServerXMLHTTP object.

I am pulling documents (PDF, to be exact) from a remote server, and it all seems to work fine. However, I cannot control that particular database in which the documents are stored.

Currently, the DB where the documents are stored is down, and when I use the object above, naturally, I get the 500 error(my error log states that it's a timeout). How can I write a custom error message to display in a browser, instead of the usual HTTP 500 Internal server error page?

The code I have is below ...

View Replies View Related

Error Trapping

i want to perform error trapping on the connection to a server,so if the SQL server is inaccessible the site does not crash.I'm using javascript and hoped the try.catch might work.this is want I've tried in an existing piece of ASP script:

%>
try
{ "<%strTRSConnect.Open App_TRSConnectionString%>";}
catch(e)
{ alert("Error occurred ::::" + e.description) }
<%

where App_TRSConnectionString is declared elsewhere. It still attempts to connect and because i'm testing with an inappropriate connection string the page crashes.

View Replies View Related

Not Trapping Error IE7

how to get IE to report the line number of the error in the source file, when an error occurs? at the moment it just gives me the error number '500'.

View Replies View Related

Error Trapping Question

i need the best way to catch any error on a specific page.

i have a page that connects to a database on an AS/400 and there is a possibility that a certain condition might exist on the 400 that causes my page to bomb. i have no real way of specifically testing for this condition (not easily anyway) so i just want to write out a general error message if ANY error occurs on the page since it will be very rare.

View Replies View Related

Global Error Trapping

Is it possible with "classic" ASP to set up a process where anytime someone encounters a server-side error, it will e-mail the error message to me? I know I've done this with .NET, just can't remember exactly how.

View Replies View Related

Trapping Odbc Error

I have a data-driven website that allows users to enter records for sales leads. It all works perfectly. The only thing I want to do right now is prohibit users from entering the same lead twice.

I have a PK field in the MS Access database that, obviously, disallows duplicate records. However, when such an attempt is made, the browser
redirects to some generic ODBC error page with some cryptic numbers and other information that will stymie the users. "It doesn't work", they will say. The text of that error indicates that they tried to add a record that violates the PK rule of disallowing duplicate records. But they probably won't read it and it's truly ugly anyway.

How can I redirect to a custom error page or trap the error before the ODBC error page is displayed and just display a msgbox or something telling the user they attempted to add a record that already exists?

View Replies View Related

Error Trapping While Sending Email

I have a mail script but don't know how to catch any errors so that it will display email address that failed to send. Here is my code...

Dim mail
Set mail = Server.CreateObject("CDO.Message")
mail.From = "from@mail.com"
mail.Bcc = "bcc@mail.com, bcc2@mail.com"
mail.To = "to@mail.com"
mail.Subject = "This is the subject of the email"
mail.HTMLBody = "I am the message that will be displayed in the body"
mail.Send()
Set mail = Nothing

How can I display a message that says that there's an error with sending the mail?

View Replies View Related

Trapping A Crystal Report Error.

how to trap the error if the cause is the concurrent user. from iis server my 500-100.asp page is coded to trap errors that came from crytal report. below is the code that has been used.

if instr(lcase(objASPError.file), "rdcrptserver11.asp") <= 0 then
SendEmailNotification objAspError
end if

this piece of codes means if theres a error from rdcrptserver11.asp it would send a notification to me right? what if i dont want to get email notification if ther error is exceeding the concurrent user. what would i do stop the sending of notification when that happens.

View Replies View Related

Frame Doesn't Refresh Properly When Manually Refresh Page

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

Using Refresh Button On The Menu Bar To Refresh Two Frames.

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

Trapping As ASPError

I have a COM object developed in VB. It makes ADODB calls. When it fails it
Raise Error. I am using the COM object in my ASP using Server.CreateObject.
Whenever a function call fails I wanted the system to catch the 500-100
error and redirect to the configured page in IIS. But nothing happens. I
don't have "on error resume next" in my COM object.
If I create ADO objects directly in my ASP code using Server.CreateObject it
works fine.

View Replies View Related

Trapping Errors With ASP

I want that every error in every asp/javascript/ etc... will trappped to a central asp page (not dotnet), which I declare on my site.suppose I have a dotnet site platformed - is the declaration for that may be the same for not dotnet declarations.

View Replies View Related

Trapping F1, F2, F3, F4, Etc. Keys

Is there a way to trap F1, F2, F3, F4 etc. keys on ASP and have our own
codes to do whatever necessary for each of those keys ?

View Replies View Related

Trapping Errors

I need an example of "Trapping Errors" in ASP (not .net).

View Replies View Related

Trapping Errors - FileSysObject

How can I trap errors from the FileSystemObject ("Permission Denied, File Not Found, etc.)? I tried the "Err" object, but it doesn't return an error number...

View Replies View Related

Trapping Single Quotation Mark

I am looking for a way that I can trap the single quotation mark. If an
encoder uses single quotation mark on a textbox field, it always give me an
error because I use single quotes on the SQL statement.

View Replies View Related

Trapping Mssql Raiserror Statements

I am inserting a record in a table(Trans_Master) using ado recordeset.I have also created trigger on the same table after INSERT where RollBack transaction is done when a condition is not met.

the created trigger is working fine.But the problem I am having is How do I can trap thus rollback in asp.One posssile solution I may see is traping raiserror in asp but don't know HOW?

View Replies View Related

Refresh

How can I refresh one webpage from another?

View Replies View Related

Refresh

How can I get an ASP page to automatically refresh on load.

View Replies View Related

Refresh

Why do I need to close and open my browser to see the changes made to the code(javascript)?? How can make the page refresh without closing the browser.

View Replies View Related

Do I Have To Refresh Every Second

I have this asp page called create project . In this page, there will be a list of clients (pulled from db) for the user to select.

User could also click on the create client button to open up a seperate page/window to create a new client. After they have created the client, the page will be closed. How do I tell my create project page that a new client has been created and so, refresh the page? Do I really need to set my Create project page to refresh every second?

View Replies View Related

Refresh?

I have a asp page where i display all the records i create a hyperlink with that records and when any one click on that link a popup window will appear where user enter the new data and click on update button then i update the fields and the popup window will close but my problem is that when i click on update button i also want to refresh the parent(previous) page please tell me how can i refresh that page ....

View Replies View Related

Refresh

My page uses code like this to redirect to other pages for the purpose of allowing errors and confirmatory statements to be seen by Administrators and Users alike.

Response.Write("<meta http-equiv=""Refresh"" content=""4; URL=AdminSelectAction.asp"">")

The problem is that this does not allow the refresh button to be pressed because it does not change the address in the address bar in Internet Explorer. Response.Redirect does change the address. Is there a way to make a pause before changing the page that WILL change the address in the bar?

View Replies View Related

Refresh

On my form,the user puts in ref no,and clicks submit. a new window gets opened. but when I click on refresh on the browser. the same action takes place(new window opens). whats going on. i dont want this to happen. the page should reload.

View Replies View Related

Refresh

im trying to create one page. which let user to fill in data... then when click on submit button. it pop up one "small windows", which content are:"Thank you for fill in...". den when the user close da window. the parent window can refresh itself automatically.

how to write the codes of once close da "small window", the parent window itself can refresh?

View Replies View Related

Refresh

I've just uploaded a new ASP web site for a client. Some of their customers are still seeing the old .htm web page. I know it's obviously been pulled from the cache. How do I get the browser to pull the new page and not the cache?

I've now added this code to the top of the index page...

<%
Response.Expires = 60
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
%>

...but will this code force customers browsers to fetch the new page?

View Replies View Related

How To Refresh A Page?

When a link on page A is clicked, a window is popped open through javascript and this window contains page B. After doing some modifications in page B(in the popup-window), the user hits 'submit' (in page B) and then the page B window is closed.

Right before page B's window is closed I'd like page A to be refreshed because the modifications the user performed directly modifies the information visible to the user on page A.

My question is divided into two parts:

1 - is it possible to do this? Can the error be detected?
2 - if the answer to 1 is yes, then question 2 is: how?

View Replies View Related

Force Refresh

My main page shows a table to which a user can add data to by clicking on a button, this in turn loads up a pop up window where the data to be entered is typed. Once the data is submitted the popup window is closed via Close button, but the table on the main IE page only shows the updated information if the refresh button is clicked.

All i want to know is, is there a way of forcing refresh of the main page when the close button in the popup window is clicked. Code used for the close button:

<TD><a href="javascript:self.close()" title="Close"><IMG align="center" src="http://localhost/***/close.gif" alt="Close Window"></a></TD>

View Replies View Related

Refresh The Page Value

I want to insert the selected name in my action list. for that first add the person name & then select the name & then want to inser them. but i am getting problem here ...

In Asp I have opened a popup window, from current window. And on closing that new popup window I have to refresh the current window ( parernt window from which i open this pop up window ) It is Refreshing but I am facing one Problem. that Windows Retry Option of Refreshing is Coming...

i want to remove this option & let the page auotomatically refresh .. but how ..?

View Replies View Related

Refresh And Session

If I logout of my websie I run the session.abandon command that is supposedly gonna destroys all session variables. Then if try to access a private asp page it actually shows up despite me having :

if not Session("login") = "true" then response.Redirect("login.asp") at the start of every private page.

If I hit refresh on the private page I do get redirect but I dont see why it doesnt happen straight away.

Another thing, kind of the same problem, when I add record to my access database then I goto the page that actually shows does record I sometime need to hit refresh for the new record to show up. Code:

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved