Anyone know why this line fails to print anything?
document.write( window.top.myWi ndowArray[i].name);
For that matter, neither does this:
document.write( '>>' + window.top.myWi ndowArray[i].name);
I don't get any errors and other writes before and after work fine.
myWindowArray is not null and does have elements.
Also the higher problem is that I'm trying to maintain my own collection of
windows that persist regardless of page browsing. So I've put them in
window.top. I tried window.navigato r but there was a permission problem
retrieving the window properties.
What would be the best way to manage this global persistence?
TIA,
Mike W 5 2530
VisionSet said the following on 7/20/2006 6:19 PM:
Anyone know why this line fails to print anything?
document.write( window.top.myWi ndowArray[i].name);
Hmmm. Any idea why my stereo doesn't work? Point being, context is
everything.
top is a reserved word in JS. Are you naming your persistent window top
or are you referring to the top window in a frameset?
window.frames.t op.myWindowArra y[1].name
For that matter, neither does this:
document.write( '>>' + window.top.myWi ndowArray[i].name);
The only difference being you added >>
I don't get any errors and other writes before and after work fine.
myWindowArray is not null and does have elements.
What window is it in though?
Also the higher problem is that I'm trying to maintain my own collection of
windows that persist regardless of page browsing. So I've put them in
window.top. I tried window.navigato r but there was a permission problem
retrieving the window properties.
What would be the best way to manage this global persistence?
Show a sample page that displays that behavior.
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
"Randy Webb" <Hi************ @aol.comwrote in message
news:Oq******** *************** *******@comcast .com...
VisionSet said the following on 7/20/2006 6:19 PM:
Anyone know why this line fails to print anything?
document.write( window.top.myWi ndowArray[i].name);
Hmmm. Any idea why my stereo doesn't work? Point being, context is
everything.
Thought I'd done something daft, total JS newb and all.
>
top is a reserved word in JS. Are you naming your persistent window top
or are you referring to the top window in a frameset?
I'm hopefully refering to some object that is guaranteed to be available. I
don't really care what it is, I just want to stick my array in it.
>
window.frames.t op.myWindowArra y[1].name
For that matter, neither does this:
document.write( '>>' + window.top.myWi ndowArray[i].name);
The only difference being you added >>
so I should get '>>' if (window.top.myW indowArray[i].name == "")
>
I don't get any errors and other writes before and after work fine.
myWindowArray is not null and does have elements.
What window is it in though?
Some other window, but I'm assuming I can get global browsing persistent
storage by sticking it in a ref to window.top
>
Also the higher problem is that I'm trying to maintain my own collection
of
windows that persist regardless of page browsing. So I've put them in
window.top. I tried window.navigato r but there was a permission problem
retrieving the window properties.
What would be the best way to manage this global persistence?
Show a sample page that displays that behavior.
okay, when I get back to work in 9 hrs.
Thanks,
Mike W
VisionSet said the following on 7/20/2006 6:38 PM:
"Randy Webb" <Hi************ @aol.comwrote in message
news:Oq******** *************** *******@comcast .com...
>VisionSet said the following on 7/20/2006 6:19 PM:
>>Anyone know why this line fails to print anything?
document.writ e(window.top.my WindowArray[i].name);
Hmmm. Any idea why my stereo doesn't work? Point being, context is everything.
Thought I'd done something daft, total JS newb and all.
Nah, just my warped sense of humor at times.
>top is a reserved word in JS. Are you naming your persistent window top or are you referring to the top window in a frameset?
I'm hopefully refering to some object that is guaranteed to be available. I
don't really care what it is, I just want to stick my array in it.
Then don't use top as it is a reserved word that has a meaning in
certain context and window.top will freak it out.
>window.frames. top.myWindowArr ay[1].name
>>For that matter, neither does this:
document.writ e('>>' + window.top.myWi ndowArray[i].name);
The only difference being you added >>
so I should get '>>' if (window.top.myW indowArray[i].name == "")
>>I don't get any errors and other writes before and after work fine. myWindowArr ay is not null and does have elements.
What window is it in though?
Some other window, but I'm assuming I can get global browsing persistent
storage by sticking it in a ref to window.top
Choose a different variable name. window.myPersis tentStorage
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Randy Webb wrote:
Some other window, but I'm assuming I can get global browsing persistent
storage by sticking it in a ref to window.top
Choose a different variable name. window.myPersis tentStorage
But I thought that each browsed page got a new variable environment so
myPersistentSto rage would not be persistent since the window object
would be a different one after a page browse???
Mike W
VisionSet said the following on 7/21/2006 4:24 AM:
Randy Webb wrote:
>>Some other window, but I'm assuming I can get global browsing persistent storage by sticking it in a ref to window.top
Choose a different variable name. window.myPersis tentStorage
But I thought that each browsed page got a new variable environment so
myPersistentSto rage would not be persistent since the window object
would be a different one after a page browse???
Yes it would.
If you want to maintain variables across pages then you will either have
to use a hidden frameset and maintain your variables in the frameset
itself, use cookies (with the limitations), or track your variables on
the server and reproduce them in each page.
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Andy Fish |
last post by:
Hi,
Can anyone tell me if there is a way to set a variable in javascript and
have that persist so that it can be picked up by the next page in the
window?
In this case I will actually navigate to the page myself by setting
document.URL. I am happy to do this in a different way but I don't want to
pop up a sub window. I want to pass some javascript stuff into the next page
without having to serialize it all and post it to the server.
|
by: lim |
last post by:
What is the possible error that occurs when the Page_load event is not triggered during execution.
In my page there's some basic server control. Is there any loops holes?
|
by: Diane Yocom |
last post by:
I'm still very new to ASP.Net, so wanted to get some advice on how to solve
the following design problem (sorry my explanation is so long):
I'm developing an ASP.Net intranet app (using VB.Net for my business
objects) that will allow my users (max of about 25) to enter information
about families and their children. On one page, I need to collect general
information about the family (such as address and phone number) and specific...
|
by: John Hoge |
last post by:
A common problem in database updates in the maintenece of "domain
tables". For example, a product database has an option for color. When
entering the specifications for a new product, a domain table is used
to populate a drop down list of available colors.
Simple so far. But what if the user wants to create a new color
specification on the fly? Let's say that this is a complicated process
requiring it's own page with validation code....
|
by: Stu |
last post by:
Hi,
I am creating a control in a PlaceHolder like so:
Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnDelete.Click
Dim ctrl As AcceptOrCancel =
CType(Page.LoadControl("controls/AcceptOrCancel.ascx"), AcceptOrCancel)
PlaceHolder1.Controls.Add(ctrl)
| |
by: Siobhan |
last post by:
Hi
What is the recommended way to store a user's database credentials across
the pages of a web application so that each time the database is accessed the
system doesn't have to ask them for their username and password again
We have previously stored these in a session variable (encrypted) and
retrieved from their - but are worried about the impact on performance if the
number of users increases.
Had thought about cookies but worried...
|
by: Dick |
last post by:
I have a GridView bound to an ObjectDataSource. I have a Button that calls
GridView.DataBind. I want the row that is selected before the DataBind to
still be selected afterwards.
This happens automatically if the data doesn't change. But if records have
been added or deleted then it looks as if some code is necessary: I've done
this by using GridView.SelectedValue to get the key value of the currently
selected Row and then by itterating...
|
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 several parts of the DOM, but this does
not include the window object.
Thank you
|
by: V S Rawat |
last post by:
using Javascript, I am opening a web-based url in a popup window.
MyWin1=Window.Open(url, "mywindow")
There is a form (form1) in the url in that popup window, I need to
submit that form.
How do I submit that form1 from the javascript from my current window?
Thanks.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |