I have to pass to an anchor tag , the input value of a text field , which is dynamically created. I am using XHTML and dont want to use javascript as I am writing this for WAP pages, and some phones do not like javascripts. $(sterm) never gets evaluated. Please help me. The code is as follows: <table> <tr> <td valign="middle"> <input name="sterm" type="text" title="Search Term" class="tx1" style="width:40px;" size="5" maxlength="30"/> </td> <td> <a href="./endUserWMLSearchDirectory?term=$(sterm)"><img src="images/search_gui_btn.gif" width="56" height="18" /> </a> </td>
</tr> </table>
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35224
7
posted
0
How is this page created? The "$(sterm)" seems to indicate some kind of templating engine or server-side language.
I use the same page format for XHTML and WML. WML works fine with $(sterm). I try to use the same for XHTML and it does not work fine. I also tried using JSTL <c ut value="${sterm}"/>. I cannot use javascript to access the DOM as I am writing my pages for mobile devices, and some of the devices hate javascript. I cannot also use a <input type="submit" src="test.gif" /> as images cannot be rendered across devices uniformly
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35224
7
posted
0
So you're using JSP to generate the pages. In JSP the notation $(...) has no meaning, but ${...} does.
I also tried using JSTL <c ut value="${sterm}"/>
And the result of that was ... ? [ August 31, 2005: Message edited by: Ulf Dittmer ]
Smitha Mathew
Greenhorn
Joined: Aug 22, 2004
Posts: 6
posted
0
term=<c: out value="${sterm}"/> returned term= null when I debugged the servlet.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35224
7
posted
0
c: out does not return anything; it does something (it prints something to the output stream). Are you saying it did not print anything to the output stream?
Smitha Mathew
Greenhorn
Joined: Aug 22, 2004
Posts: 6
posted
0
I am appendind to the url on <a href , the parameter term=<c: out value="${sterm}" />, this is to call the url, with this parameter also. But c: out does not recognise that input text is changed, as it is a server call. Is there a way I can access the input value typed in, other than using the DOM and javascript. Javascript is not widely accepted across phones and so javascripts are fairly discouraged in my world of writing pages to devices.