[Javascript] location redirect

Grinwald, Uri UGrinwald at dynamic.ca
Fri Nov 19 10:32:06 CST 2004


Hi Tim.
 
This is a good point.
I am not sure about the CSS box thing, can you provide an example or
take me to a website that does?
Also my question still stands even if I opt for your better solution. I
would have to still create three leaving pages each with a diffrent URL?
-----Original Message-----
From: Tim Makins [mailto:spindrift at oceanfree.net] 
Sent: Friday, November 19, 2004 11:15 AM
To: [JavaScript List]
Subject: Re: [Javascript] location redirect


With so many pop-up blockers these days, why not just have the question
on a 'leaving' page, where a 'no' takes you javascript:back, or make a
CSS box visible with the question in it?
 
Tim in Ireland.

	----- Original Message ----- 
	From: Grinwald, Uri <mailto:UGrinwald at dynamic.ca>  
	To: javascript at LaTech.edu 
	Sent: Friday, November 19, 2004 3:57 PM
	Subject: [Javascript] location redirect

	Hello
	 
	I have a unique codign question and was wondering if there was a
smarter way of performing the task at hand.
	I have a few links on my website that have URL whick take them
to external sites (opens new window)
	 
	I have been asked to create a pop up that informs the user that
they are leaving our site and then asks them if they want to proceed by
clicking OK or Cancel respectively.
	 
	The Cancel button closes the window with the following code:
	 
	<form><input type=button value="Cancel"
onClick="javascript:window.close();">
	</form>
	 
	The OK button I have attached a function that offers them one
more chance (confirm box) that they can cancel out of before
redirecting.
	 
	Here is the function:
	function confirm_entry()
	{
	input_box=confirm("Are you sure you want to leave
dundeeprecious.com ?");
	if (input_box==true)
	 
	{ 
	document.location.href =
"http://www.tse.com/HttpController?GetPage=QuotesViewPage&DetailedView=D
etailedPrices&Language=en&QuoteSymbol_1=dpm";
	 
	}
	 
	else
	{
	// Output when Cancel is clicked
	window.close();
	}
	 
	}
	-->
	</script>
	 
	My problem is that the initial page has actually three separate
external links so how can I change the code to take them to the correct
link based on the referrer URL?
	 
	Currently I would have to create three similiar pages and just
change the location.href code... there has to be an easier way right?
	 
	 
	 
	 
	 
	 
	 
	Uri Grinwald
	Web Designer
	Dynamic Mutual Funds
	40 King Street West
	55th Floor Scotia Plaza
	Tel: 416 365-2437
	Fax: 416 365-5602
	 

	
  _____  


	

	_______________________________________________
	Javascript mailing list
	Javascript at LaTech.edu
	https://lists.LaTech.edu/mailman/listinfo/javascript
	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20041119/ca7dd12e/attachment.htm>


More information about the Javascript mailing list