Change new window from opening window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Joe Sent Me

    Change new window from opening window

    I have opened a new window and now want to change something in the
    newly opened window. I am doing this.......

    <area
    href="javascrip t:tour('newwind ow.htm','_blank ','scrollbars=y es,resizable=1, width=780,heigh t=550,top=0,lef t=0')"
    onclick="javasc ript:setTimeout ('changenewone( )', 800)" shape="rect"
    coords="9, 29, 44, 69">

    <script type="text/javascript" src="id1.js">
    function changenewone() {
    window.location .newemail1.Hide Content('id1');
    </script>

    I have named the new window "newemail1. " I used a time delay hoping
    that the new window would have time to open and then the attributes
    could be accessed. I'm not targeting the new window correctly, I
    suppose. What would be the correct way to do this? I am getting an
    "object expected" error. Any help is appreciated.
  • Doug Gunnoe

    #2
    Re: Change new window from opening window

    On Jan 20, 10:15 am, Joe Sent Me <greend...@jiml owe.netwrote:
    I have opened a new window and now want to change something in the
    newly opened window. I am doing this.......
    >
    <area
    href="javascrip t:tour('newwind ow.htm','_blank ','scrollbars=y es,resizable=1, ­width=780,heig ht=550,top=0,le ft=0')"
    onclick="javasc ript:setTimeout ('changenewone( )', 800)" shape="rect"
    coords="9, 29, 44, 69">
    >
    <script type="text/javascript" src="id1.js">
    function changenewone() {
    window.location .newemail1.Hide Content('id1');
    </script>
    >
    I have named the new window "newemail1. " I used a time delay hoping
    that the new window would have time to open and then the attributes
    could be accessed. I'm not targeting the new window correctly, I
    suppose. What would be the correct way to do this? I am getting an
    "object expected" error. Any help is appreciated.
    What is 'tour'? What is 'HideContent'? What is 'newemaill'?

    And with the onclick event, you don't need 'javascript:'

    How do you reference your new window after you created it?

    typically you would do something like:
    var someWin = window.open('ne wwindow.htm', blah, blah, ....)

    And then with someWin you can manipulate the window.

    Comment

    • SAM

      #3
      Re: Change new window from opening window

      Joe Sent Me a écrit :
      I have opened a new window and now want to change something in the
      newly opened window. I am doing this.......
      <html>
      <script type="text/javascript">

      function pop() {
      if(typeof foo == 'undefined' || foo.closed)
      foo=window.open ('','myTarget', 'width=500,heig ht=400');
      foo.focus();
      }

      function changePop(what) {
      if(typeof foo == 'undefined' || foo.closed)
      pop();
      foo.location = what;
      foo.focus();
      return false;
      }
      </script>

      <a href="myPage.ht m" target="myTarge t" onclick="pop(); ">
      My Page</a(simple example 1)<br>
      <a href="#" onclick="return changePop('page 2.htm')">
      Page #2</a(change page in popup - example 2)
      </html>

      --
      sm

      Comment

      Working...