Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to refer to new window using javascript

 
Karishma Kuriachan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to open a new window(having same url as parent window )from the parent window with header and footer disabled. So I need the control of the new window before it is fully loaded so that I can disable header and footer of new window from the parent window. Can you please suggest some solutions for this problem.
 
amit pandit
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey

what do you mean by
header and footer disabled ??

can you give some explaination

Amit Pandit
 
Karishma Kuriachan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
What I meant by header and footer disabled is I need the new window with some filelds not present. In my parent window I will have some secondary navigation,left navigation and footer and I dont want to see it in the new window. SO I need to disable these fields before I get the new window keeping parent window not affected(ie it should be as same as earlier).
 
amit pandit
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is your secondary navigation and footer display code on a web page ?
If yes, then how can you enable or disable it?

I guess, it is done by some conditional arguments on PageLoad() event.
so by checking some page properties like title, you can distinguish between parent window and child window.
and according to that on PageLoad() event you can enable or disable your code stuff.

if my answer is not up to mark, please ask your question with some code to undestand your problem correctly.

bye
Amit Pandit
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, much like your other post about opening windows, you can set variables on the child window before the child page loads:

The child can manipulate the visibility of divs based on window.showFooter. Hmmm, I'm not sure how or where to do that so you don't see the visibility change.
 
Karishma Kuriachan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Actually the problem is that i don't get showFooter element of child in the parent window unless the page is completeley loaded.....
code:
---------------------------------------------------------------------------

var child = open(...);
/* say here if you try to get getElementById("showFooter").. will return a null value..*/
child.showFooter = false;

---------------------------------------------------------------------------
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don;t you pass the values in as querystrings and have the server read the querystring value and hide the elements automatically?

Eric
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Much, better than my suggestion. Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic