Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: how to open new DHTML Window from DHTML Window

  1. #1
    Join Date
    Oct 2010
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default how to open new DHTML Window from DHTML Window

    1) Script Title:

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ndow/index.htm
    3) Describe problem:
    how to open new DHTML Window from other DHTML Window

    thank you
    Last edited by jscheuer1; 10-17-2010 at 04:31 PM. Reason: fix broken link

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    From the demo page Step 2 with modifications highlighted:

    Code:
    parent.uniquevar=parent.dhtmlwindow.open(uniqueID, contenttype, contentsource, title, attributes, [recalonload])
    Code:
    <script type="text/javascript">
    parent.googlewin=parent.dhtmlwindow.open("googlebox", "iframe", "http://google.com", "Google Web site", "width=700px,height=450px,resize=1,scrolling=1,center=1", "recal")
    </script>
    or:

    Code:
    <a href="#" onClick="parent.ajaxwin=parent.dhtmlwindow.open('ajaxbox', 'ajax', 'external.htm', 'Ajax Win Title', 'width=650px,height=400px,left=300px,top=100px,resize=0,scrolling=1'); return false">Create/ Open Ajax Window</a>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Oct 2010
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    yes but it is opened in the same iframe i would like to open it in new iframe

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Make sure you use a unique variable and a unique id, not one you already used on the top page.

    If you want more help:

    Please post a link to a page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Oct 2010
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default site adress

    jplus.hit.bg

    double click on text box under DEBIT
    i want the new whtml window to be opened in new frame not in the same

    thank you

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I tried your link and got (with www.jplus.hit.bg and just jplus.hit.bg):

    Could not connect to remote server
    both last night and again today. Let me know when the server is back up.

    Or, if it is up, there must be some other problem in my connecting to it. I did a whois on hit.bg and got:

    DOMAIN NAME: hit.bg

    requested on: 27/04/1999
    processed from: 27/04/1999
    activated on: 03/05/1999
    expires at: 03/05/2012
    domain status: Registered


    REGISTRANT:
    HIT.BG Ltd.
    16, Gurguliat str., BG-1000 Sofia
    Sofia, 1000
    BULGARIA

    . . .

    NAME SERVER INFORMATION:
    chicken.orbitel.bg
    ns.orbitel.bg
    Is that the server under which you have your domain? If any case, it also is giving me a:

    Could not connect to remote server
    I can connect to other .bg domains, so it's not that. I also tried chicken.orbitel.bg/ and got redirected to a login screen of vmail.orbitel.bg

    But even that (chicken.orbitel.bg/) was spotty, sometimes connecting, sometimes not, though the redirect address (vmail.orbitel.bg) had no problems loading on its own.
    Last edited by jscheuer1; 10-20-2010 at 05:48 PM. Reason: add info
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Oct 2010
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thank you
    in my case right code was:
    parent.parent.parent.sm=parent.parent.parent.dhtmlwindow.open("sm", "iframe", "http://localhost/smetkoplan.php", "Сметкоплан", "width=800px,height=600px,left=200px,top=100px,resize=1,scrolling=1")

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    OK, you must have more than one level of nesting of frames/iframes then.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    Oct 2010
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    is there other way to do the same without use of parent.parent.sm=parent.parent.dhtmlwindow.open.....

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If the top page is the page you are after and it's got an iframe on it (is not a frameset page), yes:

    Code:
    top.sm=top.dhtmlwindow.open("sm", "iframe", "http://localhost/smetkoplan.php", "Сметкоплан", "width=800px,height=600px,left=200px,top=100px,resize=1,scrolling=1")
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •