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

Thread: DHTML pop-up window script

  1. #1
    Join Date
    Jun 2007
    Location
    North Lake Tahoe
    Posts
    62
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default DHTML pop-up window script

    http://www.dynamicdrive.com/dynamici...ndow/index.htm

    I want to create a pop-up window with contact info that can be accessed via hyperlinks and FLASH buttons.

    Being a novice, I am really confused about the script for the window and where to place it.
    The web site I am planning on doing this to is: www.computingservicesok.com

    Thanks in advance
    Jim

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Not sure what you are really confused about, but I think this is what you might be looking for.

    Basically, you want to have the DHTML window pop up when someone clicks a link (let's call it "Contact Info"). To do this, simply use the following code as a basis.

    Code:
    <a href="#" onClick="contactWin=dhtmlwindow.open('contactInfo', 'iframe', 'contact.php', 'Contact Information', 'width=650px,height=400px,left=300px,top=100px,resize=0,scrolling=1'); return false">Contact Info</a>
    Not sure how to do it in flash, but pretty sure someone else on the forums can help you there.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Jun 2007
    Location
    North Lake Tahoe
    Posts
    62
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    I'm confused about what script goes in the header and what text goes in the body for starters. Sometimes the script on DD is easy to follow for us beginers, but this wasn't for me.

  4. #4
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    In that case, then have a look at the Developer's View. That will show you where everything goes in your HTML document.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  5. #5
    Join Date
    Jun 2007
    Location
    North Lake Tahoe
    Posts
    62
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    Yep!! I'm prety stupid........THANKS!!!!!

  6. #6
    Join Date
    Jun 2007
    Location
    North Lake Tahoe
    Posts
    62
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    I thought I understood, but I don't.

    Here's a test page I created with a "contact us" on it. How do I tie "contact us" to a pop up window? I need the HEADER and BODY Info also.

    http://www.computingservicesok.com/contact_us.htm

    here is a page that will have the info on it.

    http://www.computingservicesok.com/info_page.htm

    Thanks

  7. #7
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Just add this, instead of "contact us"

    Code:
    <a href="#" onClick="ajaxwin=dhtmlwindow.open('contactus', 'contact', info_page.htm', 'Contact Us', 'width=650px,height=400px,left=300px,top=100px,resize=0,scrolling=1'); return false">Contact Us</a>

  8. #8
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    Annnd, to clear up some of your confusion - there's more in-depth scripts you can put in the <head>, but for this it really isn't necessary. Just use what Medyman gave you.
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  9. #9
    Join Date
    Jun 2007
    Location
    North Lake Tahoe
    Posts
    62
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    I'm more stupid than I thought:
    I added the code Medyman gave me and nothing happened. Here's html for the test page. Where do I add the code?

    <html>

    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>contact us</title>







    </head>

    <body>


    <div align="center">
    <center>
    <table border="0" cellpadding="0" cellspacing="0" width="750">
    <tr>
    <td width="350"></td>
    <td width="350"></td>
    </tr>
    <tr>
    <td width="350"></td>
    <td width="350">

    contact us

    </tr>
    </table>
    </center>
    </div>

    </body>

    </html>

    I'm sorry for being so dumb

  10. #10
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Try this:

    Code:
    <html>
    
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>contact us</title>
    
    <link rel="stylesheet" href="windowfiles/dhtmlwindow.css" type="text/css" />
    
    <script type="text/javascript" src="windowfiles/dhtmlwindow.js">
    
    /***********************************************
    * DHTML Window Widget- &#169; Dynamic Drive (www.dynamicdrive.com)
    * This notice must stay intact for legal use.
    * Visit http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    </script>
    
    </head>
    
    <body>
    
    
    <div align="center">
    <center>
    <table border="0" cellpadding="0" cellspacing="0" width="750">
    <tr>
    <td width="350"></td>
    <td width="350"></td>
    </tr>
    <tr>
    <td width="350"></td>
    <td width="350">
    
    <a href="#" onClick="ajaxwin=dhtmlwindow.open('contactus', 'contact', info_page.htm', 'Contact Us', 'width=650px,height=400px,left=300px,top=100px,resize=0,scrolling=1'); return false">Contact Us</a>
    
    </tr>
    </table>
    </center>
    </div>
    
    </body>
    </html>
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

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
  •