Click here to Skip to main content
15,889,116 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionEvent: JavaOne and Oracle Develop 2-12 Pin
alphauser612-Mar-12 4:03
alphauser612-Mar-12 4:03 
AnswerRe: Event: JavaOne and Oracle Develop 2-12 Pin
Richard MacCutchan12-Mar-12 4:34
mveRichard MacCutchan12-Mar-12 4:34 
QuestionFunction.name property missing on IIS/Jscript Pin
captnmac9-Mar-12 7:12
captnmac9-Mar-12 7:12 
Questionread data from website Pin
Member 79044828-Mar-12 22:01
Member 79044828-Mar-12 22:01 
AnswerRe: read data from website Pin
captnmac9-Mar-12 7:17
captnmac9-Mar-12 7:17 
SuggestionTo disable Back space using javascript Pin
Lalit PB5-Mar-12 22:48
Lalit PB5-Mar-12 22:48 
GeneralRe: To disable Back space using javascript Pin
R. Giskard Reventlov6-Mar-12 10:16
R. Giskard Reventlov6-Mar-12 10:16 
QuestionReading Address Before Browser Loads It? Pin
weinerschizel5-Mar-12 15:26
weinerschizel5-Mar-12 15:26 
I'm writing a simple piece of code to display a popup when somebody leaves my wordpress blog. It will simply ask if they wanted to register for my next open house before they leave the website.

Here's what I have...

XML
<script language="JavaScript">
  window.onbeforeunload = confirmExit;
  function confirmExit()
  {
    return "Have you registered for my open house tour?";
  }
</script>


That displays everytime a page is unloaded though... I want to simply check what the next page is and if it doesn't contain my domain then trigger the popup.

I found this code but it won't work because it shows the previous pages address when I need to see the next page to loads address.

C#
var s = window.location.href;
    var s = window.
    return s;


Does anybody know how I can grab the next page that will be loaded from the browser?

Thanks!
AnswerRe: Reading Address Before Browser Loads It? Pin
Luc Pattyn5-Mar-12 17:07
sitebuilderLuc Pattyn5-Mar-12 17:07 
GeneralRe: Reading Address Before Browser Loads It? Pin
BobJanova5-Mar-12 23:52
BobJanova5-Mar-12 23:52 
GeneralRe: Reading Address Before Browser Loads It? Pin
weinerschizel6-Mar-12 8:36
weinerschizel6-Mar-12 8:36 
AnswerRe: Reading Address Before Browser Loads It? Pin
Luc Pattyn6-Mar-12 8:41
sitebuilderLuc Pattyn6-Mar-12 8:41 
AnswerRe: Reading Address Before Browser Loads It? Pin
0bx30-Mar-12 4:55
0bx30-Mar-12 4:55 
Question.exe in java Pin
aliasghar sayadi3-Mar-12 22:30
aliasghar sayadi3-Mar-12 22:30 
AnswerRe: .exe in java Pin
Richard MacCutchan3-Mar-12 23:27
mveRichard MacCutchan3-Mar-12 23:27 
Questionnodejs article moderation state unclear Pin
User 307353-Mar-12 17:43
professionalUser 307353-Mar-12 17:43 
AnswerRe: nodejs article moderation state unclear Pin
Richard MacCutchan3-Mar-12 23:26
mveRichard MacCutchan3-Mar-12 23:26 
AnswerRe: nodejs article moderation state unclear Pin
BobJanova5-Mar-12 0:43
BobJanova5-Mar-12 0:43 
QuestionAccessing another windows variables Pin
Member 43038102-Mar-12 3:16
Member 43038102-Mar-12 3:16 
AnswerRe: Accessing another windows variables Pin
BobJanova2-Mar-12 4:14
BobJanova2-Mar-12 4:14 
AnswerRe: Accessing another windows variables Pin
all_in_flames23-Apr-12 4:12
professionalall_in_flames23-Apr-12 4:12 
Questionpassing parameter from one page to another Pin
jack4277928-Feb-12 11:12
jack4277928-Feb-12 11:12 
AnswerRe: passing parameter from one page to another Pin
R. Giskard Reventlov28-Feb-12 11:33
R. Giskard Reventlov28-Feb-12 11:33 
QuestionJQuery Animate Pin
SRJ9226-Feb-12 16:22
SRJ9226-Feb-12 16:22 
Questionpassing parameter from one page to another Pin
vaibhavtiwari26025-Feb-12 21:00
vaibhavtiwari26025-Feb-12 21:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.