OnLoad & OnChange do not work together...?
- From: jgschwend <jgschwend@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Jul 2009 04:54:01 -0700
I've tried to add a picture beside each textbox in the onload event of the
lead form. This picture should be used as a help and shows some helptexts on
mousehover.
This worked without any problems, and it looks like this: (just for three
pictures)
function OnLoad()
{
var fieldNames = new Array(3);
fieldNames[0] = "subject";
fieldNames[1] = "lastname";
fieldNames[2] = "companyname";
var helpTexts = new Array(2);
helpTexts[0] = "Hilfe 1";
helpTexts[1] = "Hilfe 2";
helpTexts[2] = "CompanyHelp 3"
for (i=0; i<fieldNames.length; i++)
{
var inputData = document.getElementById(fieldNames[i] + "_d");
var inputDataHtml = inputData.innerHTML;
var newInputDataHtml = inputDataHtml + "<img src='/_imgs/icn_help16.png'
alt='" + helpTexts[i] + "'></img>";
inputData.innerHTML = newInputDataHtml;
}
}
So if i now add some commands in the OnChange event of one this fields, this
commands are NOT going to be executed!
Does anybody have an idea what the problem could be or already solved this
problem?
Greez Joe
.
- Prev by Date: Re: Javascript not working in IE
- Next by Date: Re: Javascript not working in IE
- Previous by thread: Javascript not working in IE
- Next by thread: toggling element display
- Index(es):
Relevant Pages
|