|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I'm trying to be able to set the browser window's title from inside a flash file. IE6 is being a pain in the *** though and i'm at the point that i'm pretty sure it has to be a browser bug. From inside the flash i'm using
Code:
getURL("javascript: set_title('" + title + "');");
(Edit: theres not really a space in "javascript"...the forum seems to be sticking it in there on it's own) My set_title function is in the head of the holding document Code:
<script>
function set_title(new_title) {
alert("Setting window title:\nOriginal: " + document.title + "\nNew: " + new_title);
document.title = new_title;
return void(0);
}
</script>
Now for the weird stuff. Calling the function from within the page works fine. I can set the title fine. When i try to set it from the flash now though it calls the function and the alert comes up properly but the window title doesn't change. Now setting it from the pages script doesn't work either, and when I refresh the page the window title stays as the last one set by the javascript within the page(doesn't go back to the <title><//title> set title) and nothing will change the title. I have to close the browser window and open a new one to get anything working again. No problems in mozilla. My IE version is 6.0.2800(OS: windows XP sp1) Heres a page I set up to isolate and test it http://chris.craftyidiots.com/title...title_test.html If you want the fla you can find it in the dir: http://chris.craftyidiots.com/title_setting/ Thanks for any help, if you don't think you could help solve it letting me know what happens with older versions of IE that you might have installed would be a big help too. I'm ripping my hair out ![]() Edit: I've found that calling any getURL from flash seems to keep IE from updating the window title until the browser window is closed or address is changed. I suppose i'm looking for help with a workaround now if anyone knows one or has any ideas that might work. I'd also like to know if this problem happens in IE5.5/5/4 too. What i'm trying to do is update the title of a popup based on data recieved from an XML socket Last edited by KilerCris : September 19th, 2003 at 08:26 PM. |
|
#2
|
|||
|
|||
|
Shouldn't: set_title('" + title + "');");
Be: set_title('" + new_title + "');"); ? |
|
#3
|
|||
|
|||
|
no, but thanks anyway
|
|
#4
|
||||
|
||||
|
<script>
function set_title(new_title) { alert('Setting window title:\nOriginal: ' + document.title + '\nNew: ' + new_title); document.title = new_title; return void(0); } </script> I just place " to ' Other than this, I don't know how to do it in flash. ^_^ Cheers. |
|
#5
|
|||
|
|||
|
Thanks for the help.....maybe this should be in the flash forum...should i see if a mod moves it or just repost?
|
|
#6
|
||||
|
||||
|
Well, dunno either. But I think you already know http://flashkit.org or http://flashkit.com
Just in case you want to know. ^_^ Please let me see your program when it's done, ok? Cheers! |
|
#7
|
|||
|
|||
|
I came up with a workaround. Put the page in frames (top one 0) so the frame gets bugged up but the script sets the top.document.title
|
|
#8
|
||||
|
||||
|
As per KilerCris' request, moved to the Flash forum.
__________________
Give a person code, and they'll hack for a day; Teach them how to code, and they'll hack forever. Analyze twice; hack once. The world's first existential ITIL question: If a change is released into production without a ticket to track it, was it actually released? About DrGroove: ITIL-Certified IT Process Engineer - Enterprise Application Architect - Freelance IT Journalist - Devshed Moderator - Funk Bassist Extraordinaire |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Setting document.title <--IE6 hates me |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|