Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Javascript object editing
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedJavascript object editing

 Post Reply Post Reply
Author
ub3rl337ch3ch View Drop Down
Senior Member
Senior Member
Avatar

Joined: 16 February 2005
Location: Australia
Status: Offline
Points: 341
Direct Link To This Post Topic: Javascript object editing
    Posted: 04 April 2005 at 1:44am
I know that the properties of an object can be edited by using javascript, along the lines of window.document.form.field.value="blah"
but i was wondering whether it is possible to alter to properties of an object in another window? along the lines of maybe computer.window2.form.field.value="blah" or is window the highest level js can go to?
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Direct Link To This Post Posted: 04 April 2005 at 5:54am
i believe you can set window to anything that is a window

so self.document.form.element1.value = "blahh"

does the windoiw it is in

TopNav.document.form.eleement1.value="blahh"

that would look in a window called TopNav


Edited by dj air - 04 April 2005 at 5:54am
Back to Top
ub3rl337ch3ch View Drop Down
Senior Member
Senior Member
Avatar

Joined: 16 February 2005
Location: Australia
Status: Offline
Points: 341
Direct Link To This Post Posted: 04 April 2005 at 6:43pm

how do you determine what a window is called? is it the name of the file open in that window?

Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Direct Link To This Post Posted: 04 April 2005 at 7:47pm
within the frame set you set a name to each frame window.



<frameset rows="200,*,63" cols="710" frameborder="NO" border="0" framespacing="0">
  <frame src="/Templates/top.asp" name="topFrame" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0" >
  <frameset rows="*" cols="*,100,510,100,*" framespacing="0" frameborder="NO" border="0">
    <frame src="/Templates/blank.asp" name="blank1" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0"> 
    <frame src="/Templates/side_bars.asp" name="leftFrame" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0">
    <frame src="/display.asp" name="Display" frameborder="no" noresize marginwidth="0" marginheight="0" id="Display">
   
     <frame src="/Templates/side_bars.asp" name="leftFrame" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0">
         <frame src="/Templates/blank.asp" name="blank 2" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0">
  </frameset>
  <frameset rows="55" cols="*,710,*" frameborder="NO" border="0" framespacing="0">
           <frame src="/Templates/blank.asp" name="BottomBlank1" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0">
    <frame src="/Templates/bottom.asp" name="BottomFrame" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0" >
           <frame src="/Templates/blank.asp" name="BottomBlank2" frameborder="no" scrolling="NO" noresize marginwidth="0" marginheight="0">
</frameset>
</frameset>
<noframes>
<body>
</body></noframes>


in the above code we have the name tag each name tag is a window so to launch/do something in those windows you put the name of the window for example BottomBlank2


also you can name pop up windows when they are created to launch script within them

or you can focus on a window that opened that window using window.opener.focus or another command
Back to Top
ub3rl337ch3ch View Drop Down
Senior Member
Senior Member
Avatar

Joined: 16 February 2005
Location: Australia
Status: Offline
Points: 341
Direct Link To This Post Posted: 04 April 2005 at 8:14pm
so:
I have window1 which uses js to open window 2
window1 contains a form called form1 and a field called field1
i want to call this field from window 2
 
would i go "window.opener.focus.form1.field1"?
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Direct Link To This Post Posted: 05 April 2005 at 5:28am
I think it's something like parent.form or something.  Lookup 'Javascript Parent Window Forms' on Google or something like that.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.