FRIHOSTFORUMSSEARCHFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Change value of textbox when the mouse is over an image

 


Summer
What is the code to Change value of textbox when the mouse is over an image ?
Like helpline for bbcode . Either in Javascript or php , thanks .
SystemWisdom
Could try something like this:
Code:

<html>
<head>

<script language="JavaScript" type="text/javascript">
<!--
function displayText()
{
    var frm = document.forms[0];
    frm.txt1.value = 'Image Mouseover';
    frm.txt2.value = 'Image Mouseover';
}
function hideText()
{
    var frm = document.forms[0];
    frm.txt1.value = '';
    frm.txt2.value = '';
}
// -->
</script>

</head>

<body>

<form name="frm1" onsubmit="return summary();">
<input type="text" name="txt1" value="" /><br />
<textarea name="txt2" rows="5" cols="20"></textarea>
</form>

<img src="myimage.gif" onmouseover="displayText()" onfocus="displayText()" onmouseout="hideText()" onblur="hideText()" />

</body>
</html>


It is very bare-bones, so that you can modify it to your needs... Hope that helps!!
Summer
Thanks I wil try it .
Summer
Thanks , it works . U will get credits for my skin .
Related topics

Playing audio on mouse over.
How to make a javascript label when you mouse over on a link
25 frih for a simple flash animation :please close:
How do I make pic change with onmouseover?
CSS - li on hover change a color

Advanced Rollovers
A Useful Javascript
Tutorial: Image Rollovers w/ Javascript
Marquee ~ it's really fun!
Creating Roll-over Menus

Spanish Javascript Tutorial
CSS - CSS Tutorial for skin maker
Question: Is it possible...?
Javascript
Please evaluate-some changes
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.