I've used something like this to get the component id and then set the value of
a component later for a DWR driven display.
var filenameId = document.getElementById("importCdrs:filename");
Where I have a form called importCdrs and a component called filename.
Not sure if this is what you're looking to do.
----- Original Message ----
From: jeremiah.lopez <[EMAIL PROTECTED]>
To: [email protected]
Sent: Wednesday, June 20, 2007 2:14:24 PM
Subject: [appfuse-user] referring to components from Javascript
This is a probably a really stupid question, so please be gentle....
How do I refer to components from Javascript with a JSF page? I've got a
drop down list with an id of availableTypes embedded in a form with an id of
typeForm. I thought you would do it like so:
document.typeForm.availableTypes.value
but the error console from within Firefox keeps saying this the component
has no properties. Also, when I look at the source of JSF pages it looks
like the components actually have ids of <formname>:<component name>.
Should I be refererring to them like that from my script?
--
View this message in context:
http://www.nabble.com/referring-to-components-from-Javascript-tf3955068s2369.html#a11222361
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]