I was wondering two things:
a) where is a really good beginners tutorial to walk me through it?
b) how do I create the JS equivalent of a Flash dynamic textfield? The project I'm experimenting with updates a JS variable depending on the combination of drop down box selections the user makes. I'd just like to display this variable in a text field.
Thanks for your time and help.
Literally hundreds of JS tutorials out there, but if you know AS3 you'll find that most of them won't take you far enough. As to dynamically assigning a value to a text field, HTML has text boxes and other elements that you can use. If I'm not wanting user input into the field though, the simplest thing is to use a <span> element and set the innerHTML property to the value:
Important thing to remember is that you can't address an element until it has been rendered, so if you put the script in the <head> section you'll need to wait until the document loads before allowing it to execute.
document.getElementById("spanToReplace").innerHTML = "This span now has a value";
54 68 65 42 65 61 72 4D 61 79
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)