Onload Or OnUnload

I have a Vbscript that will execute on the <body onUnLoad> event, however, because the page refreshes all the time, it will execute the code every single time. I only want the code to execute when the window is either just opened or just closed.

View Replies


ADVERTISEMENT

Onunload

a way to use onunload to let the server know the client window has been closed?

View Replies View Related

OnUnload Question

Can someone clear something up for me. Someone told me to use an unOnload function to auto submit a form when the window is redirected or closed. Someone else told me that onUnload will clear all the textboxes, hence leaving nothing to submit.

View Replies View Related

Logging Off By OnUnload Caused By Refreshing

I have a application online using ASP in which users log in and log out. However, a lot of users simply close the window, bypassing my log-out script. I have tried using the Javascript onUnload function with success, but refreshing the screen also triggers this at the wrong time

View Replies View Related

OnLoad

I have a small problem with Javascript in my ASP page. The script works fine when placed in an HTML page, and everything happens as expected. But when I have the suffix .asp, the onLoad event doesn't work. Is there a reason for this? Do these events not work in ASP?

View Replies View Related

Onload Redirect

I have an asp page that looks like the following (simplified):

<HTML>
<HEAD></HEAD>
<BODY onLoad="javascript:document.frmSub.submit();">
<FORM NAME="frmSub" action="http://www.microsoft.com" METHOD="post">
<INPUT TYPE="Hidden" NAME="OrderNumber" VALUE="0">
</FORM>
</BODY>
</HTML>

I am just trying to automatically redirect to another page and post some
form data. This worked fine on a Windows 2000 server. We recently upgraded
to Windows Server 2003. The page works fine when it is accessed via
"http://" but not via "https://". The browser just shows a blank page and
hangs. If I do a "View Source", the code above shows up, but it just doesn't
redirect like it's supposed to.
Is there some security issue on Windows Server 2003 that is causing this to
fail? Is there some setting I can change to fix it?

View Replies View Related

ASP Onload Code?

I am implementing global redirection code to redirect my customers to different parts of my site based on their country ip. The code I've bought is active target (www.activetarget.com) which uses asp and an iptocountry database.

What i need to do is only have the code work if the user has opened the page externally such as from a search engine or another site but if the user has selected a particular part of our site from our home page i don't want them to be redirected to another part every time they try to click on a page.

This is because some customers would be from Europe but on a US network so their ip would have them redirected to the US site which we don't want.

View Replies View Related

ASP - First Time Onload

Im trying to redirect the first time visitors to my homepage to a different page other than the homepage. Is this possible?

View Replies View Related

BODY ONLOAD()

i've been using body onload()for ages but since i changed my internet explorer (to 6.02) and OS (XP), i started to get this IE script error and i don't know how to get rid of it.

I read somewhere that if I put the onload event in an inline script tag at the bottom of the my form body, it all works fine, but this doesn't work either.what i should do?

View Replies View Related

Onload And Onunoad Events

Trying to implement a list of online users in my application. I have SQL Server database, table Users with a column called Status, that is set to 1 if the user is online or to 0 if the user is offline.

I wrote a VBScript sub for database update, but the problem is when I try to execute it on page onLoad event or onUnload event, the onUnload event overwrites the onLoad one right away. I suspect it has something to do with server-side vs. client-side scripting.

This is the BODY tag: Code:

View Replies View Related

Page Onload/refresh

Is there a way to determine if a page was refreshed? I have a function that is called when the page loads, but when the user refreshes the page it calls the function again. Is there a way to call the function only when the page initially loads? I don't want it to load when the user clicks the refresh button.

View Replies View Related

Onload Resolution Problem

What I'm trying to do is, after a user has been validated, I want the form to load to the appropriate resolution for the user. Code:

View Replies View Related

How To Specify The Page Looks In Window Onload?

I have a page1.asp that opens a window called page2.asp. I want page2.asp doesn't have title bar, tool bar, address bar. Is it possible to specify in javascript function window_onload() in page2.asp? I don't want to specify in window.open() in page1.asp when it loads page2.asp. Code:

View Replies View Related

Back Button Or Refresh Page OnLoad

how to detect when the user click on the back button to go back to the previous page? Or a way to refresh a ASP page whenever it's loaded?

View Replies View Related

Server.Execute Command Disables Body OnLoad

i have this web page which on loading shows + hides a selection of div's using the command : Code:

<body onLoad="showHide()">

i wanted to include a standard banner by adding the command : Code:

<%
Session("titleString") = "some title"
Server.Execute "index.asp"
%>

but this seems to disable the onLoad command, presumably because there is already a full header and body in the "index.asp" file

the reason why i didn't use the "include file" command here was because the latter won't allow the title string to be fed through

the question is : is there an alternative way to execute either the "Server.Execute" or the "body onLoad" command that will allow the function showHide() to work ?

the same function is also called from a "select" form element Code:

<select onChange="showHide()">

and that works fine, so the problem definitely lies with the onLoad command, not the showHide() function.

View Replies View Related







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