SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Pause function?

Hybrid View

  1. #1
    SitePoint Zealot jstraathof's Avatar
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pause function?

    Hi,

    This function opens a popup which returns an value,
    the only problem is that the script should wait till
    the focus returns to that page.

    function createInternalLink()
    {
    var retval;
    window.open("<?PHP print("URL"); ?>",'selInternalLink','toolbar=no,menubar=no,resizable=no,scrollbars=yes,status=no,titlebar=no,location=no,width=350,height=350');
    !-- IT SHOULD WAIT HERE ! --!
    idContent.focus();
    var sel=idContent.document.selection.createRange();
    if ((retval!=null) && (retval!="undefined")) {
    sel.pasteHTML(""+retval+"");
    sel.select();
    }

    How can I implement this?
    It executes in right away now,
    so I should include on return or something like
    that, your help is appreciated !

  2. #2
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Judging from your use of the IE-only .pasteHTML() method, you're not after a cross-browser solution, in which case you can use the window.showModalDialog() method - read up on it here.
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!


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
  •