[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 96737] [test case] cannot create hidden input using DOM
From: djoham () yahoo ! com
Date: 2005-01-14 16:10:29
Message-ID: 20050114161029.20446.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=96737
------- Additional Comments From djoham yahoo com 2005-01-14 17:10 -------
Your test case is good and probably represents a legit bug. There is a workaound \
though that will do what you need. I was able to use the following code to get a \
newly created input to do what I wanted. Hopefully it will work for you...
var elmInput = document.createElement("input");
try {
elmInput.setAttribute("type", "button");
elmInput.setAttribute("value", "click me");
elmInput.setAttribute("onclick", "go()");
}
catch(e) {
alert(e);
}
I had a go() function defined elsewhere and when the button was clicked, it called \
the funtion.
It may not be the exact syntax that you're looking for, but it should do what you \
need. I also did a quick test in Firefox and found the above code worked there as \
well...
HTH
David
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic