You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by daniel ccss <da...@gmail.com> on 2007/08/07 17:47:01 UTC

Tomahawk + Javascript

How can I use the <t:inputText as a javascript function parameter?

I'm using the PopcalTrigger Calendar and it has two parameters: the input
from where the date is take and the input where the selected date on the
Calendar is placed. In my case they are the same, the id of my <h:form is:
PatientForm and the id of the <t:inputText is date, so I tried something
like this, but doesn´t works:

....onclick="scwShow('document.PatientForm :date','document.PatientForm:date'')

How can I do this?

RE: Tomahawk + Javascript

Posted by "Nebinger, David" <dn...@tbbgl.com>.
You're trying to use server-side ids which are not the same as client-side ids.
 
Do a 'view source' on your generated page and you'll probably notice that the form and input ids are similar but not exactly the same, plus a prefix on the front for uniqueness....


________________________________

	From: daniel ccss [mailto:danielccss2@gmail.com] 
	Sent: Tuesday, August 07, 2007 11:47 AM
	To: MyFaces Discussion
	Subject: Tomahawk + Javascript
	
	
	How can I use the <t:inputText as a javascript function parameter?
	
	I'm using the PopcalTrigger Calendar and it has two parameters: the input from where the date is take and the input where the selected date on the Calendar is placed. In my case they are the same, the id of my <h:form is: PatientForm and the id of the <t:inputText is date, so I tried something like this, but doesn´t works: 
	
	....onclick="scwShow('document.PatientForm :date','document.PatientForm :date'')
	
	How can I do this?