How Do You Detect When A Page Has Only Been Refreshed?

I'm trying to write an ASP interface that mimiks a .Net datagrid control.
I'm having a problem when I'm in the middle of an Edit, Update, or a New
Record.

If the user hits the wrong button, the program grabs the values in
the textboxes using the request.form() and then redisplays them in the
textboxes when the records table gets written back out to the page. This
works fine as long as the form is submitted.

If it's just a page refresh
(F5), the program doesn't get the latest changes to the textboxes and
displays either a blank or whatever was in there the last time the form was
submitted. Anybody got any ideas?

View Replies


ADVERTISEMENT

Page Being Refreshed

How do i stop a page being refreshed and running my asp scripts again and again

View Replies View Related

Determine If Page Refreshed

First I would question why you want to do this. If they get to the page by any means it should respond appropriately, whether refresh or by link. This is a stateless environment after all.

That being said...

I would take the approach of setting a session variable that gets set the first time they hit the page:

<%
if session("NotTheFirstTime") = "" then
'write the onload
session("NotTheFirstTime") = true
end if
%>

then based on that variable write or don't write the onload.

Of course, if the user can access the page from multiple links and the onload is valid for each link, regardless of how many times they hit the page, this won't work....

View Replies View Related

Detect Calling Page

I have a function in a script file that I use from a couple of different pages. Can I, within the function, detect which page is being viewed (which page called the function)

View Replies View Related

Detect The Refresh Of A PAGE

How can i detect the refresh of an ASP Page? I want to kill my session variable value, when the user refreshes my page.

View Replies View Related

ASP Pages Blank Until Refreshed

I have an online application made up of ASP pages (IIS 5.0 on Windows 2000 Server) drawing data from a SQL Server database. Most of the time, everything works exactly as it should. Connections are opened to the database, queries are run and data is returned and writen out, connections are closed, etc.

However, every so often a page simply won't load. It isn't trying to load and then timing out or anything, it's like it's ignoring the page entirely. It shows the correct URL in the address bar of IE, but there's nothing but a blank white page displayed. Viewing the source of the blank page reveals that instead of the correct code for the page, we get this: Code:

View Replies View Related

Code Behind File Not Being Refreshed

we're running IIS 5 and trying to do a simple update to a code behind file (Login.aspx.vb) we copy the file over to the server, but we're not seeing the updates. the server is still reporting errors on line numbers in the file that no longer exist. we've even stopped / restarted the service, with no luck.

View Replies View Related

Recordset Being Displayed Isn't Refreshed

i've created a simple web app that allows users to enter in
information about a project in a web form and save that information to
a database (Access). After a user enters in all the information, she
can click on a link to go to an index.asp page that displays all the
projects that have been added.

the problem i'm having occurs after the user enters in all their
project information. when the user goes to the index page, the index
page is suppposed to retrieve all records and display them, but it
doesn't.

even after hitting the Refresh button in the browser, it
won't display the latest project that the user just entered. however,
if i add a second project and then go back to the index page, it will
work fine and display both the first and second projects. so, it's
like the first project won't be displayed until i enter in another
project after it (like the first project is stuck). does anyone know
what the problem may be?

View Replies View Related

Pages Are Not Refreshed On Client Machines

I have a web site where I use cookies to navigate between
the pages. The cookie is his id no which is nothing but
his staff id no. All most all pages are dynamic and
connected to sql server 2000 through ADOs. My problem is :

if any one logs in and enter bowse the pages and goes back
uses other log in his old page is displaced rather than
new one, untill he explicity uses the refresh button. Once
he does that , it is working. Iam using javascript menus
to navigate between pages.Previously when menus are not
there pages were working fine.

View Replies View Related

Can Asp Detect The Url

Is there a way for asp to know what url is in the address window? I have a function that is included in every one of my pages and I want it to write out different things depending on the page the visitor is on.

View Replies View Related

How To Detect Router Ip

Can anyone tell me how to detect a ip address behind a router?
I know that using ASP, we can detect the actual ip and the proxy ip, but what if the visitor is using a router that dynamically assigns a ip.

View Replies View Related

How To Detect An Object

I am using a stored procedure that outputs multiple recordsets.
I use <% SET rsDisplay = rsDisplay.NextRecordset() %to step to the
next recordset.

In one particular condition the final recordset is not passed to the
page, so I need to detect that the object is empty.

I did just try <% If NOT rsDisplay.EOF Then %but I get:

Microsoft VBScript runtime error '800a01a8'

Object required

Any ideas how I can trap this error? I just want the area on the ASP
page not to display when there isn't a final recordset.

View Replies View Related

Detect When Drop Down Less Than X

What I need is a field that is a drop down and when selected if less than four it needs to show a new field to select.

Once the total of the drop downs adds up to 4 or above then no more are created. This would be in the middle of a bigger form. Code:

View Replies View Related

Detect Pic Widths?

I'm working on an app to upload pictures to my Web page.
As part of it, I need to know the dimensions of the
images - how many pixels wide by how many pixels high. Is
there any way, as part of the upload or immediately after,
that I can detect that?

Also, though the solution isn't exactly appropriate to
this NG, I would also accept a client-side solution to
this problem.

View Replies View Related

Detect Submit

Normally I would do something like
if request.form("submitbutton.x") <"" then
....
end if

But I found a problem when the browser uses the 'alt text' instead of
the image (when the image is not found, or if the browser is not
displaying graphics, etc. How do you detect that? or should I?

View Replies View Related

Detect Mac IE Users

Does any one know how to detect if a user is using IE on a Mac so i can route them to another page.I have tried the following:Code:

strUA = Request.ServerVariables("HTTP_USER_AGENT")

But how do i parse this info to determine whether they are a MAC IE user ?

View Replies View Related

Detect If A Class

I am working with a bunch of old code so I can really restructure the includes, otherwise I guess I could change all the #include statements to #include-once. Anyway, If I have a file with a class like this:

Class myClass
end class

I get a "name redefined" error. I've been seeing these and indeed from goolge searches, it's because the file is somehow included more than once. This problem doesn't occur for functions and the old code bases just used functions whereas I would like to add some classes. In C you used to be able to detect that at the top of the file and not included the rest of the file if it is allready included. I just want to at least detect it so I don't redeclare the class.

View Replies View Related

Detect If URL Has NO Variables?

How can I get the url of a page in asp and detect if there are no variables appended to the end? Would I somehow get the address and do an instr for the ? character? Code:

View Replies View Related

Detect The Database

Could anyone show me a tutorial or like show me a script in asp that can detect to see if the mysql backend is working? And if it isn't then to display a message that says something like "out of luck."

View Replies View Related

Detect JavaScript

Is there any way to detect JavaScript using ASP? I need a script that does something like this:

If JavaScript is enabled (is supported)
write this code
else
write this code

If not, can I do it with any other language?

View Replies View Related

Detect Where User

Is there a way whereby i can detect where the user came from?

For example:

if this user came from www.mywebsite.com/a.asp theni will redirect him to c.asp but if he came from www.mywebsite.com/b.asp then i will redirect him to d.asp

View Replies View Related

Browser Detect

I need to add in some specific browser detection in my ASP to identify Mac IE5 running OSX - is there any wahy of identifying this config alone - and not just identifying all Mac IE5s? If you have OSX Mac IE 5, please visit this page which will give your User Agent string.

View Replies View Related

Detect Downloads

Is it possible to detect downloads of a file on the web server? Using ASP Classic?

View Replies View Related

Detect Result

The delete method of the FileSystemObject.FileObject does not return a result. If permissions disallow deletion, it will not raise an error. Conversely, if the delete method does succeed, a call to FileExists directly afterward may return true because the system hasn't updated yet (or whatever actually goes on). Is there any way to accurately check the result of a deletion?

View Replies View Related

How To Detect If Cookies Are Enabled?

I searched around everywhere on the net, but could not find a simple example
of detecting if cookies are enabled - on server side, and without moving
from one page to another.

This should be a very basic functionality, so I am reluctant to believe that
there's no way to simply test it in a server-side script.

View Replies View Related

How To Detect If Image Is RGB Or CMYK

I've been working on this wysiwyg web editor. The editor lets you upload images. Only .jpg, .gif and .png files are allowed. Now I should be able to detect if the uploaded .jpg image is in RGB or CMYK mode. Only RGB images should be allowed. Can this be done with ASP?

View Replies View Related

Detect Java Version

I need an asp page that will detect the clients java version, and then email the results automatically.

View Replies View Related

Detect [X] Close Button

Im writting an asp app that tracks the users scores and info (its a
training app) to a access database, ive disabled the ie toolbars and
everthing so the user must use my nav buttons so i can track what pages
they have been to.
My problem is if the user closes IE with the close button [X], is there a
way i can redirect them to my close database and save results page, i cant
use the unload event as this is trggered every time the use goes to the
next page.

View Replies View Related

Detect Http:// And Www In Hyperlink

the way a field is currently displayed:

Currently the ASP code inside my page is simply:

<%=rs.Fields("Notes")%>

This is fine for displaying the text, but the text contains links which are
currently just being displayed as text. I'd like them to display as
hyperlinks that will open in new windows when clicked upon. so basically I
need some ASP code to detect text starting with http:// or www.etc and
automatically make them into hyperlinks.

View Replies View Related

Detect Browser To Load Appropriate CSS

I am looking for a snippet that contains a comprehensive list of browser detections, where I can tell each browser, platform to load a different .css file.. any ideas? Thanks!

View Replies View Related

Detect If A Graphic Has Been Downloaded

I would like to know how to detect if a graphic has been downloaded using ASP, can anyone advise?

AUTOMATICALLY without click. So if i hit a page on my site, it should detect it and store in a database. Is this correct?

View Replies View Related

Detect Mobile Visitor

How can I detect if someone is browsing with a mobile phone or other small screen device?I'd like to give them a text and small pic version of my site.
Also, what media player is common to them, and is it programmable, ie, can I turn sounds off and on.

I have an interactive page with alot of text, I'd like to offer the interactive page without the text. Do they run javascript?

View Replies View Related

Detect The ActiveX Control Is Able To Run

Is there anyway to detect the ActiveX control is able to run on the browser or not. After I installed the ActiveX control to my system, user sometimes switch
the secruity setting to "not able to run ActiveX control". So, the ActiveX
control just show on the broswer, but not able to run it.

I want to find a way to detect it. And prompt the user a message telling
that the ActiveX control is not able to run.

View Replies View Related







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