Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!

Replying to Image Popup On Mouseover


Post Options

    • Can't make it out? Click here to generate a new image

  or Cancel


Topic Summary

vhortex

Posted 27 January 2012 - 09:34 AM

@af01
Can you explain much better on what problem you are having?

@iGuest
The answer is yes, post more info and I will generate the code to you and explained it on detail

Posted 25 October 2011 - 11:30 AM

I need helpImage Popup On Mouseover

Replying to TavoxPeruHey was reading your post and its great, but my question is that can I make a picture pop in a certain location on the page while the mouse is over a rollover Image.My website is very basic sliced images and I need to show a picture when the mouse is over a rollover image Thank you-

reply by charles


af01

Posted 14 January 2011 - 03:04 PM

I know this thread hasnt been active for ages but I am grasping at straws so any help would be massively appreciated. I am using the code below to change a picture upon selection of an option in a form list

<script type="text/javascript">
	 function showpic(o) {
		 o = parseInt(o);
		 switch (o)
		 {
		 case 1:
			 imgName='images/basic/home_1.png';break;
		 case 2:
			 imgName='images/basic/home_2.png';break;
		 case 3:
			 imgName='images/basic/home_3.png';break;
		 case 4:
			 imgName='images/basic/home_4.png';break;
		 case 5:
			 imgName='images/basic/home_5.png';break;
		 }
		 var DivImage = document.getElementById('DivImg');
		 var DisplayImg = document.getElementById('IdImg');
		 DisplayImg.src=imgName;
		 DivImage.style.visibility="visible";
	 }
 </script>


and I am using the numbers of the cases in the option value ie. <option value="1"> of the list for it too work. However, when the form is submitted I get an email that lists the option chosen by the value but obviously I need this as the name of the item not the number.

Is there anyway of me changing the option value to a word and the javascript still working?


Thanks

Eggie

Posted 28 February 2008 - 04:49 PM

well...thats what i always think...so i try to help people out..but i get so much help for nothing last few weeks
i will give you 10mill if you want...after i make such money on my site ;))

TavoxPeru

Posted 26 February 2008 - 10:39 PM

wow man...thats it...thanx...i owe you one...i hope i can give you something in return,,,or not...
i don't have much scripting experience so i need a lot of help...

No problem dude, i'm very happy to help because i know that when i need help i will receive the same thing.

BTW, in return you can give me 1 million dollars :P ;) :o :P :P

Best regards,

Eggie

Posted 26 February 2008 - 10:19 PM

wow man...thats it...thanx...i owe you one...i hope i can give you something in return,,,or not...
i don't have much scripting experience so i need a lot of help...

TavoxPeru

Posted 26 February 2008 - 09:47 AM

that's it...thats what i needed...thnx ;)

No problem, and check the source code of my page because there is some commented code that is not show up, and of course, you must change it to your own needs.

This is the code:
<html>
<head>
<title>Text Shows Up on Option Change Version 1</title>
&lt;script type="text/javascript">
	function showtext(o) {
		o = parseInt(o);
		switch (o)
		{
		case 1:
			TheText='50%';
			break;
		case 2:
			TheText='40%';
			break;
		case 3:
			TheText='33%';
			break;
		case 4:
			TheText='20%';
			break;
		case 5:
			TheText='10%';
			break;
		}
		var DivText = document.getElementById('Text');
		DivText.innerHTML = 'Your chance to win is '+TheText;
		DivText.style.visibility="visible";
	}
</script>
<style type="text/css">
body {
	font: normal 100.1% tahoma, arial, verdana, sans-serif;
}

#Text {
	position:relative;
	top:-65px;
	left:150px;
	z-index:20;
	width:250px;
	line-height:2em;
	visibility:hidden;
	text-align:center;
	background:#f2f2f2;
	font-weight: bold;
	font-size:0.9em;
	color:#b80b38;
}
</style>
</head>
<body>
<form name="form0" method="post" action="">
<table border="1"><tr><td>Who do you wanna race?</td></tr></table>
	<select size=5 name="bike1" onchange="showtext(this.options[this.selectedIndex].value)" >
	<option value="1" >Derbi Senda 50</option>
	<option value="2">Honda NS 50 R</option>
	<option value="3" >Suzuki ZR 50</option>
	<option value="4">Yamaha DT 50 MX</option>
	<option value="5">Aprilia RS 50</option>
	</select>-<a href="java script:launchClasses()">?</a>
	<input type=submit value=Register>  
	<div id="Text"></div>
</form>
</body>
</html>
BTW, i test my code with Internet Explorer 6, Firefox 2.0.0.12 and Opera 9.26 and works perfect.

Best regards,

Eggie

Posted 26 February 2008 - 05:06 AM

Ok, check this Text Shows Up on Option Change Version 1 if it is what you want.

And i just register myself and play your game, as i see you are on the right way.

Best regards,

that's it...thats what i needed...thnx ;)

TavoxPeru

Posted 26 February 2008 - 02:47 AM

i want to echo "Your chance to win is 40%" under option one

<option value="1">Class 50</option>
if $wins1['rank']is equal to 'Newbie'
but only if someone clicks that option...do you understand now?

the game worked and it still works....you should be able to register...my friends succeded and played it a bit but noone want to play cause right now it doesn't have any actual goal or anything...i need to make it to race against other people...i need to write tutorial,help,TOS,make 'upgrades' script...and other things...

Ok, check this Text Shows Up on Option Change Version 1 if it is what you want.

And i just register myself and play your game, as i see you are on the right way.

Best regards,

Eggie

Posted 26 February 2008 - 02:04 AM

i want to echo "Your chance to win is 40%" under option one
<option value="1">Class 50</option>
if $wins1['rank']is equal to 'Newbie'
but only if someone clicks that option...do you understand now?

the game worked and it still works....you should be able to register...my friends succeded and played it a bit but noone want to play cause right now it doesn't have any actual goal or anything...i need to make it to race against other people...i need to write tutorial,help,TOS,make 'upgrades' script...and other things...

Review the complete topic (launches new window)