Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Servlet Interest »

Re: (Some elaboration)Re: Html question (eventhough it relates other mailing lists)

Yuri Singidas

2003-09-05


How about something like this old code ( sorry this was done in ASP but
u could easily do it in JSP as well):

Response.Write "<TR><TD valign='top'><font face='Arial, Helvetica,
sans-serif' size=2>Entry Type</TD><td><input type=text size=3
name=uEntrytext id=uEntrytext value='" & rstLog.Fields("ENTRYTYPE") &
"' ><INPUT type='button' value='Entry' id=uDisplayList name=uDisplayList
onClick='DisplayList()' ><Select name=uEntryType id=uEntryType
onclick='EntrySelected()' style='display:none'>"
     x = 0
     Do while x < count
       Response.Write "<option value='" & entrytype(x)
       if entrytype(x) = trim(rstLog.Fields("ENTRYTYPE")) then
          Response.Write "' SELECTED>" & entrytype(x) & "</option>"
       else
          Response.Write "'>" & entrytype(x) & "</option>"
       end if
       x = x + 1
     Loop
    --------------
- -
---
%>
<SCRIPT LANGUAGE=javascript>
<!--
function EntrySelected()
{
fLogUpdate.uEntrytext.value =
fLogUpdate.uEntryType.options[fLogUpdate.uEntryType.selectedIndex].value;
fLogUpdate.uEntryType.style.display = "none";
fLogUpdate.uDisplayList.style.display = "";
}

function DisplayList()
{
fLogUpdate.uEntryType.style.display = "";
fLogUpdate.uDisplayList.style.display = "none";
}
//-->
</SCRIPT>


</BODY>
</HTML>


Madhu Vadlapudi wrote:

>Friends,
>
>Actually in the webpage i want to have
>1. a text box type control, we it with the following code <input type='text'
>name='t1' value=''>
>2. A selection box which can be done with
>     <select name='s1'><option value='1'></select>
>
>I need a box which can simulate both above scenarios.
>
>Any help is appriciated.
>
>Madhu
>
>
>
>>Hi,
>>
>>Here i am posting a uqestion which may not relates to JSP, but relates to
>>web.
>>So, if anybody have any suggestion pour in.
>>
>>Actaully i want to have a drop down list, in which i may enter my own value
>>(like input type of text) or i can select a value from the drop down list
>>(which
>>should work as selection box). Is there anyway to do that?
>>
>>Thanks,
>>--
>>V Madhu.
>>
>>
>
>___________________________________________________________________________
>To unsubscribe, send email to listserv@(protected)
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>
>

___________________________________________________________________________
To unsubscribe, send email to listserv@(protected)
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html


©2008 junlu.com - Jax Systems, LLC, U.S.A.