SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Jul 2001
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Calling a function in one window from another

    Hello all,

    I've improved the vbcode.js script for this forum software.(vBulletin) The impovement is, when you add a smilie or vbcode it is added at the point where the cursor is instead of at the end of previously written text.(only works with IE)

    Here's my problem. When the user clicks on a smilie in the get more smilies popwindow, it calls the function created in the newly opened window instead of my enhanced function in the original window. How can I get the links in the small popup window to call the function in the original window and pass the smilie code to it also? It must be possible or are all objects of one window totally seperate from the other?

    Scott

  2. #2
    JavaScript Guru (Big Ego) Arielladog's Avatar
    Join Date
    Jul 1999
    Location
    SC, USA
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey scamo,

    I was going to improve the VB interface myself, but I found out you can't get the selected text in a text area in Netscape. Anyway, just go:

    window.opener.functionName(arguments)

    For instance:

    window.opener.smilie('')

    aDog

  3. #3
    JavaScript Guru (Big Ego) Arielladog's Avatar
    Join Date
    Jul 1999
    Location
    SC, USA
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  4. #4
    SitePoint Member
    Join Date
    Jul 2001
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep, your right! Vinny was really fast. And his tip helped. Thanx anyway.

    Scott


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
  •