Jump to content
xisto Community
Eggie

Image Popup On Mouseover

Recommended Posts

need more help....

<table width=70% height=100% border="1" bordercolor=red><td valign=top align=center>Which class do you wanna race against?<form method="post" action="race.php">	<select size=5 name="class"">	<option value="1">Class 50</option>	<option value="2">Class 125</option>	<option value="3">Class 250</option>	<option value="4">Class 500</option>	<option value="5">Class 600</option>	</select><br>	<input type=submit value=Race>     </form></td></table>
i need text pop-up just like with images but i want it in text format...can u do it for me pls?
EDIT:i need it with if clause...like so
if($wins1['rank']=='Newbie') {echo'(under option one) Your chance to win is 50%';										  echo'(under option two) Your chance to win is 40%';										  echo'(under option three) Your chance to win is 33%';										  echo'(under option four) Your chance to win is 20%';										  echo'(under option five) Your chance to win is 10%';}if($wins1['rank']=='Learner') {echo'(under option one) Your chance to win is 60%';										  echo'(under option two) Your chance to win is 50%';										  echo'(under option three) Your chance to win is 40%';										  echo'(under option four) Your chance to win is 33%';										  echo'(under option five) Your chance to win is 20%';}

by the way...what do u think about my game...anyone wanna join the project??
eggie.ismywebsite.com
Tell me if i'm correct, what you need to show is the text that you are echoing????

About your game, does it work now??? because the last time that i try to re-register it doesn't work.

Best regards,

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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,

Share this post


Link to post
Share on other sites

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><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,

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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,

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

@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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.