You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Muralidhar Y." <TC...@emirates.com> on 2005/10/06 16:43:32 UTC

RE: onBlur or onChange not working with browse button through t apestry !!!!

 <tr>
	       <td><input type="file" jwcid="upload1" name="upload1"
onBlur="Javascript:populateName(upload1.value,1)"/></td>
	       <td><input type="text" jwcid="name1" /></td>
		 </tr>

In the above code is it compolsory to write
onblur="onBlur="Javascript:populateName(upload1.value,1)"

I am not good in scripting languages but try
"onBlur="populateName(upload1.value,1)"   .

Try calling the same way as you call in normal html.




Muralidhar Y
Software Engineer,
Adastrum technologies-Nikai groups,
EmiratesGroup-I.T Division,
Dubai, UAE.
Mobile : 00971-50-2256149.
http://www.adastrumtech.com
http://www.mercator.aero  
(Keep Smiling. Be happy All The Time.)

-----Original Message-----
From: Ananya Goswami [mailto:ananyag@aztec.soft.net] 
Sent: 06 October 2005 18:08
To: Tapestry users
Subject: RE: onBlur or onChange not working with browse button through
tapestry !!!!

Ya. I am using Body component .....




Thanks & Regards
-----------------------------
Ananya Goswami
Software Developer

-----------------------------
mail: ananyag@aztec.soft.net
mob: 09886886320
ph: 080-57561000
extn:3720
 


-----Original Message-----
From: Muralidhar Y. [mailto:TC02347@emirates.com]
Sent: 06 October 2005 16:19
To: 'Tapestry users'
Subject: RE: onBlur or onChange not working with browse button through
tapestry !!!!

Are you using "Body" component in your html file. To enable java script for
your components you must use "Body" componet instead of just writing <body>
in html. 




Muralidhar Y
Software Engineer,
Adastrum technologies-Nikai groups,
EmiratesGroup-I.T Division,
Dubai, UAE.
Mobile : 00971-50-2256149.
http://www.adastrumtech.com
http://www.mercator.aero
(Keep Smiling. Be happy All The Time.)

-----Original Message-----
From: Ananya Goswami [mailto:ananyag@aztec.soft.net]
Sent: 06 October 2005 10:25
To: Tapestry users
Subject: onBlur or onChange not working with browse button through tapestry
!!!!

Hi All !!
		I have a typical problem using javascript in tapestry.
		I have a browse button in my page and a text field near it.
		According to functionality , it is required to display the
name of the file browsed in the text field immediately after browsing a
file.
		I am using the following piece of code... but am unable to
get the desired effect..
The Script part:

	<script language="Javascript">
		function populateName(filename,id)
		{
			startindex = filename.lastIndexOf("\\")+1;
			lastindex = filename.lastIndexOf(".");
			var name =filename.substring(startindex,lastindex);
			if(id==1)
			document.uploadForm.name1.value=name;
			if(id==2)
			
		}
	</script>


In the form part:


		<tr>
	       <td><input type="file" jwcid="upload1" name="upload1"
onBlur="Javascript:populateName(upload1.value,1)"/></td>
	       <td><input type="text" jwcid="name1" /></td>
		 </tr>



Please help !!!!

Thanks & Regards
-----------------------------
Ananya Goswami
Software Developer

-----------------------------
mail: ananyag@aztec.soft.net
mob: 09886886320
ph: 080-57561000
extn:3720
 




---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org