call an external function ????

Results 1 to 3 of 3

Thread: call an external function ????

  1. #1
    fl1rt Guest

    Default call an external function ????

    is it possible to call a javascript function from a main window to a child &#124 popup window where the function is stored and return the result to the main window?<BR><BR>communicating the other way around should be easy enough with the window.opener command<BR><BR>eg:<BR>main.asp.....<BR>&#060;img src="whatever.gif" onClick="javascript:window.popup.cMB_Button()" height=18 width=18 alt="" border=0&#062;<BR><BR>where clicking the image would call the function "cMB_Button()" in the separate pop-up window.<BR> <BR>any takers ? or is this impossible?

  2. #2
    jason Guest

    Default RE: call an external function ????

    when you open the new window, give it a reference, eg<BR><BR>mynewin = you need to access this variable from outside the function that opens the window, make sure your variable scope is global (more info - aticle name &#039writing killer code&#039)<BR><BR>this allows you to access the new window with mynewwin.function(), as if you were accessing any other function <BR><BR>jason<BR>infinitemonkeys

  3. #3
    fl1rt Guest

    Default RE: call an external function ????

    thanks for that.<BR>I had solved my problem by using the querystring to pass info into the popup and post back with the window.opener function

Posting Permissions

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