Donelson
asked on
Need URL of current page of browser
I need to get the URL string from the page which contains the current SWF.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
----------- TYPICAL USAGE ---------
stop();
getURL("javascript:window. document.m yMovieSwf. SetVariabl e('pageURL ', document.location.href);") ;
intID = setInterval(this, "check_url", 250);
function check_url() {
if (pageURL == undefined) return;
clearInterval(intID); // Be sure to stop this when we've got an answer
theArgs = pageURL.split("?")[1]; // get second part of URL
if (theArgs.length > 0) {
// do whatever you want with the args
}
}
stop();
getURL("javascript:window.
intID = setInterval(this, "check_url", 250);
function check_url() {
if (pageURL == undefined) return;
clearInterval(intID); // Be sure to stop this when we've got an answer
theArgs = pageURL.split("?")[1]; // get second part of URL
if (theArgs.length > 0) {
// do whatever you want with the args
}
}
ASKER
WIngs --
I very much appreciate the test page -
http://www.permadi.com/tutorial/flashGetObject/
I use Macintosh extensively and have found this information for you to add to the TEST table
Macintosh OSX 10.4.x --
Safari 2.0.3 - Movie plays once then stops for methods (1, 2, 3, and 5). No play for (4 & 6).
FireFox 1.5.0.3 - Movie plays once then stops for methods (1, 2, 4 and 6).
No play for 3, which gives dialog "movie object not found. No play for 5.
Internet Explorer 5.2.3 (no longer supported by MicroSoft on Mac)
No play for any test.
Regards,
William Donelson
ASKER
Absolutely Brilliant ! Elegant, succinct, reliable! Five-Stars for this perfect solution!
After spending 11 hours searching, begging, trying weird and sometimes awful solutions, this is truly EXCELLENT.
All points to the Expert Extraordinaire !