FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free 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
Advanced Rollovers
Site Nav Suggestions...
Tutorial: Image Rollovers w/ Javascript
CSS - CSS Tutorial for skin maker
Text Over Image
Please evaluate-some changes
Question: Is it possible...?
Javascript
How do I make pic change with onmouseover?
css background
Playing audio on mouse over.
How to make a javascript label when you mouse over on a link
Image Rollovers In Javascript With a Twist
Help with image on a page
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

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