If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > window.onBeforeUnload ?? can it be coded

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-16-04, 01:44
yoja7 yoja7 is offline
Registered User
 
Join Date: Jan 2004
Location: India
Posts: 31
Lightbulb window.onBeforeUnload ?? can it be coded

hi
i am maintaining an web service for an intranet, the user submit news items,these are later approved or rejected

if rejected user is able to view that item and reason it was rejected

now the required functionality is that if user is in the window for viewing details and he navigates to other link, he should be warned that he is navigating somewhere else and this info will be deleted,

i took care of this functionality as below
Code:
window.onbeforeunload=Bunload;
//i want some customization here


function Bunload()
{
	message = "This rejected item will be deleted.\nAre you sure you wish to proceed?."	
	return message;
}

but on clicking ok i want to delete this item, for which i navigate him to a page like item_delete.asp with id as hidden for field.

but the problem is that it ask the user twice abt renavigation,[ since item has to be deleted]

is there a way to get the page where user is navigating to, so that i can ask only once that he is sure

hope this make sense ;-)



thanks
yogesh
__________________
Do not walk behind me, for I may not lead.
Do not walk ahead of me, for I may not follow.
Do not walk beside me, either.
Just leave me alone.

Yogesh Jangam
http://yogeshjangam.*************
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On