473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

setting the value of a textbox problem

Hi guys, I want to set the value of a textbox when someone hovers over
an image (which is hyperlinked) but to no avail. Can anyone spot the
problem here? I've wittled the code down to it's bare minimum so you
can try copying and pasting it into an htm file. Thanks a lot!

(At first I thought it might have been a scope problem in that the <a>
tag had to be within the <form> tag but that doesn't work either -
perhaps the onmouseover doesn't work with hyperlinked images?)

<html>
<head>
<script language="javascript">
function setInfoBox(tV1, tV2, tV3) {
document.infoboxform.infoBox.value = tV1 + " :: " + tV2;
}
function clearInfoBox {
document.infoboxform.infoBox.value = "";
}

</script>
</head>

<body>

<form name="infoboxform">
<input class="textbox" name="infoBox" value="Hello!" type="text"
style="text-align:center;">
</form>

<a href="index.htm" onmouseover="setInfoBox('Value 1', 'Value 2',
'Value 3')">
<img style="border: 0px"
src="http://images.amazon.com/images/P/B00006KGSG.01.LZZZZZZZ.jpg"
alt="hi!" width="30" height="30" border="1">
</a>

</body>
</html>

Dec 9 '05 #1
4 1499

ii2o wrote:
<script language="javascript">
The language attribute is deprecated, use the type attribute instead:

<script type = "text/javascript">
function clearInfoBox {


:) A simple oversight! Looks like you forgot to add in function
parameters. Putting that in appears to fix it.

function clearInfoBox () {
^

Dec 9 '05 #2
Thank you so much!!! I've been pulling my hair out for the last 2 hours
over it!

Dec 9 '05 #3
On 2005-12-09, ii2o <ii**@hotmail.com> wrote:
Thank you so much!!! I've been pulling my hair out for the last 2 hours
over it!


what sort of error messages were you seeing?

to see errors:

In mozilla do tools->web development->javascript console
In IE click on the little yellow doohickey that appears in the status bar.
(then click details, and always show... - don't worrys ist just as easy to
turn alwys show off when you've finished debugging)

Bye.
Jasen
Dec 10 '05 #4
On 2005-12-09, ii2o <ii**@hotmail.com> wrote:
Hi guys, I want to set the value of a textbox when someone hovers over
an image (which is hyperlinked) but to no avail. Can anyone spot the
problem here? I've wittled the code down to it's bare minimum so you
can try copying and pasting it into an htm file. Thanks a lot!
needs () here --------.
| function clearInfoBox {
document.infoboxform.infoBox.value = "";
}

Bye.
Jasen
Dec 10 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: WhiskyRomeo | last post by:
I have a bound textbox (bindings are set at design time) to a dataset column. Sometimes the value of this textbox must be set so that the underlying database field gets updated to null when using...
2
by: John Hargrove | last post by:
I'm having trouble setting decimal place values in the results field of a sample management database I'm building for an environmental testing laboratory. The degree of sensitivity varies among...
18
by: Dixie | last post by:
Can I set the Format property in a date/time field in code? Can I set the Input Mask in a date/time field in code? Can I set the Format of a Yes/No field to Checkbox in code? I am working on...
4
by: Gill Smith | last post by:
After setting the web control text box enable property to FALSE makes the control to loose the data between round trip. I am making sure that the property - EnableViewState = TRUE. Same code...
4
by: David Kyle | last post by:
Hello there, I'm having some problems setting the TextBox.Text Property in my code and having it returned to the client in the source when the TextBox.TextMode="Password". I know this is...
6
by: Andre Ranieri | last post by:
I'm trying to create a login page for customers to log into our corporate website, our presidents naturally wants the user and password fields to populate from a cookie so the customer doesn't have...
0
by: Rocky | last post by:
Dear ALL, I am facing a bit problem in DATAGRID. so may be you guys can help me out. Actually on a DataGrid I am having following controls: 1) 2 DropDown Menu 2) 1 Text Box 3) 1 ADD Button 4)...
1
by: dave2071 | last post by:
Hi I've been assigned to fix a access form/db app and i've been stumped on simple problem. I have a table say table1 with column a,b,a1,b1 and a textbox i want to set the source control of...
18
by: Academia | last post by:
I let the use modify the text of a combobox and then I replace the selected item with the new text (in Keyup event). But if he sets the Text property to an empty string ("") that sets the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.