Jump to content

Recommended Posts

<?php
if(!$freak)
{
   echo '<div id="apDiv14"><a href="messages.php"><img src="images/messages_btn.png" width="77"       height="20" border="0"></a></div>';
}
else
{
   echo '<div id="apDiv14_a"><a href="messages.php"><img src="images/messages_btn_new.png" width="77" height="20" border="0"></a></div>';
}
?>

No errors at all. I can't get the link to work. I'm not getting the little finger cursor when I roll over it. Therefore no link. Here is the whole script. It shows all three buttons, two work great, and the other does nothing. (but like I mentioned, everything works fine in IE) I even commented out the if else, still the link will not work. I have session start at the top of the page also.

 

<?php
include "connection.php";
if(isset($_SESSION['id']))
{
$fluke = $_SESSION['id'];
$flip = ("SELECT id FROM member_messages WHERE status = 'NEW' and sendto = '" . $fluke . "'"); 
$flop = mysql_query($flip); 
$freak = mysql_num_rows($flop);
if(isset($_SESSION['auth']))
{
//if(!$freak)
//{
echo '<div id="apDiv14"><a href="messages.php"><img src="images/messages_btn.png" width="77" height="20" border="0"></a></div>';
//}
//else
//{
//   echo '<div id="apDiv14_a"><a href="messages.php"><img src="images/messages_btn_new.png" width="77" height="20" border="0"></a></div>';
//}
echo '<div id="apDiv13"><a href="postnew.php"><img src="images/postnew_btn.png" width="136" height="17" border="0"></a></div>';
echo '<div id="apDiv10"><a href="mypics.php"><img src="images/mypics_btn.png" width="91" height="20" border="0"></a></div>';
}
}
?>

 

the if else works fine, i checked it out.(if user has new message, it shows a different pic) just the a href is not working which is strange cause the other 2 work just fine.

may i ask what that theory is? I really do not want to give out the page until I know everything is secure.

I want to verify the image actually exists at the path you've specified, and want to view the actual source code to see if it contains a typo that hasn't shown up in your post. And look at the CSS to see if there's a problem with that.

if i echo the links without the div and css, they work (of course the link is not placed where it should be on the page, but just to check) here it is below, i changed the names of the class.

 

#noMessage {

position:absolute;

width:77px;

height:20px;

z-index:3;

left: 821px;

top: 112px;

}

#newMessage {

position:absolute;

width:77px;

height:20px;

z-index:3;

left: 821px;

top: 112px;

}

 

if(!$freak)

{

  echo '<div id="noMessage"><a href="messages.php"><img src="images/messages_btn.png" width="77" height="20" border="0"></a></div>';

}

else

{

  echo '<div id="newMessage"><a href="messages.php"><img src="images/messages_btn_new.png" width="77" height="20" border="0"></a></div>';

}

I note you're using position:absolute. Have you tried a z-index of 255 on the one that's not working? If you do this, and it starts working, does the other stop working?

 

Also, have you tried it in IE8 to see if it works? I've only had IE8 a few days, but so far it seems closer to FF than IE7...and nothing like IE6.

I just noticed that the link does work,, but you have to click on the picture at the very bottom left hand corner for the hand cursor to appear for the link to work. I have three picures there. All displayed the same way. Why would one just give me trouble?

ok, got it to work. changed it to relative and z index of 255. Everything seems to be ok. I'm still confused. i read up on z-index and stacking order, but it still confuses me a little. I read about the stacking, but the only other thing that would be stacked there is the other pic and a background image. So by raising the z-index, i brought the link up to the top above the other image and the background???????? If that is right, should I raise the z-index of everything that I want accessible to my users?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.