JSP Select tag
Hello,
I want to make my select tag like this:
For e.g. I have three or four select tags, if I select from the first tag, in the second some specific values must appear, if I select from the second in the third some values must appear. How can I do it using JSP?
Any help would be very appreciate.
I wrote the following that displays three select tags on an html page.
Select an item from the first tag, the second is populated, select an item from the second and the third is populated.
Below the three select tags, it shows the index values that you selected for each tag so you know if it works as you want. Left to be done is to create a java class that takes in arrays for the three tags and returns a string containing javascript shown in the example. I grouped the contents of the array so hopefully you will be able to see a pattern of how one array relates to another. You should be able to extend it as you need. (please dont tell me to use css in stead of table tags, this is only an example).
<html>
<head>
<script language="javascript">
var a1;
var a2;
var a3;
function loadPage(){
//initialize all arrays for select tags
a1= [
['0', ''],
['1','A1'],
['2','A2'],
['3','A3']
a2= [
[['0',''], ['1','A1B1'], ['2', 'A1B2'], ['3','A1B3']],
[['4',''], ['5','A2B1'], ['6', 'A2B2'], ['7','A2B3']],
[['8',''], ['9','A3B1'], ['10','A3B2'], ['11','A3B3']]
a3= [
[[], [['0',''], ['1', 'A1B1C1'],['2', 'A1B1C2'],['3', 'A1B1C3']], [['4',''], ['5','A1B2C1'], ['6','A1B2C2'], ['7','A1B2C3']], [['8',''], ['9','A1B3C1'], ['10','A1B3C2'],['11','A1B3C3']]],
[[], [['12',''],['13','A2B1C1'],['14','A2B1C2'],['15','A2B1C3']], [['16',''],['17','A2B2C1'],['18','A2B2C2'],['19','A2B2C3']], [['20',''],['21','A2B3C1'],['22','A2B3C2'],['23','A2B3C3']]],
[[], [['24',''],['25','A3B1C1'],['26','A3B1C2'],['27','A3B1C3']], [['36',''],['37','A3B2C1'],['38','A3B2C2'],['39','A3B2C3']], [['28',''],['29','A3B3C1'],['30','A3B3C2'],['31','A3B3C3']]]
//populate the first select tag
for(ii=0;ii<a1.length;++ii){
document.myForm.selection1.options[ii] =new Option(a1[ii][1],a1[ii][0]);
//populate the second select tag, based on selection in first select tag
//display the index of the selected item
function selection1Changed(){
document.myForm.selection2.options.length=0;
document.myForm.selection3.options.length=0;
var a1Index= document.myForm.selection1.selectedIndex;
for(ii=0;ii<a2[a1Index].length;++ii){
document.myForm.selection2.options[ii] =new Option(a2[a1Index][ii][1],a2[a1Index][ii][0]);
document.myForm.select1Value.value=document.myForm.selection1.options[a1Index].value;
document.myForm.select2Value.value="";
document.myForm.select3Value.value="";
//populate the third select tag, based on selection of first and second select tags
//display the index of the selected item
function selection2Changed(){
document.myForm.selection3.options.length=0;
var a1Index= document.myForm.selection1.selectedIndex;
var a2Index= document.myForm.selection2.selectedIndex;
for(ii=0;ii<a2[a2Index].length;++ii){
document.myForm.selection3.options[ii] =new Option(a3[a1Index][a2Index][ii][1],a3[a1Index][a2Index][ii][0]);;
document.myForm.select2Value.value=document.myForm.selection2.options[a2Index].value;
document.myForm.select3Value.value="";
//display the index of the selected item
function selection3Changed(){
var a3Index= document.myForm.selection3.selectedIndex;
document.myForm.select3Value.value=document.myForm.selection3.options[a3Index].value;
</script>
</head>
<body onload="loadPage()">
<form name="myForm">
<table>
<tr>
<td>
Selection 1:
</td>
<td>
Selection 2:
</td>
<td>
Selection 3:
</td>
</tr>
<tr>
<td>
<select name="selection1" onchange="selection1Changed()"></select>
</td>
<td>
<select name="selection2" onchange="selection2Changed()"></select>
</td>
<td>
<select name="selection3" onchange="selection3Changed()"></select>
</td>
</tr>
<tr>
<td colspan="3">
<table>
<tr>
<td>
first select tag value:
</td>
<td>
<input type="text" size="2" name="select1Value">
</td>
</tr>
<tr>
<td>
second select tag value:
</td>
<td>
<input type="text" size="2" name="select2Value">
</td>
</tr>
<tr>
<td>
third select tag value:
</td>
<td>
<input type="text" size="2" name="select3Value">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
Similar Messages
-
Need for help in select tag with jsp
i have a select tag about shoeing countriesin a register form and according to the selection of country i want to shoe the names of its cities .............i guess it has something to so with js and i have a little experience in it
..........................................if somebody have the answer i'll b thankfull 4 this<%@page import="java.sql.*"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>register</title>
<SCRIPT LANGUAGE="JavaScript">
function checkForm(form){
var len = form.elements.length;
for (var i = 0; i < len; i++)
if ((form.elements.value == null || form.elements[i].value == ""))
alert("Please enter your " + form.elements[i].name + ".");
form.elements[i].focus();
return false;
return true;
</SCRIPT>
<script>
function subForm()
frm=document.forms.register;
frm.action="register.jsp";
frm.submit();
</script>
</head>
<body>
<H3>WELCOM IN REGISTER PAGE </H3>
<table align="center" border="0"width="100%">
<form name="register" method="post"action="reg.jsp">
<tr>
<th>
Country
</th>
<td>
<select name="country" onChange="subForm()" >
<option value="-1">choose</option>
<%!private Statement stmt;%>
<%!private ResultSet rs;%>
<%!private String h;%>
<%!private int s;
private int s2;
private String b;%>
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection("jdbc:odbc:data", "", "");
stmt=conn.createStatement();%>
<%
b= request.getParameter("country");
rs = stmt.executeQuery(" select* FROM Country");
Integer int3=java.lang.Integer.valueOf(b).intValue();
s2=int3;
if(s2!=-1)
while(rs.next())
%>
<option value="<%=rs.getInt(1)%>">
<%=rs.getString("Country_name")%>
</option>
<% } %>
<%
h=request.getParameter("country");
Integer int1=java.lang.Integer.valueOf(h).intValue();
s=int1;
}else{
rs = stmt.executeQuery(" select* FROM Country where country_id='"+s2+"'");
if(rs.next())
%>
<option value="<%=rs.getInt(1)%>">
<%=rs.getString("Country_name")%>
</option>
<% } %>
<% } %>
</select>
</td>
</tr>
<tr>
<th>
City
<br>
</th>
<td>
<select name="city">
<option value="-1">choose</option>
<%
rs = stmt.executeQuery(" select* FROM City where Country_id='"+s+"'");
while(rs.next())
%>
<option value="<%=rs.getInt(1)%>"><%=rs.getString("City_name")%></option>)
<%
out.println(request.getParameter("City"));
%>
</select>
</td>
</tr>
<tr>
<th>First Name</th>
<td><input type="text"name="firstName" size="30"></td>
</tr>
<tr>
<th>Last Name</th>
<td> <input type="text"name="lastName" size="30"></td>
</tr>
<tr>
<th> Email </th>
<td><input type="text"name="email" size="30"></td>
</tr>
<tr>
<th> UserName </th>
<td><input type="text"name="userName" size="30"></td>
</tr>
<tr>
<th> Password </th>
<td> <input type="Password"name="password" size="30"></td>
</tr>
<tr>
<th><input type="submit" VALUE="Submit Data" onClick="return checkForm(this.form);"></th>
<th></th>
</tr>
<tr>
<th><input type="reset" VALUE="Reset Form"></th>
<th></th>
</tr>
</table>
</form>
</body>
</html> -
Problems with BC4J input select tag when its bounded to a primary key field
HI..
I have an jsp BC4J edit form. This form uses a BC4J input select tag. This component is mapping one of the primary key Entity fields.
When im working with this component and it doesnt map a primary key field it shows the default "none" value when im inserting a record(thats Ok). but when it maps a primary key field the default value is a database value so it is not advisable.. How can i do in order to fix that?
Thank youThe none value is only shown when the field accepts null values.
-
Set selected in netui:select tag
Hi, all
I wonder how to set the selected item after come back from server. I have
--- jsp
<netui:select dataSource="{actionForm.personStr}" optionsDataSource="{actionForm.personOptionsHashMap}" defaultValue="-- select one --">
--- server (.jpf)
form.setPersonStr(form.getPersonStr());
form.setPersonOptionsHashMap(hashMap);
So when screen come back, it has selected duplicated at bottom of the selection. Is there a way like normal html select behavior ?
Thanks inadvance for any inputs.Murthy,
Unfortunately, though a very reasonable requirement, there is no option for
placing the default item.
- john
"Murthy" <[email protected]> wrote in message
news:[email protected]..
>
Hi,
I am using <netui:select dataSource="{actionForm.xyz}" defaultValue="Any"optionsDataSource="{actionForm.someMap}"
/>
Now I am getting the values from database to populate the dropdown usingthe optionsDataSource.
As I am using the defaultValue, it is being added to the end of thedropdown and
selected by default when I a mopening the page on browser.
In my dropdown, the values are as follows:
apple
orange
banana
Any
Now my requirement is, the defaultValue, Any, must be there at the top ofthe
list instead at the bottom of thge dropdown values. i.e., In the abovelist, "Any"
must be above apple option.
How can I achieve this using netui:select tag?
Thanks & Regards,
Murthy -
Hi all,
In my jsp page i am using struts html:select tag,some contents are not fitting in the alloted size so i want to give horizontal scrolling for this select box,pls any body can tell me which property of select tag can be used,or any html tricks by which i can achive horizontal scrolling.examples will be help full.
thanks,There aren't any tricks. This has nothing to do with Struts or JSP. It only has to to with HTML. The width is controlled by the size of the options or the size of the HTML area it has to display in. The latter if it's restricted otherwise by some table cell's width. I don't believe that I've ever seen a select box which has horizontol scrolling in any browser ever.
-
Problem in SELECT TAG using variables
Hi all,
I have a JSP page which updates the record for a user.Now there is a HTML select tag and when the user queries its data this SELECT tag will automaticaly select the user stored item in database automatically. It means the select tag will have a variable to select the options. Now how can i use variables in SELECT TAG. Please help needed.I'm not exactly sure what you are asking, but here goes.
First, are you able to populate the select box with all the names... this is what it sounds like to me.
Or are you not able to populate it nor select it.
I use JSTL for all my jsps... so for me I would store a collection on the form and then iterate through it. (arrayList being my preference)
look into using <c:forEach> or you could try <logic:iterate> which I've used before but it has been several years.
here is an example block of code.
Sorry this is going to be a bit convoluted because of what I'm doing with it..
but I have an ArrayList that contains string arrays... position 0 being the value I want returned (like 1 through 10) and position 1 being the text representation..
so it comes out like
1 - Option 1
2 - Option 2
You will notice the if statement where I check to see if the localList[0] is equal to the view field. view would be your selected value.
<SELECT name="view" size="7"
multiple="multiple" class='OmniDlgLabel'>
<c:if test="${sessionScope.PHI2Form.localList!=null}">
<c:forEach var="localList"
items="${sessionScope.PHI2Form.localList}" varStatus="status">
<OPTION value='<c:out value="${localList[0]}"/>'
<c:if test="${sessionScope.PHI2Form.view==localList[0]}">SELECTED</c:if>>
<c:out value="${localList[0]}"/>-<c:out value="${localList[1]}" /></OPTION>
</c:forEach>
</c:if>
</SELECT></TD>There is an extra > that I cannot get rid of.. should be there after the
<OPTION value='<c:out value="${localList[0]}"/>' -
JSP applet tag X Html applet tag (what is the difference?)
what is the advantage in using the JSP applet tag instead of a simple Html applet tag ?
second question:
I have an applet in a Html frame, and a menu on the left side.... When the user select the applet option at first time, everything runs ok.. after the user select another option and then select the applet again, it fails in some features .. Why ?well, if by "the JSP applet tag", you mean the jsp:plugin tag.. that will just generate the same HTML tag you would write. The only advantage would be it should be less typing to use the taglib.
second answer:
without seeing any code, it'd be hard to figure out the problem. The obvious thing is you are setting some state of something that is preventing further action. -
When I do a database query for values for the select they display properly but when it is submitted the next page only has the variable not the value. Any ideas?
<form action=getprinter.jsp>
<select name="printers">
<%
while(rs.next())
prnt=rs.getString("printer_id"); %>
<option value=prnt><% out.println(prnt.toUpperCase());%>
</select>
<input type=text name="ponum" value=00000 maxlength=5 size=10>
<input class="submitbutton" type="submit" value="Select">
</form><select name="printers">
<%
while(rs.next())
prnt=rs.getString("printer_id"); %>
<option value=prnt><%
out.println(prnt.toUpperCase());%>
<%
some mo code....
%>
On the select tags, the value parameter is what is passed to the getprinter.jsp page. What you have is a drop down list with multiple options on it, different display names but all with the same value. You need to dynamically put the prnt value in the value attribute and in the option body.
<%
while( rs.next() )
prnt = rs.getString("printer_id");
%>
<option value="<%=prnt.toUpperCase()%>"><%=prnt.toUpperCase()%></option>
<%
%> -
Need to fill up Data into the select Tag options value
Hi ,
This is my requirement . I am having two select tags inside my jsp page . one for country and one for state .Upon selecting a country the select tag for states should be filled up .
Right now i need to fill up the data under country select Tag .I am using AJAX for this .On body onload i am calling a function to get Country data .
//This is inside my servlet
* ResultSet res = st.executeQuery("SELECT * FROM countries );*
* StringBuffer sb = new StringBuffer();*
* sb.append("<countries>");*
* while (res.next())*
* String result = res.getString(1);*
* sb.append("<country>"+result+"</country>");*
* sb.append("</countries>");*
* response.getWriter().write(sb.toString());*
This is Inside MY JSP
if( xmlHttp.readyState==4 )
if( xmlHttp.status==200 )
xmlDoc=xmlHttp.responseXML;
xmlDoc.getElementsByTagName("countries")
<select name='countrsel' id="countrsel" onchange="call()">
<option value="<%=%>"><%=%></option>
</select>
I am struck up here please help
Edited by: RaviKIran on Nov 2, 2009 9:51 AMHi ,
This is my requirement . I am having two select tags inside my jsp page . one for country and one for state .Upon selecting a country the select tag for states should be filled up .
Right now i need to fill up the data under country select Tag .I am using AJAX for this .On body onload i am calling a function to get Country data .
//This is inside my servlet
* ResultSet res = st.executeQuery("SELECT * FROM countries );*
* StringBuffer sb = new StringBuffer();*
* sb.append("<countries>");*
* while (res.next())*
* String result = res.getString(1);*
* sb.append("<country>"+result+"</country>");*
* sb.append("</countries>");*
* response.getWriter().write(sb.toString());*
This is Inside MY JSP
if( xmlHttp.readyState==4 )
if( xmlHttp.status==200 )
xmlDoc=xmlHttp.responseXML;
xmlDoc.getElementsByTagName("countries")
<select name='countrsel' id="countrsel" onchange="call()">
<option value="<%=%>"><%=%></option>
</select>
I am struck up here please help
Edited by: RaviKIran on Nov 2, 2009 9:51 AM -
Write to java object using netui:select tag
Hello,
I am iterating through a hashmap of java objects using a netui-data:repeater.
<netui-data:repeater dataSource="{pageFlow.MyHashMap}">
<netui-data:repeaterItem>
<netui-data:repeater dataSource= "{container.item.HashMapOfEmbeddedObjects}">
<netui-data:repeaterItem>
<netui:select dataSource= "{container.item.type}" optionsDataSource= "{container.item.typeChoices}" /> </td>
<netui:select dataSource= "{container.item.default}"
optionsDataSource= "{container.item.defaultChoices}" /> </td>
</netui-data:repeaterItem>
</netui-data:repeater>
</netui-data:repeaterItem>
</netui-data:repeater>
The java object has a field "HashMapOfEmbeddedObjects" that is itself a hashmap of java objects. I want to be able to make a selection and have it be written to the
"type" and "default" fields of the embedded objects, but dataSource="{container.item.default}" does not save the value of the selection.
Is there anyway to use the netui:select tag to write to the field on a java object? Any help is greatly appreciated.I have done it in the past. The java object need not be actionForm. The following write-up I found in edocs will help you achieve this.
Page Flow-Scoped Form Beans
Page Flow-scoped Form Bean instances have the same life-cycle as the Controller file instance. They are created and destroyed when the Controller file instance is created and destroyed. This makes Page Flow-scoped Form Beans useful for storing data that has been accumulated across many different JSP pages.
To create a Page Flow-scoped Form Bean instance, construct a public member variable of the Form Bean in the Controller file.
public class myController extends PageFlowController
public MyFormBean pageFlowScopedBean = new MyFormBean();
Once you have created a Page Flow-scoped instance of a Form Bean, you can pass the instance to action methods by using the @action form="form_bean" annotation.
public class myController extends PageFlowController
public MyFormBean pageFlowScopedBean = new MyFormBean();
* @jpf:action form="pageFlowScopedBean"
* @jpf:forward name="success" path="displayData.jsp"
protected Forward submit( MyFormBean form )
return new Forward( "success" );
Each time the submit() method is invoked, it is passed the same instance of the Form Bean, namely, pageFlowScopedBean, the instance that was created when the Controller file instance was created.
For more info go to http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/netui/guide/conReqScopedVsPageScopedBean.html
Good luck.
--SJ -
How can I display selected tags across multiple e-mail addresses?
I receive email on a specific topic but via several e-mail addresses. How can I view selected tags where the resulting e-mails span several (7) email addresses. They are all active on my Thunderbird, but as far as I know, I can only display the selected tag on one of them at a time.
Any assistance greatly appreciated as this is a very big problem for me.
thanks, Ron75This solution does not appear to work across multiple e-mail addresses.
Perhaps I should have said "work across multiple e-mail address at the same time. I get e-mail on specific topics via several email addresses and wish to view all the tagged emails regardless of which email account in which they reside.
I could not get this solution to select more than one email account at a time. -
Hi, can anyone advise as to whether my tag library code (based
on Apache Jakarta Project) will actually achieve connection
pooling functionality across my entire JSP based application? I
am slightly concerned that my OracleConnectionCacheImpl object
may exist multiple times, hence rendering my conection pooling
attempt useless.
package com.solved.tag.dbtags.connection;
import java.io.IOException;
import java.sql.Connection;
import java.sql.SQLException;
import javax.servlet.jsp.tagext.TagSupport;
import javax.servlet.jsp.JspTagException;
import javax.sql.DataSource;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import oracle.jdbc.pool.OracleConnectionCacheImpl;
* <p>JSP tag connection, used to get a
* java.sql.Connection object.</p>
* <p>JSP Tag Lib Descriptor
* <pre>
* <name>connection</name>
<tagclass>com.solved.tag.dbtags.connection.ConnectionTag</t
agclass>
* <bodycontent>JSP</bodycontent>
<teiclass>com.solved.tag.dbtags.connection.ConnectionTEI</t
eiclass>
* <info>Opens a connection based on a jndiName.</info>
* <attribute>
* <name>id</name>
* <required>true</required>
* <rtexprvalue>false</rtexprvalue>
* </attribute>
* </pre>
* @author Matt Shannon
public class ConnectionTag extends TagSupport {
static private OracleConnectionCacheImpl cache = null;
public int doStartTag() throws JspTagException {
try {
Connection conn = null;
if (cache == null) {
try {
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup
("jdbc/pool/OracleCache");
cache = (OracleConnectionCacheImpl)ds;
catch (NamingException ne) {
throw new JspTagException(ne.toString());
conn = cache.getConnection();
pageContext.setAttribute(getId(),conn);
catch (SQLException e) {
throw new JspTagException(e.toString());
return EVAL_BODY_INCLUDE;
package com.solved.tag.dbtags.connection;
import java.sql.Connection;
import java.sql.SQLException;
import javax.servlet.jsp.tagext.TagSupport;
* <p>JSP tag closeconnection, used to close the
* specified java.sql.Connection.<p>
* <p>JSP Tag Lib Descriptor
* <pre>
* <name>closeConnection</name>
<tagclass>com.solved.tag.dbtags.connection.CloseConnectionTag&
lt;/tagclass>
* <bodycontent>empty</bodycontent>
* <info>Close the specified connection. The "conn"
attribute is the name of a
* connection object in the page context.</info>
* <attribute>
* <name>conn</name>
* <required>true</required>
* <rtexprvalue>false</rtexprvalue>
* </attribute>
* </pre>
* @author Matt Shannon
* @see ConnectionTag
public class CloseConnectionTag extends TagSupport {
private String _connId = null;
* The "conn" attribute is the name of a
* page context object containing a
* java.sql.Connection.
* @param connectionId
* attribute name of the java.sql.Connection to
close.
* @see ConnectionTag
public void setConn(String connectionId) {
_connId = connectionId;
public int doStartTag() {
try {
Connection conn = (Connection)pageContext.getAttribute
(_connId);
conn.close();
} catch (SQLException e) {
// failing to close a connection is not fatal
e.printStackTrace();
return EVAL_BODY_INCLUDE;
public void release() {
_connId = null;
package com.solved.tag.dbtags.connection;
import javax.servlet.jsp.tagext.TagData;
import javax.servlet.jsp.tagext.TagExtraInfo;
import javax.servlet.jsp.tagext.VariableInfo;
* TagExtraInfo for the connection tag. This
* TagExtraInfo specifies that the ConnectionTag
* assigns a java.sql.Connection object to the
* "id" attribute at the end tag.
* @author Matt Shannon
* @see ConnectionTag
public class ConnectionTEI extends TagExtraInfo {
public final VariableInfo[] getVariableInfo(TagData data)
return new VariableInfo[]
new VariableInfo(
data.getAttributeString("id"),
"java.sql.Connection",
true,
VariableInfo.AT_END
data-sources.xml:
<?xml version="1.0"?>
<!DOCTYPE data-sources PUBLIC "Orion data-
sources" "http://xmlns.oracle.com/ias/dtds/data-sources.dtd">
<data-sources>
<data-source
class="oracle.jdbc.pool.OracleConnectionCacheImpl"
name="jdbc/pool/OracleCache"
location="jdbc/pool/OracleCache"
url="jdbc:oracle:thin:@oracle1:1521:pdev"
>
<property name="maxLimit" value="15" />
<property name="cacheScheme" value="2" />
<property name="user" value="console" />
<property name="password" value="console" />
<description>
This DataSource is using an Oracle-native DataSource Class so as
to allow Oracle Specific extensions.
A getConnection() call on this DataSource will return
oracle.jdbc.driver.OracleConnection.
The connection returned is a logical connection.
The caching scheme in place is Fixed Wait. Refer below to
possible values.
Dynamic 1
Fixed Wait 2
Fixed Return Null 3
</description>
</data-source>
</data-sources>
many thanks,
Matt.Hi. Show me your pool definition.
Joe
Ramamurthy wrote:
I am using the jsp custom tag library from BEA called sqltags.tld which came with Weblogic 5.1. Currently I am using Weblogic6.1 sp2 on Solaris.
I have created a Connection Pool for Sybase database using the driver com.sybase.jdbc.SybDriver.
When I created jsp page to connect to the connection pool using sqltags custom tag library, I am getting the error
"javax.servlet.jsp.JspException: Failed to write body content
at weblogic.taglib.sql.ConnectionTag.doAfterBody(ConnectionTag.java:43)
at jsp_servlet.__hubwcdata._jspService(__sampletest.java:1014)"
After this message, whenever I try to access the same jsp page I am getting the message
"javax.servlet.jsp.JspException: Failed to load JDBC driver: weblogic.jdbc.pool.D
river
at weblogic.taglib.sql.ConnectionTag.doStartTag(ConnectionTag.java:34)
at jsp_servlet.__hubwcdata._jspService(__sampletest.java:205)".
Can you please help me the reason why this problem is happening and how to fix this ?
This problem doexn't happen consistently. This occurs once in a while.
I tried to increase Login delay Seconds parameter in the Connection Pool to 15 sec. It didn't help me much.
Thanks for your help !!!
Ram -
My web page has a select tag and cfselect tags and when I print the page with a different option other than the originally selected option the print for both types of select tags reverts back to the original selection and ignores the new selection. This happens in IE9 and .cfm files but not when the page is printed in IE8 or IE7 modes (tried in the F12 Developer Tools.) It also needs to be a .cfm file. FireFox printed the pages correctly for any combination.
This was done on a Dell and ThinkCentre computers under Windows 7. Also, I was able to reproduce the same problem on an different university web site where a selection box would revert back to the original selection for printing on a .cfm page and would print properly on a .PHP page at the same site.
For my site, I used a print button which calls print() and right clicked and chose print and got the same results no matter which method was used. I only had the right click method on the third party web site.
I know this is probably a bit narrow an issue but, any help would be appreciated.It appears that it is probably an IE9 bug.
I simplified the problem by turning the page source taken from the brouser of the original .cfm into an html file and found that it would still print improperly.
When I eliminated the various parts of the file I found that it would print correctly only when I removed the first line, the "DOC type" line.
The page will print the newly selected option but then I lose the style sheet.
If it does not work in an HTML file it must be IE. It is not the .cfm. The reason that it did not work for .cfm files, is that they always have a "DOC type" statement.
I have put the issue into an MSDN forum in addition to the one mentioned previously. -
Use of titleKey attribute in html:select tag
Hi,
There is one "titleKey" attribute to create mouse over pop-up texts taking key values from property files in case of i18n. It works for every struts specific tag like <html:text titleKey="help.rmc.name"/> or <html:checkbox titleKey="help.rmc.name"/> except for <html:select> tag which is used for creating combo box or list box. But this tag contains the titleKey attribute.
Please give me some suggestions how to implement this mouse over pop-up texts in case of <html:select> tagHi,
There is one "titleKey" attribute to create mouse over pop-up texts taking key values from property files in case of i18n. It works for every struts specific tag like <html:text titleKey="help.rmc.name"/> or <html:checkbox titleKey="help.rmc.name"/> except for <html:select> tag which is used for creating combo box or list box. But this tag contains the titleKey attribute.
Please give me some suggestions how to implement this mouse over pop-up texts in case of <html:select> tag -
How to use JSP custom tag lib in PAR file?
Hi All,
I am trying to customize mastheaderpar file. For that I have downloaded relevant par file and making the changes accordingly.
As part of the changes I would require to use JSP custom tag library in my par file.
I have the TLD file and relevant classes in the jar file. I would like to know where and what kind of modifications have to be done to use the jsp custom tag library.
I tried modifying some things in portalapp.xml but was not successful.
Please help me on how to proceed with this? It would be great if you can provide the xml entry to use this tag library
Thanks
SanthoshHi Johny,
Thanks for the reply. Actually I am able to change colors etc. with out any problem.
My requirement is to use XMLTaglib in mastheader par file. This tag lib is from apache tomcat. I have the relevant TLD and class files. I copied TLD file into taglib dir of portal-inf and class file in src api.
And I have added the following line in portalapp.xml under component-profile section of default
<property name="tlxtag" value="/SERVICE/Newmastheader/taglib/taglibs-xtags.tld">
Is this the right way to use tag lib? Actually before adding this line I used to get the error saying "Error parsing taglib", but now the error does not occur and I am getting new error. This is an exception in one of the taglib classes.
Could any one provide me some inputs on how to check this error?
Thanks
Santhosh
Maybe you are looking for
-
How to set userName from security context to Criteria in portlet
Hi, From the portal application I have to get the logged in user and use the same user to filter the records in Portlet. I have to execute a view Criteria in portlet as a default method activity which takes logged in user as a input param. Is this ac
-
The hard drive on my laptop that contained Elements just died. Can I get a second copy for installation on my new PC?
-
Request UEFI / GOP Vbios: R9 270 Gaming 2G
Hello, could you please provide me vbios with UEFI / GOP support for my graphics card? (S/N: 602-V305-01SB1311027298) and this is my current vbios bit.ly/19E6xmm thanks
-
Embedding a flash mp3 player?
Hi, I'm trying to embed a flash mp3 player in my iweb site. I don't want people to be able to download the files, just listen to them, so Flash seems to be the way to go. Can anyone recommend a resource for learning how to do this? I've found the Fla
-
Reasons why jar in the classpath isn't found?
I need some help brainstorming: What are some possible reasons why java can't find classes that are properly .jar'd up with the .jar file in the classpath (verified)? If I expand the jar, they're found without a problem.