Hi everyone,
I am new to webdeveloper.com and fairly new to JavaScript so I greatly appreciate any help you can be!
I am currently trying to write a script that will redirect a user from a link they click to a different portion of the page. I have been unable to find any form of a window navigate event so I am using a window onload event, which has proven fairly unsuccessful.
The script needs to run continuously, as I would like any links clicked on in the window to add '#miniconsole' when clicked on.
Here is the code I have thus far so let me know what can be done to catch this event and process my code! Thanks!
Code:function LoadFunction() { var isClosed = newwindow.closed; var addon = "#miniconsole" newlocation = currentlocation + addon newwindow.navigate(newlocation); } // will open the international customer form function openIntlForm() { var w=396; /* popup window width*/ var h=250; /* popup window height*/ var l=(screen.width-w)/2; /*this centers horizontally*/ var t=(screen.height-h)/2; /*this centers vertically*/ var features="left="+l+",top="+t+",width="+w+",height="+h+",scrollbars=auto"; var newwindow = window.open(link,"",features); newwindow.focus(); dismissbox() var newlocation = null; do { var currentlocation = newwindow.location.href if (currentlocation != newlocation) { newwindow.attachEvent( 'onload', LoadFunction); newwindow.onload = LoadFunction() } while (isClosed = 'False') } }


Reply With Quote
Bookmarks