#1
  1. No Profile Picture
    BrainFreeze
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Location
    London
    Posts
    318
    Rep Power
    15
    I have the following Javascript thats brings up a pop up window on the click of an image, the trouble is as the images are not href'd the mouse stays as a pointer and doesnt change to a hand anybody no the solution please.

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function PopIt(filename, h, w){
    popup = window.open(filename,"popDialog","height="+h+",width="+w+",scrollbars=no")
    if ( popup.document.close() ) {
    popup.document.close()}}
    window.onerror=new Function("return true")
    var n = Math.random()*4;
    if(n>=0 && n<1){ document.write("<img src='images/1.gif' border=0 onClick="PopIt('report.php3?id=1&vendor_id=1', 410, 300)">"); }
    if(n>=1 && n<2){ document.write("<img src='images/2.gif' border=0 onClick="PopIt('report.php3?id=2&vendor_id=1', 410, 300)">"); }
    if(n>=2 && n<3){ document.write("<img src='images/3.gif' border=0 onClick="PopIt('report.php3?id=3&vendor_id=1', 410, 300)">"); }
    if(n>=3 && n<4){ document.write("<img src='images/4.gif' border=0 onClick="PopIt('report.php3?id=4&vendor_id=1', 410, 300)">"); }
    // -->
    </SCRIPT>
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    SPAIN
    Posts
    47
    Rep Power
    15
    Yo only have to href the image to # (That is <a href="#"...> and add return false at the end of the PopIt function (or inside onClick).

    That is:
    <a href="#" onClick="PopIt('report.php3?id=2&vendor_id=1', 410, 300)"><img src='images/2.gif' border=0></a>

Similar Threads

  1. Pointer problems opening file *formatted*
    By LAKI in forum C Programming
    Replies: 4
    Last Post: February 11th, 2004, 06:06 AM
  2. Does _msize() always return EXACT size of malloc'ed block?
    By Jason Doucette in forum C Programming
    Replies: 10
    Last Post: November 29th, 2003, 12:24 AM
  3. Problems changing <tr> bg color on mouse events
    By StevenC in forum HTML Programming
    Replies: 6
    Last Post: July 25th, 2003, 12:37 PM
  4. Replies: 2
    Last Post: November 20th, 2001, 03:26 PM
  5. MySQL compilation error
    By dman in forum MySQL Help
    Replies: 0
    Last Post: March 15th, 2001, 03:03 PM

IMN logo majestic logo threadwatch logo seochat tools logo