Hi,
I have a little test script in a pop up window. The pop up page
refreshes every 2 seconds. I want it to check with every refresh if a
certain page (log3.htm) is loaded in the opener window. If that is the
case, another page (log4.htm) must be loaded in the opener window.
In pop up page:
<script>
<!--
if (opener.locatio n.href="log3.ht m")
{opener.locatio n.replace("log4 .htm")}
//-->
</script>
But it aint working :( What happens is that the condition doesn't work,
because with *any* page in the opener window, it is replaced immediately
with log4.htm when the pop up refreshes - log4.htm should only be
loaded automatically when log3htm is in the opnener window. So pop up
and opnener parent do communicate.. but just not as I'd like them.
Anyone??
*&%$
Thnx 4 2026
JPL Verhey wrote: if (opener.locatio n.href="log3.ht m")
The comparison operator is "==", not "=".
{opener.locatio n.replace("log4 .htm")}
with *any* page in the opener window, it is replaced immediately with log4.htm when the pop up refreshes
The assignment you accidentally typed always evaluates to "true" since
you assign a string that's not the null string. In addition, the href
property will most likely contain more than "log3.htm" (protocol,
hostname, and path info), and you should look if the opener window is
still there:
if (
opener
&& !opener.closed
&& opener.location .replace
&& opener.location .href.match(/log3\.htm$/)
)
opener.location .replace("log4. htm");
ciao, dhgm
"kaeli" <ti******@NOSPA M.comcast.net> wrote in message
news:MP******** *************** *@nntp.lucent.c om... In article <42************ **********@drea der2.news.tisca li.nl>, ma************@ hotmail.com enlightened us with... <script> <!-- if (opener.locatio n.href="log3.ht m")
Fundamental error. = == The first assigns. The second compares. if (opener.locatio n.href=="log3.h tm")
Ok thanks! Wasn't aware of that.
The below works! Brilliant, thanks alot..
"Dietmar Meier" <us************ ***@innoline-systemtechnik.d e> wrote in
message news:37******** *****@individua l.net... JPL Verhey wrote:
if (opener.locatio n.href="log3.ht m")
The comparison operator is "==", not "=".
{opener.locatio n.replace("log4 .htm")}
with *any* page in the opener window, it is replaced immediately with log4.htm when the pop up refreshes
The assignment you accidentally typed always evaluates to "true" since you assign a string that's not the null string. In addition, the href property will most likely contain more than "log3.htm" (protocol, hostname, and path info), and you should look if the opener window is still there:
if ( opener && !opener.closed && opener.location .replace && opener.location .href.match(/log3\.htm$/) ) opener.location .replace("log4. htm");
ciao, dhgm This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Moon |
last post by:
Seems I still haven't got the hang of all those window generating code
in Javascript. I've got a page with about 15 photo thumbnails. When you
click on a thumbnail a new window pops up which shows the enlarged
version of said thumbnail. This works fine on all current browsers I've
tested.
However, in case I do not close the popup but click on another thumbnail
instead, only IE replaces the enlarged pic by the new one, Firebird and
Opera...
|
by: Shaun McKinnon |
last post by:
HI...Here's my problem...I have a popup window that loads when i want it to,
but it's not sized properly. I've set the size, but it doesn't seem to
work. I've been on 8 different websites to find out what i'm doing wrong,
and so far it seems i'm doing it the right way. Here's my code...any
suggestions would be appreciated.
<script language="javascript">
<!--
window.open("256fx/index.htm", "", "height=400, width=600");
//-->
|
by: Alex Shinn |
last post by:
I have a site which uses popup windows as a convenience in filling out
forms - you choose some data on the popup, click OK, and it sets data on
the parent windows form. This works fine in all major browsers and
platforms.
However, on Mac IE (OS 9 or 10, all versions), there is one situation
where this fails. If the parent window was itself launched as a popup,
and the parent window's parent was from a different domain than the
popup,...
|
by: Logger |
last post by:
Help, Want someone's option. I'm calling a popup screen, say form B, to
add/edit a record. In, say form A, I call form B using javascript
window.open in server side code. I need to know when I come back to form A
so I can refresh the screen from the database if a record was added or the
data changed that I'm displaying. My question is: What is the best way to
figure out when form b finishes and return to form A so that I can run this...
|
by: Thad |
last post by:
Any javascript I could try on this? I've got a popup window on my site
with the browser chrome removed. Another site's gone ahead and done a
popup to my same .html page. The visitor to that site doesn't realize
it unless he looks at the opener page's source code.
I'm wondering if there's a javascript solution for this? I've tried
using the window.opener.location.replace with the href being my
absolute URL, and triggered by an onUnload...
| |
by: Davey |
last post by:
I have a website which has a popup window (this only opens when the user
chooses to open it). In the popup window I have a <select> control which
lists a selection of "classes". Each class has a description and a class_id
(stored in the value attribute of each option). The user will then select a
class from the drop-down list.
What I want to do is have a control in the parent browser window which can
store the class_id and the...
|
by: Raed Sawalha |
last post by:
Dear :
In my web page I'm always checking the referer page if it was empty I do
something else also I do something :0).
the problem in my ASPX page client side I did a popup window, and when request
Request.ServerVariables is empty for the popup window, why?
thought the parent page ins (myPage.aspx).
how can I get the parent page of the popuped window?
|
by: jackson2005 |
last post by:
OK, I need to do three different things.
On the ONLOAD event I would like a popup box to open. In this popup
box I need two text boxes. One for the UserName and one for the
BillingTo name. After entering these two items the user can either hit
the enter key or press the submit button. The popup window will close
and then those two text boxes in the original webpage will be filled in
automatically.
I would like to have the two...
|
by: pandharinath |
last post by:
I want to display fields(row) selected from grid in popup window to textboxes in Opener window.
I have written code as follows :
Main Opener window
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("<script>popUp=window.open('SearchUser.aspx?master=NONSAP_ApplMaster&PAGETYPE=textbox&emp_id=" + txtEmpID.ClientID + "&emp_name=" + txtEmpName.Text.Trim() +...
|
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: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |