SitePoint Sponsor

User Tag List

Results 1 to 16 of 16
  1. #1
    SitePoint Zealot MarshallX's Avatar
    Join Date
    Jun 2002
    Location
    Essex, Ontario
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    New Window Popup, using imagemap

    Hey Guys, I just made my first imagemap page, after many messed up sliced...I'm not really sure how to do this so I came to this forum....the page i am workin on this at is here...http://www.gosume.com/txc/shoutbox/index2.php



    Question : How do i make this code, popup a new window that is sayyy.....400X400 big, with no scrollbars, nothing but text or whatever...
    Code:
    <area shape="rect" coords="151,371,198,383" href="bio.htm" title="">




    Here is a sample site of what i need the window to popup like (different size, just click on a number): http://www.larkie.nl/exp/index.html

  2. #2
    SitePoint Guru moonman's Avatar
    Join Date
    Dec 2000
    Location
    The Sea of Tranquility
    Posts
    696
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Stick this above the </head> tag:

    <script language="JavaScript">
    <!--
    function MM_openBrWindow(theURL,winName,features) { //v1.2
    window.open(theURL,winName,features);
    }
    //-->
    </script>


    and use this for the URL:


    <area shape="rect" coords="151,371,198,383" href="javascript:MM_openBrWindow('YOURPAGEHERE.htm','help','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=400')"title="">


  3. #3
    SitePoint Zealot MarshallX's Avatar
    Join Date
    Jun 2002
    Location
    Essex, Ontario
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ``

    Oh man, your the bomb!

  4. #4
    SitePoint Guru moonman's Avatar
    Join Date
    Dec 2000
    Location
    The Sea of Tranquility
    Posts
    696
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Glad to be of service

  5. #5
    SitePoint Zealot MarshallX's Avatar
    Join Date
    Jun 2002
    Location
    Essex, Ontario
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, when i try to open the page I get this page....

    http://www.gosume.com/txc/shoutbox/j...M_openBrWindow('bio.htm','help','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=400')

    Do I have to have the target page finished and uploaded?
    Did i put something wrong in? The code looks like this:

    <area shape="rect" coords="151,371,198,383" href="java
    script:MM_openBrWindow('bio.htm','help','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,hei
    ght=400')"title="">

  6. #6
    SitePoint Guru moonman's Avatar
    Join Date
    Dec 2000
    Location
    The Sea of Tranquility
    Posts
    696
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, my bad. This bit has to go in the head statement, not above it:

    <script language="JavaScript">
    <!--
    function MM_openBrWindow(theURL,winName,features) { //v1.2
    window.open(theURL,winName,features);
    }
    //-->
    </script>


    and the URL should read this:


    <area href="javascript:MM_openBrWindow('bio.htm','help','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=400')"title=""shape="rect" coords="151,371,198,383">

  7. #7
    SitePoint Zealot MarshallX's Avatar
    Join Date
    Jun 2002
    Location
    Essex, Ontario
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm, I still seem to be getting the same error...


    here is the site: http://www.gosume.com/txc/shoutbox/index2.php

  8. #8
    SitePoint Guru moonman's Avatar
    Join Date
    Dec 2000
    Location
    The Sea of Tranquility
    Posts
    696
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now I see the problem.
    This is the URL you're using:
    http://www.gosume.com/txc/shoutbox/java%20script:MM_openBrWindow('bio.htm','help','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=400')

    This is the one you want:

    javascript:MM_openBrWindow('http://www.gosume.com/txc/shoutbox/bio.htm','help','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=400')

  9. #9
    SitePoint Zealot MarshallX's Avatar
    Join Date
    Jun 2002
    Location
    Essex, Ontario
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Grrrr...still wont work
    Here is the fullpage coding, see if you can find it in there






    <html>
    <head>
    <title> Josh Vermast - 2002 </title>
    <script language="JavaScript">
    <!--
    function MM_openBrWindow(theURL,winName,features) { //v1.2
    window.open(theURL,winName,features);
    }
    //-->
    </script>

    </head>
    <body bgcolor="#000000"><table border="0"><tr><td><? include("viewshoutbox.php"); ?></td><td>
    <IMG SRC="/txc/mergedop.jpg" usemap="#mergedop" border="0">

    <map name="mergedop">
    <area shape="rect" coords="94,372,138,384"
    href="http://www.gosume.com/txc/Forums/index.php?" title="">

    <area href="javascript:MM_openBrWindow('http://www.gosume.com/txc/bio.htm','help','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,
    resizable=no,width=400,height=400')"title=""shape="rect" coords="151,371,198,383">


    <area shape="rect" coords="617,370,679,384" href="work.htm" title="">

    <area shape="rect" coords="681,371,758,384" href="contact.htm" title="">

    <area shape="default" nohref>
    </map>
    </td></tr></table>
    </body>
    </html>

  10. #10
    SitePoint Guru moonman's Avatar
    Join Date
    Dec 2000
    Location
    The Sea of Tranquility
    Posts
    696
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I cant see anything wrong with the code here, but the URl isn't right on your site.

    You could try this one. Stick this code in the head statement:


    <script language="javascript" type="text/javascript">

    var win = null;
    function NewWindow(mypage,myname,w,h,scroll){
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    settings =
    'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
    win = window.open(mypage,myname,settings)
    if(win.window.focus){win.window.focus();}
    }
    </script>



    and the url should look like this:
    <area href="http://ffd" onclick="NewWindow(this.href,'name','400','400','no');return false" shape="rect" coords="7, 6, 11, 11">

    This window pops up bang in the middle of the screen too.

  11. #11
    SitePoint Zealot MarshallX's Avatar
    Join Date
    Jun 2002
    Location
    Essex, Ontario
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    should that head code replace the old one correct?

    Whoa! That coding is weird. Is that already customized to my site or somethin? What do I gotta change?

  12. #12
    SitePoint Guru moonman's Avatar
    Join Date
    Dec 2000
    Location
    The Sea of Tranquility
    Posts
    696
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    correct. You can hack out all the old code

  13. #13
    SitePoint Zealot MarshallX's Avatar
    Join Date
    Jun 2002
    Location
    Essex, Ontario
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    woohoo!

    Got it! Thanks man, if i have anymore problems ill come to you...looks great.

  14. #14
    SitePoint Guru moonman's Avatar
    Join Date
    Dec 2000
    Location
    The Sea of Tranquility
    Posts
    696
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry it took so long, but we got there in the end

  15. #15
    SitePoint Zealot MarshallX's Avatar
    Join Date
    Jun 2002
    Location
    Essex, Ontario
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No worries, I learned a ton in that! Seriously! A TON!

  16. #16
    SitePoint Guru moonman's Avatar
    Join Date
    Dec 2000
    Location
    The Sea of Tranquility
    Posts
    696
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Trial and error is the way forward. In this case trial, error, trial, error, trial, success


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
  •