SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    May 2004
    Location
    blah
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with this script. Not working for some reason

    <div id="gw_wallpaperoftheday_">
    <a href="javascript:gwGetPreview_();">
    <img src="http://www.gamewallpapers.com/wallpaperoftheday/wallpaperoftheday_.jpg" width="120" height="90" border="0" onError="document.all.gw_wallpaperoftheday_.style.visibility='hidden';">
    </a><br>
    </div>

    <script>
    function gwGetPreview_() {
    url = "http://www.gamewallpapers.com/wallpaperoftheday/getpreview.php?type=";
    ipwindow = window.open(url,"_blank","fullscreen=no,resizable=no,scrollbars=no,toolbar=no,height=316,width=400");
    }
    </script>


    That's the script I want to use for my site. For some reason it's not working. My host has perl, mysql, cgi and all the other stuff.

  2. #2
    American't awestmoreland's Avatar
    Join Date
    Sep 2002
    Location
    Grand Rapids, MI
    Posts
    1,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Pyke
    For some reason it's not working.
    Greetings to thee who hail from Blah (don't tell 'em your name Pyke!).

    Now then, where do I start? I think a rewrite may be in order. What's with all those underscores sprinkled liberally throughout the code?

    See what you make of this:
    Code:
    <html>
     <head>
      <script language="JavaScript" type="text/javascript">
      <!--
       function gwGetPreview(){
    	url = "http://www.gamewallpapers.com/wallpaperoftheday/getpreview.php?type=";
    	ipwindow = window.open(url + "blank","316x400","fullscreen=no,resizable=no,scrollbars=no,toolbar=no");
       }
      //-->
      </script>
     </head>
     <body>
      <div id="gw_wallpaperoftheday">
       <a href="javascript:gwGetPreview();">
    	<img src="http://www.gamewallpapers.com/wallpaperoftheday/wallpaperoftheday.jpg" width="120" height="90" border="0" onError="document.getElementById('gw_wallpaperoftheday').style.visibility='hidden';">
       </a><br>
      </div>
     </body>
    </html>
    Bear in mind that you're still not going to see anything in your popup window as you've set your "type" to "blank".
    Quote Originally Posted by Pyke
    My host has perl, mysql, cgi and all the other stuff.
    All nice things to have, but none will help with Javascript


    Andy
    From the English nation to a US location.


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
  •