Reloading a Parent Page from it's Child 
Author Message
 Reloading a Parent Page from it's Child

There is a parent page which has a button ('Select Background') that
brings up a child page that contains an array of selectable background
images.  Clicking on an image will cause the parent page to be reloaded
with the selected background.  The information is sent to the parent as
a querystring containing the image number. The child page remains
visible.  Here's the problem- The parent page has two text areas (a
letter subject and body) that is cleared when the page is reloaded.  If
the user types text into the text areas before the background image is
selected, the text disappears.  How can I preserve the text?

Sent via Deja.com
http://www.*-*-*.com/



Tue, 17 Jun 2003 15:03:58 GMT  
 Reloading a Parent Page from it's Child
Rather than refresh the entire page, work out the complete url for the
parent window's background image with code in the child window.  Then update
the parent window's body.background property with the new image url...

BACKGROUND Attribute | background Property
http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/...
und_1.asp

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> There is a parent page which has a button ('Select Background') that
> brings up a child page that contains an array of selectable background
> images.  Clicking on an image will cause the parent page to be reloaded
> with the selected background.  The information is sent to the parent as
> a querystring containing the image number. The child page remains
> visible.  Here's the problem- The parent page has two text areas (a
> letter subject and body) that is cleared when the page is reloaded.  If
> the user types text into the text areas before the background image is
> selected, the text disappears.  How can I preserve the text?

> Sent via Deja.com
> http://www.deja.com/



Tue, 17 Jun 2003 15:29:28 GMT  
 Reloading a Parent Page from it's Child
Thanks.  This working great in IE but it's not working in NN.  Should
it be?  I'm on a 4.x version.  Will I have to implement it another way
in NN?  Is there a document you can recommend that describes the
differences?  It seems to be a never ending battle, developing for one
browser and then trying it in another, and having to re-architect what
you've done.



Quote:
> Rather than refresh the entire page, work out the complete url for the
> parent window's background image with code in the child window.  Then
update
> the parent window's body.background property with the new image url...

> BACKGROUND Attribute | background Property

http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/bac
kgro
Quote:
> und_1.asp

> --
> Michael Harris
> Microsoft.MVP.Scripting
> --

> Please do not email questions - post them to the newsgroup instead.
> --




Quote:
> > There is a parent page which has a button ('Select Background') that
> > brings up a child page that contains an array of selectable
background
> > images.  Clicking on an image will cause the parent page to be
reloaded
> > with the selected background.  The information is sent to the
parent as
> > a querystring containing the image number. The child page remains
> > visible.  Here's the problem- The parent page has two text areas (a
> > letter subject and body) that is cleared when the page is
reloaded.  If
> > the user types text into the text areas before the background image
is
> > selected, the text disappears.  How can I preserve the text?

> > Sent via Deja.com
> > http://www.deja.com/

Sent via Deja.com
http://www.deja.com/


Wed, 18 Jun 2003 05:21:41 GMT  
 Reloading a Parent Page from it's Child
You posted in a VBScript newsgroup...  There was no reason to assume you
needed something that would work in NN (NN doesn't do VBScript and I don't
do NN ;-)...

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> Thanks.  This working great in IE but it's not working in NN.  Should
> it be?  I'm on a 4.x version.  Will I have to implement it another way
> in NN?  Is there a document you can recommend that describes the
> differences?  It seems to be a never ending battle, developing for one
> browser and then trying it in another, and having to re-architect what
> you've done.



> > Rather than refresh the entire page, work out the complete url for the
> > parent window's background image with code in the child window.  Then
> update
> > the parent window's body.background property with the new image url...

> > BACKGROUND Attribute | background Property

> http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/bac
> kgro
> > und_1.asp

> > --
> > Michael Harris
> > Microsoft.MVP.Scripting
> > --

> > Please do not email questions - post them to the newsgroup instead.
> > --



> > > There is a parent page which has a button ('Select Background') that
> > > brings up a child page that contains an array of selectable
> background
> > > images.  Clicking on an image will cause the parent page to be
> reloaded
> > > with the selected background.  The information is sent to the
> parent as
> > > a querystring containing the image number. The child page remains
> > > visible.  Here's the problem- The parent page has two text areas (a
> > > letter subject and body) that is cleared when the page is
> reloaded.  If
> > > the user types text into the text areas before the background image
> is
> > > selected, the text disappears.  How can I preserve the text?

> > > Sent via Deja.com
> > > http://www.deja.com/

> Sent via Deja.com
> http://www.deja.com/



Wed, 18 Jun 2003 09:17:45 GMT  
 Reloading a Parent Page from it's Child
OK, let's talk IE.  Changing the backgound image in the parent table
from the child works fine.  But when a dark image is displayed, you
can't see the dark text.  I know the text color I want to associate
with each image, but how do I tell the text in the parent table to
change color?



Quote:
> You posted in a vbscript newsgroup...  There was no reason to assume
you
> needed something that would work in NN (NN doesn't do VBScript and I
don't
> do NN ;-)...

> --
> Michael Harris
> Microsoft.MVP.Scripting
> --

> Please do not email questions - post them to the newsgroup instead.
> --




Quote:
> > Thanks.  This working great in IE but it's not working in NN.
Should
> > it be?  I'm on a 4.x version.  Will I have to implement it another
way
> > in NN?  Is there a document you can recommend that describes the
> > differences?  It seems to be a never ending battle, developing for
one
> > browser and then trying it in another, and having to re-architect
what
> > you've done.



> > > Rather than refresh the entire page, work out the complete url
for the
> > > parent window's background image with code in the child window.
Then
> > update
> > > the parent window's body.background property with the new image
url...

> > > BACKGROUND Attribute | background Property

http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/bac

- Show quoted text -

Quote:
> > kgro
> > > und_1.asp

> > > --
> > > Michael Harris
> > > Microsoft.MVP.Scripting
> > > --

> > > Please do not email questions - post them to the newsgroup
instead.
> > > --



> > > > There is a parent page which has a button ('Select Background')
that
> > > > brings up a child page that contains an array of selectable
> > background
> > > > images.  Clicking on an image will cause the parent page to be
> > reloaded
> > > > with the selected background.  The information is sent to the
> > parent as
> > > > a querystring containing the image number. The child page
remains
> > > > visible.  Here's the problem- The parent page has two text
areas (a
> > > > letter subject and body) that is cleared when the page is
> > reloaded.  If
> > > > the user types text into the text areas before the background
image
> > is
> > > > selected, the text disappears.  How can I preserve the text?

> > > > Sent via Deja.com
> > > > http://www.deja.com/

> > Sent via Deja.com
> > http://www.deja.com/

Sent via Deja.com
http://www.deja.com/


Wed, 18 Jun 2003 12:39:05 GMT  
 Reloading a Parent Page from it's Child
Assuming opener is your reference to the parent window and that the table
has an id of "mytable"...

opener.mytable.style.color = "white"
opener.mytable.style.color = "#FFFFFF"

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> OK, let's talk IE.  Changing the backgound image in the parent table
> from the child works fine.  But when a dark image is displayed, you
> can't see the dark text.  I know the text color I want to associate
> with each image, but how do I tell the text in the parent table to
> change color?



> > You posted in a vbscript newsgroup...  There was no reason to assume
> you
> > needed something that would work in NN (NN doesn't do VBScript and I
> don't
> > do NN ;-)...

> > --
> > Michael Harris
> > Microsoft.MVP.Scripting
> > --

> > Please do not email questions - post them to the newsgroup instead.
> > --



> > > Thanks.  This working great in IE but it's not working in NN.
> Should
> > > it be?  I'm on a 4.x version.  Will I have to implement it another
> way
> > > in NN?  Is there a document you can recommend that describes the
> > > differences?  It seems to be a never ending battle, developing for
> one
> > > browser and then trying it in another, and having to re-architect
> what
> > > you've done.



> > > > Rather than refresh the entire page, work out the complete url
> for the
> > > > parent window's background image with code in the child window.
> Then
> > > update
> > > > the parent window's body.background property with the new image
> url...

> > > > BACKGROUND Attribute | background Property

> http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/bac
> > > kgro
> > > > und_1.asp

> > > > --
> > > > Michael Harris
> > > > Microsoft.MVP.Scripting
> > > > --

> > > > Please do not email questions - post them to the newsgroup
> instead.
> > > > --



> > > > > There is a parent page which has a button ('Select Background')
> that
> > > > > brings up a child page that contains an array of selectable
> > > background
> > > > > images.  Clicking on an image will cause the parent page to be
> > > reloaded
> > > > > with the selected background.  The information is sent to the
> > > parent as
> > > > > a querystring containing the image number. The child page
> remains
> > > > > visible.  Here's the problem- The parent page has two text
> areas (a
> > > > > letter subject and body) that is cleared when the page is
> > > reloaded.  If
> > > > > the user types text into the text areas before the background
> image
> > > is
> > > > > selected, the text disappears.  How can I preserve the text?

> > > > > Sent via Deja.com
> > > > > http://www.deja.com/

> > > Sent via Deja.com
> > > http://www.deja.com/

> Sent via Deja.com
> http://www.deja.com/



Thu, 19 Jun 2003 07:40:18 GMT  
 Reloading a Parent Page from it's Child
Thanks.  I had tried this but I also specified a font color in my HTML
code as a default and also tried it as a style.  It appears that doing
that would over-ride any color I tried to set from the child window.  I
since removed the font and/or style from inside the body at each place
I had text, and put in as a default in the Body tag instead and it
seems to work.  Is this the behavior I should expect?



Quote:
> Assuming opener is your reference to the parent window and that the
table
> has an id of "mytable"...

> opener.mytable.style.color = "white"
> opener.mytable.style.color = "#FFFFFF"

> --
> Michael Harris
> Microsoft.MVP.Scripting
> --

> Please do not email questions - post them to the newsgroup instead.
> --




- Show quoted text -

Quote:
> > OK, let's talk IE.  Changing the backgound image in the parent table
> > from the child works fine.  But when a dark image is displayed, you
> > can't see the dark text.  I know the text color I want to associate
> > with each image, but how do I tell the text in the parent table to
> > change color?



> > > You posted in a vbscript newsgroup...  There was no reason to
assume
> > you
> > > needed something that would work in NN (NN doesn't do VBScript
and I
> > don't
> > > do NN ;-)...

> > > --
> > > Michael Harris
> > > Microsoft.MVP.Scripting
> > > --

> > > Please do not email questions - post them to the newsgroup
instead.
> > > --



> > > > Thanks.  This working great in IE but it's not working in NN.
> > Should
> > > > it be?  I'm on a 4.x version.  Will I have to implement it
another
> > way
> > > > in NN?  Is there a document you can recommend that describes the
> > > > differences?  It seems to be a never ending battle, developing
for
> > one
> > > > browser and then trying it in another, and having to re-
architect
> > what
> > > > you've done.



> > > > > Rather than refresh the entire page, work out the complete url
> > for the
> > > > > parent window's background image with code in the child
window.
> > Then
> > > > update
> > > > > the parent window's body.background property with the new
image
> > url...

> > > > > BACKGROUND Attribute | background Property

http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/bac

- Show quoted text -

Quote:
> > > > kgro
> > > > > und_1.asp

> > > > > --
> > > > > Michael Harris
> > > > > Microsoft.MVP.Scripting
> > > > > --

> > > > > Please do not email questions - post them to the newsgroup
> > instead.
> > > > > --



> > > > > > There is a parent page which has a button ('Select
Background')
> > that
> > > > > > brings up a child page that contains an array of selectable
> > > > background
> > > > > > images.  Clicking on an image will cause the parent page to
be
> > > > reloaded
> > > > > > with the selected background.  The information is sent to
the
> > > > parent as
> > > > > > a querystring containing the image number. The child page
> > remains
> > > > > > visible.  Here's the problem- The parent page has two text
> > areas (a
> > > > > > letter subject and body) that is cleared when the page is
> > > > reloaded.  If
> > > > > > the user types text into the text areas before the
background
> > image
> > > > is
> > > > > > selected, the text disappears.  How can I preserve the text?

> > > > > > Sent via Deja.com
> > > > > > http://www.deja.com/

> > > > Sent via Deja.com
> > > > http://www.deja.com/

> > Sent via Deja.com
> > http://www.deja.com/

Sent via Deja.com
http://www.deja.com/


Sat, 21 Jun 2003 04:58:38 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Child Window can't talk to parent window -- or vice versa

2. help, I can't create an array from child window in parent window

3. Child Form Can't Update Parent...

4. MDI child form is moving down from it's parent

5. How can I find the Hwnd number of a parent's child window

6. TreeView Drag n Drop don't allow dropping a parent into a child

7. VB5: Crystal Reports child-window haven't title in MDI-parent form

8. MDI Child's Parent window

9. Parents and their Children's Events (WM_MDIACTIVATE)

10. Help: Change a MDI child's parent MDI form at run-time

11. How can I find the Hwnd number of a parent's child window

12. Move activex dll child on a MDI parent parent window

 

 
Powered by phpBB® Forum Software