1)
one solution is to set a "blank" (or other, e.g., "---------------Select a
Value------------") string of N length (the width your select/option
dropdown. Insert it as the first or last one in your list.
2)
Or, when your looping thru your recordset of items, concantenate a string
together (sorry, i'm new to java so you'll have to find the syntax for (a)
Length of a String and (b) packing string with a certain character like
empty string):
//set max width of dropdown box
int maxLength=20;
//java string.length function
int lenMyString = java.??.stringWidth("yourValue");
//prepare string for select/option
value = rs.getString("yourValue") + String(" ",(maxLength - mystrLength))
//set value of option
option = value
-----Original Message-----
From: Mukka, Srikanth (GEA, 097902)
[mailto:[EMAIL PROTECTED]]
Sent: Friday, May 12, 2000 8:40 AM
To: [EMAIL PROTECTED]
Subject: Very urgent
Hi All,
Can any one of you tell me how to set the width of the list item.
<Select Name="">
<option value=.....>
</Select>
Is there any way to specify the width for the list item, in my case it is
dynamically changing depending on the strings in the options given in the
tag.
I want it be static, I don't want it to change dynamically as it is
disturbing my interface.
expecting an early reply/
Bye
Srikanth
-----Original Message-----
From: Garcia, Cristina [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 12, 2000 9:32 AM
To: [EMAIL PROTECTED]
Subject: AW: Event from button
I am not very experienced in JSP (I began to programm an own prototype 2
days before) but what I did, was calling a Bean
(<%jsp:use Bean...%>), which is responsible of saving the data into the
database (using JDBC).
Hopefully can this help you :-)
> -----Ursprungliche Nachricht-----
> Von: kavitha ramasamy [SMTP:[EMAIL PROTECTED]]
> Gesendet am: Freitag, 12. Mai 2000 15:03
> An: [EMAIL PROTECTED]
> Betreff: Event from button
>
> Hello,
>
> I want to the following things when I click the save button in
> JSP page
> 1) All front end validations- This I achieved through JavaScript.
> 2) I need to insert the data in database, This I want to be done through
> JSP page, because all my datas are from session object.
>
>
> I have the following code to call javascript and I dont know how to
> insert the data through JSP page.
>
> By cllicking the button the validation and insertion of data has to be
> done.
>
> <input type="button" name="Button" value="Button" onClick="validation()">
>
> validation() is a javascript function.
>
>
> If anyone has any idea regarding this, that would be helpful to me.
> Thanks,
> Kavitha
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets