How to get value of an element by ID in JSP.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to get value of an element by ID in JSP.

    How can i get value of an element by ID in JSP.

    Example:
    <input id="Text1" type="text" />
    the following works while using ID
    In javascript -> document.getElementById("Text1").value;
    In JSP -> DONT KNOW

    If we are using name instead of ID
    <input type='text' name='name'>
    then the following works
    in javascript -> document.formname.name.value;
    in JSP -> request.getParameter("name");

    #2
    Jsp? Doubt many people know that.
    Java server pages aint a language of choice.
    Perfection comes at a cost



    I accept liberty!

    Comment


      #3
      dont really have an idea but y dont you try

      <input id="Text1" type="text" name="name"/>

      lol

      Comment

      Working...
      X