• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem in html:hidden tag

 
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

i m sending a hidden variable inside the form.code for hidden variable is
<html:hidden property="fileName" value="<bean:write name="libDocumentInfo1" property="libDocumentName" />"/>

its givin me error :-
org.apache.jasper.JasperException: /jsp/Library/LibraryMainPage.jsp(121,76) equal symbol expected.

form name and property are right and i suppose its synatx error..
can nybody tell me how to correct it??
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rawat,

You cannot use one struts tag inside another. In the above code u r using <bean:write> within the <html:hidden> tag; i.e. why u r getting such an error.

Try using this instead,



Hope this helps.

Liju
 
Himanshu Rawat
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
thanx for helping and ur code worked bt with a slight change..

<input type="hidden" name="val" value="<bean:write name="libDocumentInfo1" property="libDocumentName" />" /> (property is nt defined).

now i m trying to retrieve the value in javascript like this..

alert(document.all.val.value); its giving me undefined ??? when i checked the source code "value" atrribute is having value bt nt giving me in javascript.

can u tell me how to get it in javscript???
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try document.myForm.val.value where myForm is the name of the form. In Struts this is the name of the ActionForm used by the action called by the form.

If you only have one form on the page, this will work also:

document.forms[0].val.value
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic