File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes problem javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "problem javascript" Watch "problem javascript" New topic

problem javascript

rosaria italia

Joined: May 15, 2006
Posts: 28
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;

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!
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276


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.



Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
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
I agree. Here's the link:
subject: problem javascript
It's not a secret anymore!