Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jan 2005
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mouse Over Gives Popup

    I have been searching like crazy, and cannot find out how to code what I want.

    I want to have a roll over description exactly like this site:

    www.freeipods.com (note, I am not spamming, I really want to do that rollover thing)

    Thanks

  • #2
    Senior Coder
    Join Date
    Jul 2004
    Location
    New Zealand
    Posts
    1,315
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    	<head>
    		<title>51244</title>
    	</head>
    	<body>
    		<dl>
    			<dt>Object 1</dt>
    			<dd>
    				<p>This is the description for Object 1</p>
    			</dd>
    
    			<dt>Object 2</dt>
    			<dd>
    				<p>This is the description for Object 2</p>
    			</dd>
    		</dl>
    
    		<script type="text/javascript">
    			var dt = document.getElementsByTagName("dt");
    			var dd = document.getElementsByTagName("dd");
    
    			for(var i = 0; i < dt.length; i++)
    			{
    				dt[i].addEventListener("mouseover",toggleSibling,true);
    				dt[i].addEventListener("mouseout",toggleSibling,true);
    			}
    
    			for(var i = 0; i < dd.length; i++)
    			{
    				dd[i].style.display = "none";
    			}
    
    			function toggleSibling(e)
    			{
    				var i = matchNode(e.currentTarget);
    
    				if(i < 0)
    				{
    					return;
    				}
    
    				dd[i].style.display = (dd[i].style.display == "none") ? "" : "none";
    			}
    
    			function matchNode(obj)
    			{
    				for(var i = 0; i < dt.length; i++)
    				{
    					if(dt[i].isSameNode(obj))
    					{
    						return i;
    					}
    				}
    				return -1;
    			}
    		</script>
    	</body>
    </html>
    It's up to you to get it working in IE.

  • #3
    Regular Coder
    Join Date
    Jan 2005
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So does it not work well in IE? I know certain javascript has issues in IE. If it doesn't, then I probally wont even try.

    Thanks

  • #4
    New Coder
    Join Date
    Jan 2005
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Go to this link.

    http://www.dynamicdrive.com/dynamici...agetooltip.htm

    It is exactly what you are looking for and is cros-browser compatible.

    Ron

  • #5
    Regular Coder
    Join Date
    Jan 2005
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank You

  • #6
    Regular Coder
    Join Date
    Jan 2005
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am trying to use that website that rgn1703 kindly gave me. It is exactly what I want.

    Now, I am trying to figure out how I go about this.

    On my index page, I have the code in index.php (it is mainly code, I have another file for the appearance):

    PHP Code:
    <?

    $ipforcookie 
    $_SERVER['REMOTE_ADDR']; 

    if(! isset(
    $_COOKIE['ipcookie'])) 

    setcookie("ipcookie",$ipforcookietime() +315569260); 
    }  

    $cookieip $_COOKIE['ipcookie'];

    define('IN_RAFS'true);
    include 
    "./sessions.php";
    include 
    'includes/db.php';
    include 
    'includes/mysql.php';
    //include 'includes/templates.php';

    $page "Login";
    $adsense "no";
    $logout $_GET['logout'];

    if ( 
    $logout != NULL ) {
            
    session_unset();
            
    session_destroy();
            
    setcookie("easyiuser""");
            
    setcookie("easyipass""");
            
    header("Location: index.php");
    }

    else {

    // Make the database connection.
    $db = new sql_db($dbhost$dbuser$dbpass$dbnamefalse);
    if(!
    $db->db_connect_id)
    {
       die(
    "Could not connect to the database");
    }
            
    $cookie $_GET['cookie'];
            if ( 
    $cookie == "yes" ) { 
                    
    $username $_COOKIE['easyiuser'];
                    
    $password $_COOKIE['easyipass'];
                    
    $enpassword $password;
            }
            else {
                    
    $username $_POST['username'];
                    
    $password $_POST['password'];
                    
    $enpassword $password;
            }
            
    $cookiepass = ($enpassword);
            
    $time time();
            
    $autologin $_POST['autologin'];
            if (
    $username != NULL && $password != NULL) {
                    include(
    "includes/db.php");
                    
    $usercheck mysql_query("SELECT * from users WHERE username='$username'and password='$enpassword'");
                    
    $useractive mysql_query("SELECT * from users WHERE username='$username'and active='1'");
                    
    $usercorrect mysql_fetch_array($usercheck);
                    
    $activeuser mysql_fetch_array($useractive);
                    if (
    $usercorrect && $activeuser ) {
                            
    $_SESSION['username'] = $username;
                            if ( 
    $autologin != NULL ) {
                                    if ( 
    $_COOKIE["easyiuser"] == NULL or $_COOKIE["easyipass"] == NULL ) {
                                            
    setcookie("easyiuser"$usernametime()+2592000);
                                            
    setcookie("easyipass"$cookiepasstime()+2592000);
                                    }
                                    else {
                                    }
                            }
                            else {  
                            } 
                            
    $theip $_SERVER['REMOTE_ADDR'];
                            
    $logintime "INSERT INTO logins SET  
                              username = '$username', 
                              login = Now(), 
                              loginip = '$theip',
                              logincookieip = '$cookieip'"
    ;
                            
    mysql_query($logintime);  
                            if ( 
    $cookie != "yes" ) {  
                                    
    header("Location: index.php?sid=$sid");  
                            }

                            else {
                                    
    header("Location: index.php?sid=$sid");
                            }
                    }
                    elseif ( 
    $usercorrect && $activeuser != "1" ) {
                            
    $message "Your account is not active, please activate it via the e-mail you received.<br /><br />Click <a href=\"login.php\">here</a> to go back.";
                            include 
    'includes/header.php';
                            
    $tvars = array(
                                           
    'message' => $message);
                            
    pparse('message_body');
                    }
                    else {
                            
    $message "The username and password you entered are invalid.<br /><br />Click <a href=\"login.php\">here</a> to go back.";
                            include 
    'includes/header.php';
                            
    $tvars = array(
                                           
    'message' => $message);
                            
    pparse('message_body');
                    }
            }
            else {
                    include 
    'includes/header.php';
                    
    pparse('login');
            }
    }
    include 
    'includes/footer.php';
    ?>
    Now, I have a template file called index.tpl :

    PHP Code:
    <!-- Begin_switch_logged_out -->
        <
    tr>
            <
    td width="10%">
            </
    td>

            <
    td width="80%" class="box">
            <
    center>
            <
    img src="/images/select.gif"><FORM action="register.php" method="get">
            <
    table width="100%" cellspacing="3" cellpadding="2" border="0">

    <
    tr>
                    <
    td width="16%" class="choice">
                    <
    img src="/images/money.gif" border="0"><br />
                    $
    450 Check<br /><input type="radio" name="item" value="$450 Check">
                    </
    td>
                </
    tr>
            </
    table>
            </
    center>
            </
    td>

            <
    td width="10%">
            </
    td>
        </
    tr>

        <
    tr>
            <
    td colspan="3">
            <
    br />
            </
    td>
        </
    tr>

        <
    tr>
            <
    td width="10%">
            </
    td>

            <
    td width="80%" class="box">
            <
    center>
            <
    img src="../Application%20Data/Ipswitch/WS_FTP/Application%20Data/Ipswitch/WS_FTP/Storage/images/complete.gif">{REFERRAL_EMAIL}<br /><br />
            
    Your E-Mail Address
            <
    input type="text" class="input" name="email" size="50"><br /><br />
            <
    INPUT type=hidden value="{REFERRAL}" name=referral>
            <
    input type="submit" class="input" value="Register"></form><br /><br />
            </
    center>
            </
    td>

            <
    td width="10%">
            </
    td>
        </
    tr>
    <!-- 
    End_switch_logged_out -->

    <!-- 
    Begin_switch_logged_in -->
        <
    tr>
            <
    td width="10%">
            </
    td>

            <
    td width="80%" class="box">
            <
    center>
                    <
    B>Welcome back to {SITE_TITLE}, {USERNAME}!<BR>
                    
    Below you can see your status for your free {PRODUCT}.</B>


            </
    center>
            </
    td>

            <
    td width="10%">
            </
    td>
        </
    tr>

        <
    tr>
            <
    td colspan="3">
            <
    br />
            </
    td>
        </
    tr>

        <
    tr>
            <
    td width="10%">
            </
    td>

            <
    td width="80%" class="box">
            <
    center>
                {
    USER_COMPLETED_OFFER}
            </
    center>
            </
    td>

            <
    td width="10%">
            </
    td>
        </
    tr>

        <
    tr>
            <
    td colspan="3">
            <
    br />
            </
    td>
        </
    tr>

        <
    tr>
            <
    td width="10%">
            </
    td>

            <
    td width="80%" class="box">
            <
    center>
    Referrals:<hr>{REFERRALS}

            </
    center>
            </
    td>

            <
    td width="10%">
            </
    td>
        </
    tr>

    <!-- 
    End_switch_logged_in --> 
    I want the mouse over to work for this image:

    http://www.techgearfree.com/images/money.gif

    1.) Now, when I work with the the script on that page, I do not know whether to put it in the templete file, or the index.php

    2.) I do not know how to make it pop up over the IMAGE because the site lets you put in a link and then the link will pop it up. I tried putting http://www.techgearfree.com/images/money.gif in, but it just gave me a link again.

    I WOULD LOVE it if someone could help me. My aim scname is spetsacdc if anyone wants to talk on there, maybe I could get this worked out faster?.

    Thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •