HighDots Forums  

Change new window from opening window

Javascript JavaScript language (comp.lang.javascript)


Discuss Change new window from opening window in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Joe Sent Me
 
Posts: n/a

Default Change new window from opening window - 01-20-2008 , 11:15 AM






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

<area
href="javascript:tour('newwindow.htm','_blank','sc rollbars=yes,resizable=1,width=780,height=550,top= 0,left=0')"
onclick="javascript:setTimeout('changenewone()', 800)" shape="rect"
coords="9, 29, 44, 69">

<script type="text/javascript" src="id1.js">
function changenewone() {
window.location.newemail1.HideContent('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.

Reply With Quote
  #2  
Old   
Doug Gunnoe
 
Posts: n/a

Default Re: Change new window from opening window - 01-20-2008 , 04:45 PM






On Jan 20, 10:15*am, Joe Sent Me <greend... (AT) jimlowe (DOT) net> wrote:
Quote:
I have opened a new window and now want to change something in the
newly opened window. I am doing this.......

area
href="javascript:tour('newwindow.htm','_blank','sc rollbars=yes,resizable=1,*width=780,height=550,top =0,left=0')"
onclick="javascript:setTimeout('changenewone()', 800)" shape="rect"
coords="9, 29, 44, 69"

script type="text/javascript" src="id1.js"
function changenewone() {
window.location.newemail1.HideContent('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('newwindow.htm', blah, blah, ....)

And then with someWin you can manipulate the window.


Reply With Quote
  #3  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: Change new window from opening window - 01-20-2008 , 05:19 PM



Doug Gunnoe wrote:
Quote:
On Jan 20, 10:15 am, Joe Sent Me <greend... (AT) jimlowe (DOT) net> wrote:
I have opened a new window and now want to change something in the
newly opened window. I am doing this.......

area
href="javascript:tour('newwindow.htm','_blank','sc rollbars=yes,resizable=1,*width=780,height=550,top =0,left=0')"
onclick="javascript:setTimeout('changenewone()', 800)" shape="rect"
coords="9, 29, 44, 69"
[...]
And with the onclick event, you don't need 'javascript:'
`onclick' event _handler attribute_, or _`click'_ event.

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

typically you would do something like:
var someWin = window.open('newwindow.htm', blah, blah, ....)
It should be noted that window.open() universally supports three arguments
at most.[1] This is important because some people have got the idea that
the comma-separated string value of the third argument constitutes more of
them; they do not use the string delimiters and wonder what they did wrong.

[1] The MSHTML DOM supports four, with the fourth being a boolean value
to determine whether the first parameter's URL reference should
replace the history entry for that window or not, in case the window
is reused. http://msdn2.microsoft.com/en-us/lib...51(VS.85).aspx


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


Reply With Quote
  #4  
Old   
Doug Gunnoe
 
Posts: n/a

Default Re: Change new window from opening window - 01-21-2008 , 08:48 AM



On Jan 20, 4:19*pm, Thomas 'PointedEars' Lahn <PointedE... (AT) web (DOT) de>
wrote:
Quote:
It should be noted that window.open() universally supports three arguments
at most.[1] *This is important because some people have got the idea that
the comma-separated string value of the third argument constitutes more of
them; they do not use the string delimiters and wonder what they did wrong..

[1] The MSHTML DOM supports four, with the fourth being a boolean value
* * to determine whether the first parameter's URL reference should
* * replace the history entry for that window or not, in case the window
* * is reused.http://msdn2.microsoft.com/en-us/lib...1(VS.85)..aspx

PointedEars
--
And the third param is optional.


Reply With Quote
  #5  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: Change new window from opening window - 01-21-2008 , 01:01 PM



Doug Gunnoe wrote:
Quote:
[...] Thomas 'PointedEars' Lahn [...] wrote:
It should be noted that window.open() universally supports three arguments
at most.[1] This is important because some people have got the idea that
the comma-separated string value of the third argument constitutes more of
them; they do not use the string delimiters and wonder what they did wrong.

[1] The MSHTML DOM supports four, with the fourth being a boolean value
to determine whether the first parameter's URL reference should
replace the history entry for that window or not, in case the window
is reused.http://msdn2.microsoft.com/en-us/lib...51(VS.85).aspx
[...]

And the third param is optional.
All arguments are optional.

Please don't quote signatures, unless you refer to them.


PointedEars


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.