Jump to content

Mouseovers


Xtremer360

Recommended Posts

I want the rollover on the title to show the champion's picture from backstage/images/champion folder and if there is no image for the title then put default.jpg from backstage/images/titles. Not sure how this is implemented.

 

onmouseover="this.src = '?'" onmouseout="this.src = 'backstage/images/titles/".$img[$i].".jpg'"

 

function showtitleholders10(){
$img = array('world', 'hc', 'tag');
$titlename = array('World Heavyweight Title', 'King of Carnage Hardcore Title', 'Tag Team Titles');
for($i = 0; $i < count($img); $i++){
	$title = $titlename[$i];
	$query = "SELECT title.shortname AS shortname, bio.charactername AS charactername FROM `efed_list_titles` AS title INNER JOIN `efed_bio` AS bio ON bio.id = title.champ_id WHERE title.name = '$title'";
	if(!$result = mysql_query ($query)){ echo mysql_error() . "<br /><br />" . $query . "<br /><br />"; }
	$row = mysql_fetch_assoc($result);
		$fieldarray=array('shortname','charactername');
		foreach ($fieldarray as $fieldlabel){
			if (isset($row[$fieldlabel])){ 
				$$fieldlabel=$row[$fieldlabel];
				$$fieldlabel=cleanquerydata($$fieldlabel);
			}
		}

	print "<p><a href='backstage/content.php?p=titlehistory&title=".$shortname."'><img  src='backstage/images/titles/".$img[$i].".jpg' style='width: 145px; border: 1px solid black;' alt=''/></a><strong>".$charactername."</strong></p>";
	}
}

Link to comment
Share on other sites

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.