How to "reload" a child window?

D

DL

Ran a quick search on child window "reload" without satisfactory
result, hence, pose a question here.

The word, "reload" is not really accurate, what I'd like to do is,
upon certain event occurs at the child window, I'd like to call a
script (be it php, .NET, or ColdFusion) either with form elements or
URL with parameters. What is known, javascript variable for the child
window. Also, the parent window stays put.


How to?

Thank you.
 
L

Laser Lips

Ran a quick search on child window "reload" without satisfactory
result, hence, pose a question here.

The word, "reload" is not really accurate, what I'd like to do is,
upon certain event occurs at the child window, I'd like to call a
script (be it php, .NET, or ColdFusion)  either with form elements or
URL with parameters.  What is known, javascript variable for the child
window.  Also, the parent window stays put.

How to?

Thank you.

DL, if the event occurs in the child window and you want to content of
the PHP, .NET or ColdFusion to go into the child window then the child
window should be able to take care of itself by catching the event and
calling the PHP/.NET page itself. The parent need not intervene.

Graham Vincent
 
T

Thomas 'PointedEars' Lahn

DL said:
Ran a quick search on child window "reload" without satisfactory
result, hence, pose a question here.

The word, "reload" is not really accurate, what I'd like to do is,
upon certain event occurs at the child window, I'd like to call a
script (be it php, .NET, or ColdFusion) either with form elements or
URL with parameters. What is known, javascript variable for the child
window. Also, the parent window stays put.

How to?

Add event listeners to objects living in the "child window", either directly
or through the "javascript variable". You might lose the relation to the
"parent window" if you cause navigation there, though. Using frames in the
popup could help with this, but might introduce more problems as well.

I don't know what you mean be "call a script". Scripts are not called, they
are executed (in most cases: source code is JIT-compiled, and the resulting
byte code is interpreted). Scripts can generate content, if you mean that.


PointedEars
 
D

Don84

Add event listeners to objects living in the "child window", either directly
or through the "javascript variable".  You might lose the relation to the
"parent window" if you cause navigation there, though.  Using frames inthe
popup could help with this, but might introduce more problems as well.

I don't know what you mean be "call a script".  Scripts are not called,they
are executed (in most cases: source code is JIT-compiled, and the resulting
byte code is interpreted).  Scripts can generate content, if you mean that.

PointedEars
--
    realism:    HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness:    XHTML 1.1 as application/xhtml+xml
                                                    -- Bjoern Hoehrmann

You're right on the loose use of terminology by me, yes, to execute a
script, not call a script in this case. I attempted to use something
like onclick="self.location='scriptForSmallWindow.php';">stay in the
same small window</a>
to no avail, nor self.document.location ...

or through the "javascript variable". Pls tell me more about it.
Thanks.
 
T

Thomas 'PointedEars' Lahn

Don84 said:
Thomas said:
DL said:
Ran a quick search on child window "reload" without satisfactory
result, hence, pose a question here.
The word, "reload" is not really accurate, what I'd like to do is,
upon certain event occurs at the child window, I'd like to call a
script (be it php, .NET, or ColdFusion) either with form elements or
URL with parameters. What is known, javascript variable for the child
window. Also, the parent window stays put.
How to?
Add event listeners to objects living in the "child window", either directly
or through the "javascript variable". You might lose the relation to the
"parent window" if you cause navigation there, though. Using frames in the
popup could help with this, but might introduce more problems as well.

I don't know what you mean be "call a script". Scripts are not called, they
are executed (in most cases: source code is JIT-compiled, and the resulting
byte code is interpreted). Scripts can generate content, if you mean that.

[snip signatures]

Learn to quote.
You're right on the loose use of terminology by me, yes, to execute a
script, not call a script in this case. I attempted to use something
like onclick="self.location='scriptForSmallWindow.php';">stay in the
same small window</a>
to no avail, nor self.document.location ...

or through the "javascript variable". Pls tell me more about it.
Thanks.

<http://www.catb.org/~esr/faqs/smart-questions.html>
 
D

Don84

Don84 said:
Thomas said:
DL wrote:
Ran a quick search on child window "reload" without satisfactory
result, hence, pose a question here.
The word, "reload" is not really accurate, what I'd like to do is,
upon certain event occurs at the child window, I'd like to call a
script (be it php, .NET, or ColdFusion)  either with form elements or
URL with parameters.  What is known, javascript variable for the child
window.  Also, the parent window stays put.
How to?
Add event listeners to objects living in the "child window", either directly
or through the "javascript variable".  You might lose the relation to the
"parent window" if you cause navigation there, though.  Using framesin the
popup could help with this, but might introduce more problems as well.
I don't know what you mean be "call a script".  Scripts are not called, they
are executed (in most cases: source code is JIT-compiled, and the resulting
byte code is interpreted).  Scripts can generate content, if you mean that.
[snip signatures]

Learn to quote.
You're right on the loose use of terminology by me, yes, to execute a
script, not call a script in this case.  I attempted to use something
like onclick="self.location='scriptForSmallWindow.php';">stay in the
same small window</a>
to no avail, nor self.document.location ...
or through the "javascript variable".  Pls tell me more about it.
Thanks.

<http://www.catb.org/~esr/faqs/smart-questions.html>- Hide quoted text -

- Show quoted text -

You either understand the question, know an answer and is willing to
chip in or **** off!
Had enough of your crap!
 
S

SAM

Le 7/3/09 4:58 PM, Don84 a écrit :
I attempted to use something
like onclick="self.location='scriptForSmallWindow.php';">stay in the
same small window</a>
to no avail, nor self.document.location ...

You don't need 'self' if the link is in the child (popup),
onclick="location='scriptForSmallWindow.php';">
would have to do the job
(open in same window (here the popup) the php file)
or through the "javascript variable". Pls tell me more about it.
Thanks.

as said above, it is not certain that the child window will still
remember its opener (the mother) so it will be probably better to use a
function set in the mother page.

onclick="opener.sendChild('scriptForSmallWindow.php');"

mother's JS :
=============
function sendChild(url) {
window.open(url,'theChild','width=300,height=300');
}

<https://developer.mozilla.org/en/DOM/window.open>


The "javascript variable" (example) :

JS :
====
var choice;
function setChoice(what) {
choice = what.value;
}

HTML :
======
<form>
<input type=radio name="art" value="01" onclick="setChoice(this)"> art.01
<input type=radio name="art" value="02" onclick="setChoice(this)"> art.02
<input type=radio name="art" value="03" onclick="setChoice(this)"> art.03
</form>
<button onclick="opener.sendChild('query.php?art='+choice);">go</button>
 
T

Thomas 'PointedEars' Lahn

Don84 said:
You either understand the question, know an answer and is willing to
chip in or **** off!

Is any of your postings supposed to make any sense at all?
Had enough of your crap!

Likewise.


PointedEars
 
D

Don84

Le 7/3/09 4:58 PM, Don84 a écrit :






You don't need 'self' if the link is in the child (popup),
     onclick="location='scriptForSmallWindow.php';">
would have to do the job
(open in same window (here the popup) the php file)

Sorry, I forgot to mention. I'm using Ext window class for windows
management. Within this context, the above
onclick="location='scriptForSmallWindow.php';"> at child window level
goes back to the parent window.
as said above, it is not certain that the child window will still
remember its opener (the mother) so it will be probably better to use a
function set in the mother page.

    onclick="opener.sendChild('scriptForSmallWindow.php');"

mother's JS :
=============
function sendChild(url) {
window.open(url,'theChild','width=300,height=300');

}

<https://developer.mozilla.org/en/DOM/window.open>

The "javascript variable" (example) :

JS :
====
var choice;
function setChoice(what) {
choice = what.value;

}

HTML :
======
<form>
<input type=radio name="art" value="01" onclick="setChoice(this)"> art.01
<input type=radio name="art" value="02" onclick="setChoice(this)"> art.02
<input type=radio name="art" value="03" onclick="setChoice(this)"> art.03
</form>
<button onclick="opener.sendChild('query.php?art='+choice);">go</button>

Within the ext window context, I preloaded the two windows, default
diplays the Main window,
on click event for the small window, it then displays and floating
over the main one...

Thanks.
 
D

Don84

Is any of your postings supposed to make any sense at all?


Likewise.

PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee-Hide quoted text -

- Show quoted text -

I've said, **** off, asshole! You are NOT the only one who knows
javascripting real well, try to be born again by a human mother again,
asshole!
 
T

Thomas 'PointedEars' Lahn

Don84 said:
Thomas said:
Don84 said:
Thomas 'PointedEars' Lahn wrote:
Don84 wrote:
[gibberish]
<http://www.catb.org/~esr/faqs/smart-questions.html>
You either understand the question, know an answer and is willing to
chip in or **** off!
Is any of your postings supposed to make any sense at all?
Had enough of your crap!
Likewise.
[...]

I've said, **** off, asshole! You are NOT the only one who knows
javascripting real well, try to be born again by a human mother again,
asshole!

Well, you certainly can't seem to get enough of my "crap", and to show off
your "intelligence". So maybe, just maybe, the problem is with *you* instead?


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top