SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: naming windows

Hybrid View

  1. #1
    SitePoint Zealot honging's Avatar
    Join Date
    Jan 2001
    Location
    Chapel Hill, NC
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    naming windows

    I'm having a slight problem with javascript. this isn't my strong point so i'm hoping one of you can help me...

    i'm using a chromeless popup window... i have a link within the popup that i want to target back to the main page (the page that launched the pop-up). i tried to do the self.name = "main"; as a part of the script but that failed. is there any easy way to "name" that large launching window so i can easily target links back to it?

    thanks

  2. #2
    SitePoint Addict
    Join Date
    May 2000
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To refer back to the window that launched the Popup window use the term "opener". You could target the links like this using JavaScript:
    opener.location="some_page.html"

    Or you could perform a function in the main (opener) like this:
    opener.function_name()

    and even populate a variable or form field like this:
    opener.variable_name="Some value"
    opener.document.form_name.field_name.value="some value"

    Hope that helps.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •