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>
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
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?
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.