Hi, I have a problem in my jsp page. I recover a value from <h:inputText> to JavaScript with following code: <SCRIPT type="text/javascript"> function valorizza () {var form=document.getElementById("myForm"); var id=document.getElementById("myForm:id").value; document.getElementById("myForm:id2").value=id; alert("id2="+id2); }
But I'd like to recover a value dynamically, without to write element's name (myForm:id). What do I do? Can you help me? Thanks in advanced!
You had your real first name and real last names showing before. Why did you change it. You need to set it back, because now it violates the JavaRanch Naming Policy of using your real first and real last names. Please click on the My Profile link above.
I'm sorry, I don't understand what you are trying to do. Could you please elaborate?
Also, does this really have anything to do with JSF? I'm inclined to move this to the JavaScript forum...
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus