This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

like a c:out but readable in javascript  RSS feed

 
Javoso Torso
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am looking for a tag (actually JSP or JSF) wich gives me the look&fell of a normal text out

(like <c: out> or <h: outputText> )


but where I can get, and change!, the value through javascript.

Lavel does not give me that feature.

Regards,
javo
[ April 15, 2005: Message edited by: Javoso Torso ]
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP == SERVER
JavaScript == CLIENT

You can NOT make changes on the server from JavaScript.

The FAQ should mention it, if it doesn't. But I doubt it would help as most people don't seem to use it anyway.
 
Javoso Torso
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you misunderstood me.
I am probably not clear enough.

if I use <h: inputText> for example it renders an HTML "input" element of "type" "text".

And I can play with it with javascript...


That�s what I am looking for, but I don�t want to have the field being drawn (the box). I would like to have the L&F of a normal text.
Maybe with CSS...
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65825
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right, all client-side rendition needs to be handled with a combination of HTML, Javascript and CSS. Once you figure out the combination that achieves what you are after, it should be easy to write a custom tag that emits the appropriate declarations.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65825
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you need this pseudo-element to act like a form field (e.g. value submitted to server, can receive focus, etc), I'd start with an input element of type text set to readOnly, and use CSS to adjust its appearance to make it look as you want (set background and text colors, remove borders, and so on). Its value would be adjustable via the usual Javascript mechansims.

If it doesn't need to be "active", you could just use a span with an id (so that you could get a Javascript reference to it), use CSS to achieve the required appearance, and use its innerHTML attribute to manipulate the text.
[ April 15, 2005: Message edited by: Bear Bibeault ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!