SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2003
    Location
    stamford
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    cant get my popup to pop out

    PHP Code:
    <SCRIPT TYPE="text/javascript">
    <!--

    //Pop up information box II (Mike McGrath (mike_mcgrath@lineone.net,  [url]http://website.lineone.net/~mike_mcgrath[/url]))
    //Permission granted to Dynamicdrive.com to include script in archive
    //For this and 100's more DHTML scripts, visit [url]http://dynamicdrive.com[/url]

    Xoffset=-60;    // modify these values to ...
    Yoffset20;    // change the popup position.

    var old,skn,iex=(document.all),yyy=-1000;

    var 
    ns4=document.layers
    var ns6=document.getElementById&&!document.all
    var ie4=document.all

    if (ns4)
    skn=document.dek
    else if (ns6)
    skn=document.getElementById("dek").style
    else if (ie4)
    skn=document.all.dek.style
    if(ns4)document.captureEvents(Event.MOUSEMOVE);
    else{
    skn.visibility="visible"
    skn.display="none"
    }
    document.onmousemove=get_mouse;

    function 
    popup(msg,bak){
    var 
    content="<TABLE  WIDTH=150 BORDER=1 BORDERCOLOR=black CELLPADDING=1 CELLSPACING=0 "+
    "BGCOLOR="+bak+"><TD ALIGN=center><FONT COLOR=black SIZE=2>"+msg+"</FONT></TD></TABLE>";
    yyy=Yoffset;
     if(
    ns4){skn.document.write(content);skn.document.close();skn.visibility="visible"}
     if(
    ns6){document.getElementById("dek").innerHTML=content;skn.display=''}
     if(
    ie4){document.all("dek").innerHTML=content;skn.display=''}
    }

    function 
    get_mouse(e){
    var 
    x=(ns4||ns6)?e.pageX:event.x+document.body.scrollLeft;
    skn.left=x+Xoffset;
    var 
    y=(ns4||ns6)?e.pageY:event.y+document.body.scrollTop;
    skn.top=y+yyy;
    }

    function 
    kill(){
    yyy=-1000;
    if(
    ns4){skn.visibility="hidden";}
    else if (
    ns6||ie4)
    skn.display="none"
    }

    //-->
    </script> 
    this is the js code I use to get the pop up

    PHP Code:
    echo "<a href=\"javascript:preview(" .$row[item_num]. ")\";
             ONMOUSEOVER=\"popup('
    $row[item_name]','808080')\";
             ONMOUSEOUT=\"kill()\">
                   <img border='0' src=images/weapons/" 
    .$row[item_image]. " width='42' height='45'>
                 <font size='5' color='#D36435'><b>" 
    .$row['user_items']. "</b></font></a>"
    this is the PHP i use to get the pop up

    PHP Code:
    <img border='0' src=images/weapons/LandMine.jpg width='42' height='45'>
                 <
    font size='5' color='#D36435'><b>4</b></font></a><a href="javascript:preview(7)";
             
    ONMOUSEOVER="popup('Navy Uniform','808080')";
             
    ONMOUSEOUT="kill()"
    this is the source of html

    Nothing Will Pop Up. Thanks for your help
    http://ispox.com

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi DBallerz,

    cant get my popup to pop out
    Oh I hate it when that happens!

    You don't need those semicolons in the html.
    Code:
    <missing opening A tag>
    <img border='0' src='images/weapons/LandMine.jpg' width='42' height='45'> 
    <font size='5' color='#D36435'><b>4</b></font>
    </a>
    <a href="javascript:preview(7)"
       onmouseover="popup('Navy Uniform','808080')"
       onmouseout="kill()">

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2003
    Location
    stamford
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dont need any semi colons ?
    http://ispox.com


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
  •