473,399 Members | 3,603 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

ie6 window.name strangeness

I'm having a strange problem with window.name (from JavaScript) on *some* of our computers. OS is Windows 2000 so Internet Explorer version is IE6 sp1. I really need some help here...

We are using window.name to set a hidden value in the browser that persists between page navs on our site. So the first page will set this value, giving the window a name, and this value can be used by the following pages when navigated to. Scenario:
Expand|Select|Wrap|Line Numbers
  1. page1:
  2.   set window.name = "123";
  3.   <user clicks a link to page2>
  4. page2:
  5.   window.name still has value "123"
BUT, on some computers the name is replaced with "_unspecifiedFrame":
Expand|Select|Wrap|Line Numbers
  1. page1:
  2.   set window.name = "123";
  3.   <user clicks a link to page2>
  4. page2:
  5.   window.name is "_unspecifiedFrame" (!!!)
Worth noting is that the window name is "_unspecifiedFrame", and not just the empty string "" that seems to be the default otherwise.

Does anybody know why this is happening, and how it can be avoided?

//Mike
Jan 10 '07 #1
5 2187
iam_clint
1,208 Expert 1GB
you might try self.name = "123";
Jan 10 '07 #2
I tried self.name but it made no difference.

BUT, I now know more about the cause of the problem and it is not related to which machine I run on. Instead, it is related to how the browser window is opened:

If the browser window was initially opened without (or with an empty) window.name, then it will allow its name to be changed and persist the new value.

But if the window was opened with a name, f ex with window.open(url, "myName"), then the supplied "myName" will persist throughout the window's lifetime and cannot be changed. Actually, it will seem like you can change the window.name if you do
Expand|Select|Wrap|Line Numbers
  1. window.name="abc"
  2. alert(window.name)
but the old value will be restored immediately after. FireFox always let you change the window.name.

So, I guess the workaround I need to do is to pop a new window (with empty window.name) when I hit these cases.

To wrap up, I should also mention that the reason we were seeing window.name=="_unspecifiedFrame" was because the user had opened the link from an Outlook email message and Outlook supplies the "_unspecifiedFrame" target name.
Jan 11 '07 #3
acoder
16,027 Expert Mod 8TB
I tried self.name but it made no difference.

BUT, I now know more about the cause of the problem and it is not related to which machine I run on. Instead, it is related to how the browser window is opened:

If the browser window was initially opened without (or with an empty) window.name, then it will allow its name to be changed and persist the new value.

But if the window was opened with a name, f ex with window.open(url, "myName"), then the supplied "myName" will persist throughout the window's lifetime and cannot be changed. Actually, it will seem like you can change the window.name if you do
Expand|Select|Wrap|Line Numbers
  1. window.name="abc"
  2. alert(window.name)
but the old value will be restored immediately after. FireFox always let you change the window.name.

So, I guess the workaround I need to do is to pop a new window (with empty window.name) when I hit these cases.

To wrap up, I should also mention that the reason we were seeing window.name=="_unspecifiedFrame" was because the user had opened the link from an Outlook email message and Outlook supplies the "_unspecifiedFrame" target name.
Good work finding that out. Seems a web programmer's job is to program normally for standard behaviour and then spend twice as much time afterwards trying to fix it for IE and Microsoft!
Jan 11 '07 #4
Good work finding that out. Seems a web programmer's job is to program normally for standard behaviour and then spend twice as much time afterwards trying to fix it for IE and Microsoft!
Exactly! :-)
Jan 11 '07 #5
iam_clint
1,208 Expert 1GB
thanks for the reply of what was happening i wasn't completely sure myself now i know if it comes up again. If you have any more questions feel free to post i usually check posts around 10am cst till about 2pm cst usually.
Jan 11 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Ken Beesley | last post by:
Newbie question: on unicodedata.name If I do import unicodedata unicodedata.name(u"a") or unicodedata.name(u"\u0061")
2
by: Robert M. Gary | last post by:
I'm using JRE 1.5 on Solaris Japanese (Sparc). The JVM claims its default character set is EUC-JP I'm seeing two strange things when using Japanese character sets... 1) If I write a program that...
1
by: Person | last post by:
I have a popup window with a form: The popup window is opened like this: <SCRIPT LANGUAGE=javascript> window.open('primos.html', 'primos', config='height=300, width=400') </SCRIPT> The...
1
by: Ben Smeets | last post by:
Hi folks, Have been trying to figure out a solution for the following problem by reading lots of threads here, but doesn't work out. Hope someone can help me. I have a parent window which...
1
by: Diana | last post by:
Hi there, I'm having some difficulty in renaming a window object. I'm opening the window in question via a targetted submit: <!-- CODE EXCERPT FROM WINDOW 1 --> <form target="newWin"> ...
3
by: NeverLift | last post by:
But, if it's not open, I don't want to open it . . . using window.open will open it if it doesn't exist, even if the url in that open is null (the window is then empty -- but it's open). The...
26
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized...
4
by: alexandre.brisebois | last post by:
Hi, I am using access 2003, I would like to know if there is an option to reorganize the tables in a maner that is readable, as we can do in sql sever 2000 or 2005. I have been given a database...
7
by: multicherry | last post by:
Hi, Having searched for a way to fetch a window object by name, all I came across were answers along the line of... "All you have to do is say windowObj = window.open("blah", "name");" which...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.