Javascript and Struts HTML problem

Hi all,
I write the following script in my jsp page, but this one does not produce the output at all :
<script type="text/javascript">
     document.write("<input type="button" value='<bean:message key="btn.show"/>' onclick='onShowClick(this.form,"<bean:write name="vo" property="id"/>",true)'/>")
</script>While the following script without Javascript works as expected :
<input type="button" value='<bean:message key="btn.show"/>' onclick='onShowClick(this.form,"<bean:write name="vo" property="id"/>",true)'/>What is wrong ?
Thanks in advance,
Setya

Sure theres an easier way - don't use javascript?
Why do you want to do this javascript and document.write?
Can't you do it using JSP?
About the quotes:
The same quote that starts a string, ends it.
You are writing a javascript string, so the first unescaped single quote it comes across will end it.
Unfortunately in the middle of this string, you are writing HTML onclick event, with some javascript which ALSO needs quotes escaped(sigh)
So you have a javascript string producing some HTML, which also embeds a javascript string (now thats complicated quoting). Mixing the quotes with the struts tags just makes this a nightmare.
If you want to use quotes in the middle of a string you have to escape them.
Simple examples:
document.write("hello world");  // no quotes
document.write("hello \"Java\" ");  // escaping the quotes
document.write('hello "Java" ') // because we used a different quote, we don't have to escape it
And mixing the two:
document.write(' hello "Java\'s buddy" ');  // double quotes don't need to be escaped but the single quote does.Your line of code should be
document.write('<input type="button" value="<bean:message key="btn.show"/>" onclick="onShowClick(this.form,\'<bean.write name="vo" property="id"/>\',true)"')Note that I escaped the single quotes around the string attribute to the javascript method. Needed to do this, so as not to disturb the double quotes encapsulating the onclick="..." method.
Good luck,
evnafets

Similar Messages

  • JavaScript and "pdk-html:form" Variables

    I am having a problem using javaScript with my "pdk-html:form" variables.
    Here is what the .jsp looks like:
    <SCRIPT type=text/javascript>
         function test() {
              alert("act = "+window.document.facListBean.act.value);
    </SCRIPT>
    <pdk-html:form name="facListBean" .......>
         <pdk-html:text property="act" />
    </pdk-html:form>
    The problem is that when the HTML is rendered the name of the form field "act" gets translated to "_piref584_1533941_584_1533923_1533923.act"
    Is there a simple way to handle this problem? Can someone suggest a workaround?
    Thanks,

    hi Matt,
    i've faced the same problem. The only solution i've found was that:
    cicle your form and get all the elements in it.
    var field1;
    var x=document.getElementById("myForm");
    for (var i=0;i<x.length;i++) {
    if(x.elements.name.indexOf('field1')) field1 = x.elements[i];
    []s,
    Felippe

  • COMMUNICATION BETWEEN JAVASCRIPT AND JAVA APPLET: US$20 AWARD FOR SOLUTION!

    COMMUNICATION BETWEEN JAVASCRIPT AND JAVA APPLET PROBLEM (Easy Filter Java Applet) -
    US$20 TO ANYONE WHO CAN RESOLVE THE PROBLEM
    To forum visitors:
    I am prepared to pay a standard shareware fee of US$20 to a user who can resolve this technical problem.
    If your advice resolves the problem, I'll forward the payment to your postal address (include your
    address with your reply, and also your email address)
    I am attempting to enable a HTML button (using Javascript's onClick command) to directly input a number into one of the parameter text boxes in the Easy Filter Java applet (ie, enter a new color value number in the text field of the standard Colors Multiplicator Filter interface).
    The applet is Freeware and can be downloaded at: http://www.javazoom.net/applets/easyfilter10/EasyFilter10.html
    (It is a very effective bitmap display and editing utility)
    To achieve this, I am trying to access the part of the applet that defines and sets the textbox. The text box is defined in the .class file by accessing the parameter details in the genericfilter.txt file (accompanies the .class files). I need to access 'private String appletInitialize()' and then one of the 'textFieldParameters' which sets the textbox.
    I understand the basic syntax for referencing the applet:
    document.appletname.setString("An example"). However, accessing the text fields in this applet is more complex!!
    Please can you recommend the correct Javascript syntax to achieve communication with the applet.
    Thank you for your kind assistance.
    JM Graham
    [email protected]
    The Java source code for the applet: EasyFilter.class
    # Easy Filter - E.B/JavaZOOM 1999 #
    # Contact: [email protected] #
    # http://javazoom.hypermart.net #
    /* Originally compiled from EasyFilter.java */
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    import java.applet.Applet;
    import java.awt.event.KeyEvent;
    import java.awt.event.KeyListener;
    import java.awt.image.MemoryImageSource;
    import java.awt.image.PixelGrabber;
    import java.util.Vector;
    public synchronized class EasyFilter extends Applet implements KeyListener
    private String paramFileName;
    private Color bgColor;
    private Color fgColor;
    private Color parColor;
    private Color sepColor;
    private Color titleColor;
    private Color helpColor;
    private int WinWidth;
    private int WinHeight;
    private String title;
    private String logoFileName;
    private String originalImageFileName;
    private String filteredCaption;
    private String originalCaption;
    private Vector paramsName;
    private Vector paramsValue;
    private Vector paramsComment;
    private Panel panelParameters[];
    private Label labelParameters[];
    private TextField textFieldParameters[];
    private Label labelComments[];
    private int nbParameters;
    private ScrollPane scrollPaneParams;
    private Panel panelParams;
    private Image theLogo;
    private Image theOriginalImage;
    private Image theFilteredImage;
    private int theOriginalPixelArray[];
    private int logoWidth;
    private int logoHeight;
    private int imageWidth;
    private int imageHeight;
    private drawCanvas canvasTitle;
    private Panel panelTitle;
    private Label labelTitle;
    private Panel panelImages;
    private Panel panelOriginalImage;
    private drawCanvas canvasOriginalImage;
    private Label labelOriginalImage;
    private Panel panelFilteredImage;
    private drawCanvas canvasFilteredImage;
    private Label labelFilteredImage;
    private Panel panelHelp;
    private Label labelHelp;
    private int Yspc;
    private FilterImplementation theFilter;
    public void init()
    String string = null;
    string = appletInitialize();
    setBackground(bgColor);
    if (string != null)
    removeAll();
    setBackground(Color.white);
    setForeground(Color.black);
    Label label = new Label(new StringBuffer("Error: ").append(string).toString(), 1);
    Panel panel = new Panel();
    panel.add(label);
    add(panel);
    setLayout(new FlowLayout(1, 5, Yspc));
    public void keyPressed(KeyEvent keyEvent)
    panelHelp.removeAll();
    boolean flag = true;
    if (KeyEvent.getKeyText(keyEvent.getKeyCode()).equals("Enter"))
    for (int i = 0; i < nbParameters; )
    try
    paramsValue.setElementAt(new Double(textFieldParameters.getText()), i);
    i++;
    catch (NumberFormatException e)
    labelHelp.setText(labelParameters[i].getText() + ": Not a Number");
    flag = false;
    break;
    if (flag == 1)
    labelHelp.setText(" .... Running, please wait .... ");
    labelHelp.setAlignment(1);
    panelHelp.add(labelHelp);
    panelHelp.doLayout();
    theFilter.updateParameters(paramsValue);
    theFilter.computeFilter();
    theFilteredImage = createImage(new MemoryImageSource(theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight(), theFilter.getFinalImageBuffer(), 0, theFilter.getFinalImageWidth()));
    canvasFilteredImage.setImage(theFilteredImage);
    canvasFilteredImage.setBounds(0, 0, theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight());
    canvasFilteredImage.repaint();
    panelHelp.removeAll();
    labelHelp.setText("- Done -");
    else
    labelHelp.setText("- Press Enter to run the Filter -");
    labelHelp.setAlignment(1);
    panelHelp.add(labelHelp);
    panelHelp.doLayout();
    public void keyReleased(KeyEvent keyEvent)
    public void keyTyped(KeyEvent keyEvent)
    private String appletInitialize()
    WinWidth = size().width;
    WinHeight = size().height;
    if (getParameter("bgcolor") == null)
    bgColor = new Color(0, 0, 40);
    else
    bgColor = new Color(Integer.parseInt(getParameter("bgcolor"), 16));
    if (getParameter("fgcolor") == null)
    fgColor = new Color(255, 255, 255);
    else
    fgColor = new Color(Integer.parseInt(getParameter("fgcolor"), 16));
    if (getParameter("sepcolor") == null)
    sepColor = new Color(158, 128, 128);
    else
    sepColor = new Color(Integer.parseInt(getParameter("sepcolor"), 16));
    if (getParameter("parcolor") == null)
    parColor = new Color(24, 24, 24);
    else
    parColor = new Color(Integer.parseInt(getParameter("parcolor"), 16));
    if (getParameter("titlecolor") == null)
    titleColor = new Color(255, 255, 0);
    else
    titleColor = new Color(Integer.parseInt(getParameter("titlecolor"), 16));
    if (getParameter("helpcolor") == null)
    helpColor = new Color(0, 255, 255);
    else
    helpColor = new Color(Integer.parseInt(getParameter("helpcolor"), 16));
    paramsName = new Vector();
    paramsValue = new Vector();
    paramsComment = new Vector();
    paramFileName = getParameter("paramfile");
    String string = readParams(paramFileName);
    if (string != null)
    return string;
    MediaTracker mediaTracker = new MediaTracker(this);
    theOriginalImage = getImage(getDocumentBase(), originalImageFileName);
    mediaTracker.addImage(theOriginalImage, 0);
    if (logoFileName != null)
    theLogo = getImage(getDocumentBase(), logoFileName);
    mediaTracker.addImage(theLogo, 1);
    try
    mediaTracker.waitForAll();
    catch (InterruptedException e1)
    return "Error while loading image";
    if (mediaTracker.isErrorAny())
    return "Error while loading image";
    if (logoFileName != null)
    logoWidth = theLogo.getWidth(this);
    logoHeight = theLogo.getHeight(this);
    imageWidth = theOriginalImage.getWidth(this);
    imageHeight = theOriginalImage.getHeight(this);
    theOriginalPixelArray = new int[imageWidth * imageHeight];
    PixelGrabber pixelGrabber = new PixelGrabber(theOriginalImage, 0, 0, imageWidth, imageHeight, theOriginalPixelArray, 0, imageWidth);
    try
    pixelGrabber.grabPixels();
    panelTitle = new Panel();
    canvasTitle = new drawCanvas();
    labelTitle = new Label();
    panelTitle.setLayout(new FlowLayout(1, 10, Yspc));
    add(panelTitle);
    panelTitle.setBackground(bgColor);
    panelTitle.add(canvasTitle);
    canvasTitle.setImage(theLogo);
    canvasTitle.setBounds(0, 0, logoWidth, logoHeight);
    labelTitle.setText(title);
    catch (InterruptedException e2)
    return "Internal Error, Try RELOAD !";
    if (title != null)
    panelTitle.add(labelTitle);
    labelTitle.setForeground(titleColor);
    labelTitle.setFont(new Font("Dialog", 1, 14));
    panelImages = new Panel();
    panelOriginalImage = new Panel();
    canvasOriginalImage = new drawCanvas();
    labelOriginalImage = new Label();
    panelFilteredImage = new Panel();
    canvasFilteredImage = new drawCanvas();
    labelFilteredImage = new Label();
    panelImages.setLayout(new FlowLayout(1, 10, Yspc));
    add(panelImages);
    panelImages.setBackground(bgColor);
    panelOriginalImage.setLayout(new BorderLayout(0, 2));
    panelImages.add(panelOriginalImage);
    panelOriginalImage.setBackground(Color.black);
    panelOriginalImage.add("Center", canvasOriginalImage);
    canvasOriginalImage.setImage(theOriginalImage);
    canvasOriginalImage.setBounds(0, 0, imageWidth, imageHeight);
    labelOriginalImage.setText(originalCaption);
    labelOriginalImage.setAlignment(1);
    panelOriginalImage.add("South", labelOriginalImage);
    labelOriginalImage.setBackground(Color.lightGray);
    labelOriginalImage.setForeground(Color.black);
    labelOriginalImage.setFont(new Font("SansSerif", 0, 10));
    panelFilteredImage.setLayout(new BorderLayout(0, 2));
    panelImages.add(panelFilteredImage);
    panelFilteredImage.setBackground(Color.black);
    panelFilteredImage.add("Center", canvasFilteredImage);
    theFilter = new FilterImplementation(paramsValue, theOriginalPixelArray, imageWidth, imageHeight);
    theFilter.computeFilter();
    theFilteredImage = createImage(new MemoryImageSource(theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight(), theFilter.getFinalImageBuffer(), 0, theFilter.getFinalImageWidth()));
    canvasFilteredImage.setImage(theFilteredImage);
    canvasFilteredImage.setBounds(0, 0, theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight());
    labelFilteredImage.setText(filteredCaption);
    labelFilteredImage.setAlignment(1);
    panelFilteredImage.add("South", labelFilteredImage);
    labelFilteredImage.setBackground(Color.lightGray);
    labelFilteredImage.setFont(new Font("SansSerif", 0, 10));
    scrollPaneParams = new ScrollPane(0);
    panelParams = new Panel();
    nbParameters = paramsName.size();
    int i = WinHeight - (33 + 7 * Yspc + logoHeight + imageHeight + 23);
    if (i < Yspc + 2 + 24)
    i = Yspc + 2 + 24;
    scrollPaneParams.setBounds(0, 0, WinWidth - 10, i);
    panelParams.setLayout(new GridLayout(nbParameters, 1, 5, Yspc / 2));
    scrollPaneParams.add(panelParams);
    panelParams.setBackground(sepColor);
    panelParameters = new Panel[nbParameters];
    labelParameters = new Label[nbParameters];
    textFieldParameters = new TextField[nbParameters];
    labelComments = new Label[nbParameters];
    for (int j = 0; j < nbParameters; j++)
    panelParameters[j] = new Panel();
    panelParameters[j].setLayout(new FlowLayout(0, 5, 1));
    panelParams.add(panelParameters[j]);
    panelParameters[j].setBackground(parColor);
    labelParameters[j] = new Label();
    labelParameters[j].setText((String)paramsName.elementAt(j));
    panelParameters[j].add(labelParameters[j]);
    labelParameters[j].setForeground(fgColor);
    labelParameters[j].setFont(new Font("Dialog", 1, 12));
    textFieldParameters[j] = new TextField(8);
    textFieldParameters[j].setText(paramsValue.elementAt(j).toString());
    panelParameters[j].add(textFieldParameters[j]);
    textFieldParameters[j].setBackground(fgColor);
    textFieldParameters[j].addKeyListener(this);
    labelComments[j] = new Label();
    labelComments[j].setText((String)paramsComment.elementAt(j));
    panelParameters[j].add(labelComments[j]);
    labelComments[j].setForeground(fgColor);
    add(scrollPaneParams);
    panelHelp = new Panel();
    labelHelp = new Label();
    panelHelp.setLayout(new FlowLayout(1, 5, 0));
    add(panelHelp);
    panelHelp.setBackground(bgColor);
    labelHelp.setText(" Change colour values and press enter ");
    labelHelp.setAlignment(1);
    panelHelp.add(labelHelp);
    labelHelp.setForeground(helpColor);
    return null;
    private String readParams(String string1)
    Object object1;
    String string2;
    if (string1 == null)
    return "Filename of filter's parameters needed";
    try
    URL uRL = new URL(getDocumentBase(), string1);
    URLConnection uRLConnection = uRL.openConnection();
    uRLConnection.setDoInput(true);
    uRLConnection.setUseCaches(false);
    BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(uRLConnection.getInputStream()));
    string2 = null;
    catch ()
    return object1.getMessage();
    catch ()
    return object1.getMessage();
    catch ()
    return object1.getMessage();
    if (bufferedReader != null)
    Object object2;
    try
    for (object2 = bufferedReader.readLine(); object2 != null && string2 == null; object2 = bufferedReader.readLine())
    string2 = extractFormat(object2);
    catch ()
    string2 = object2.getMessage();
    finally
    bufferedReader.close();
    if (string2 != null)
    return string2;
    else
    return null;
    private String extractFormat(String string1)
    if (string1.length() == 0)
    return null;
    int i = 0;
    int j = string1.indexOf(" ", i);
    if (j == -1)
    return "Bad format error (space missing)";
    String string2 = string1.substring(i, j);
    if (string2.equals("TITLE"))
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in TITLE missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in TITLE missing)";
    title = string1.substring(i, j);
    return null;
    if (string2.equals("ORIGINALCAPTION"))
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in ORIGINALCAPTION missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in ORIGINALCAPTION missing)";
    originalCaption = string1.substring(i, j);
    return null;
    if (string2.equals("FILTEREDCAPTION"))
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in FILTEREDCAPTION missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in FILTEREDCAPTION missing)";
    filteredCaption = string1.substring(i, j);
    return null;
    if (string2.equals("LOGO"))
    i = j + 1;
    j = string1.length();
    logoFileName = string1.substring(i, j);
    return null;
    if (string2.equals("ORIGINALIMAGE"))
    i = j + 1;
    j = string1.length();
    originalImageFileName = string1.substring(i, j);
    return null;
    if (!string2.equals("PARAM"))
    return null;
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format in a PARAM line";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format in a PARAM line";
    paramsName.addElement(string1.substring(i, j));
    i = j + 2;
    j = string1.indexOf(32, i);
    if (j == -1)
    return "Bad format in a PARAM line";
    try
    paramsValue.addElement(new Double(string1.substring(i, j)));
    j = string1.indexOf(34, i);
    catch (NumberFormatException e)
    return "Bad format in a PARAM line";
    if (j == -1)
    return "Bad format (Double quote in PARAM comment missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in PARAM comment missing)";
    paramsComment.addElement(string1.substring(i, j));
    return null;
    public EasyFilter()
    logoHeight = 33;
    Yspc = 5;

    Addition to my above submission
    To clarify, I'll offer the US$20 to the FIRST person who offers me a workable solution to the problem, not to everyone!!!
    JMGRAHAM

  • Problem with Pop up windows and struts

    Hi
    I have problem in working with pop-up windows and struts.
    I have parent page which basically lists some data and has a button for adding new record. when I press that button a child windndow will be opened for data entry. The child window has submit button to save data.
    when I press the button for save, It will go to action class and saves it in a database and forwards a new page.
    but I do not want to forward any new page. If any exception is raised during database saving, a message should be showed in child window otherwise the child window should close and the parent window should get refreshed.
    Can any one write me how we can handle this in struts.
    Thanks in Advance,
    SR

    This has nothing to do with struts, you can do the same with some plain JavaScript. Do the following...
    1) On error, forward to a error page
    2) On success, forward to a temp.html page.
    The code in temp.html would be like this
    <html>
    <head><script>
    window.opener.reload();
    self.close();
    </script></head>
    <body>Closing...</body>
    </html>Cheers
    -P

  • Struts Html tag problem in Weblogic 8.1

    Hi
    I am using weblogic8.1 Application server
    I have written a simple web application in struts that accepts
    username and password in "login.jsp" and corresponding "bean" ActionForm
    for the same.
    Below are my application source files......
    login.jsp
    <%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
    <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    <html:html>
    <head>Struts Test</head>
    <body bgcolor="#E6F1FC">
    <html:form action="login.do">
    <table>
    <tr>
    <td><html:text property="uname" value=" "/></td>
    <td><html:submit>SUBMIT</html:submit></td>
    </tr>
    </table>
    </html:form>
    </body>
    </html:html>
    web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
    Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <taglib>
    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    </web-app>
    struts-config.xml
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <form-beans>
    <form-bean name="LoginFrom" type="com.nit.StrutsEx.LoginFrom"/>
    </form-beans>
    <action-mappings>
    <action path="/login" type="com.nit.StrutsEx.LoginAction" name="LoginFrom" validate="false"
    input="/login.jsp">
    <forward name="success" path="/success.jsp"/>
    </action>
    </action-mappings>
    <message-resources parameter="ApplicationResource" null="false"/>
    </struts-config>
    ActionForm
    package com.nit.StrutsEx;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.*;
    import javax.servlet.*;
    import java.io.*;
    public class LoginForm extends ActionForm
    private String uname=null;
    public void setUname(String uname){
    this.uname=uname;
    public String getUname(){
    return this.uname;
    public void reset(ActionMapping am, HttpServletRequest req) {
    this.uname=null;
    public ActionErrors validate(ActionMapping am,HttpServletRequest req)
    System.out.println("I am in Validate");
    return null;
    ActionServlet
    package com.nit.StrutsEx;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import javax.servlet.*;
    import java.io.*;
    public class LoginAction extends Action
    public ActionForward execute(
    ActionMapping am,
    ActionForm af,
    HttpServletRequest req,
    HttpServletResponse res) throws ServletException , IOException
    return am.findForward("success");
    My application runs well under tomcat but when i deploy it on Weblogic 8.1 it gives following error
    Compilation of 'E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java' failed:
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:151: cannot resolve symbol
    probably occurred due to an error in /login.jsp line 4:
    <html:html>
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:168: cannot resolve symbol
    probably occurred due to an error in /login.jsp line 8:
    <html:form action="login.do">
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:203: cannot resolve symbol
    probably occurred due to an error in /login.jsp line 13:
    <td><html:submit>SUBMIT</html:submit></td>
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:216: cannot resolve symbol
    probably occurred due to an error in /login.jsp line 13:
    <td><html:submit>SUBMIT</html:submit></td>
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:226: cannot resolve symbol
    probably occurred due to an error in /login.jsp line 16:
    </html:form>
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:235: cannot resolve symbol
    probably occurred due to an error in /login.jsp line 18:
    </html:html>
    Full compiler error(s):
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:151: cannot resolve symbol
    symbol : variable EVAL_BODY_BUFFERED
    location: interface javax.servlet.jsp.tagext.BodyTag
    if (_int0 == BodyTag.EVAL_BODY_BUFFERED) { //[ /login.jsp; Line: 4]
    ^
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:168: cannot resolve symbol
    symbol : variable EVAL_BODY_BUFFERED
    location: interface javax.servlet.jsp.tagext.BodyTag
    if (_int1 == BodyTag.EVAL_BODY_BUFFERED) { //[ /login.jsp; Line: 8]
    ^
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:203: cannot resolve symbol
    symbol : variable EVAL_BODY_BUFFERED
    location: interface javax.servlet.jsp.tagext.BodyTag
    if (_int2 == BodyTag.EVAL_BODY_BUFFERED) { //[ /login.jsp; Line: 13]
    ^
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:216: cannot resolve symbol
    symbol : variable EVAL_BODY_BUFFERED
    location: interface javax.servlet.jsp.tagext.BodyTag
    if (_int2 == BodyTag.EVAL_BODY_BUFFERED) out = pageContext.popBody(); //[ /login.jsp; Line: 13]
    ^
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:226: cannot resolve symbol
    symbol : method doAfterBody ()
    location: class org.apache.struts.taglib.html.FormTag
    } while (_html_form0.doAfterBody() == IterationTag.EVAL_BODY_AGAIN); //[ /login.jsp; Line: 16]
    ^
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:235: cannot resolve symbol
    symbol : method doAfterBody ()
    location: class org.apache.struts.taglib.html.HtmlTag
    } while (_html_html0.doAfterBody() == IterationTag.EVAL_BODY_AGAIN); //[ /login.jsp; Line: 18]
    ^
    6 errors
    Wed Jul 25 17:06:07 GMT+05:30 2007
    Please reply the solution

    I don't know about that, but I am using MyFaces and tomahawk with WLS8.1 sp5 jdk1.4.2_05 and it works fine.
    I do remember getting such an error when I moved from Sun RI to MyFaces and all I can recall is that it was a commons library mismatch problem or some classpath problem...

  • Problem of Java - javascript and javascript - java communicate of same obje

    Hi all,
    I have met a great problem in program an applet! I have tried to communicate between java and javascript and javascript and java in the same page by using jsobject. However, problem occur. It is not a problem to call javascript from java by using jsobject. However, javascript call java by using document.object.function has problem. It cannot find out the object in IE. I have followed the webpage show in java, but the browser still prompt me the object called client not find. Please help!! My html code is shown as follow:
    <HTML>
    <HEAD>
    <TITLE>Alva Final Year Project Demo</TITLE>
    </HEAD>
    <Script language="javaScript">
    function show(html){
    layer.innerHTML = html;
    function getResponse(response){
    alert("response: " + response);
    document.client.getJSCommunicate();
    </Script>
    <BODY>
    <DIV id="layer" style="position:absolute">
    <H2>Secure Server</H2>
    <HR>
    <!--"CONVERTED_APPLET"-->
    <!-- CONVERTER VERSION 1.0 -->
    <OBJECT id="client" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    WIDTH = "800" HEIGHT = "400" codebase="http://java.sun.com/products/plugin/1.1.1/jinstall-111-win32.cab#Version=1,1,1,0">
    <PARAM NAME = CODE VALUE = "ClientPart.class" >
    <PARAM NAME="SCRIPTABLE" VALUE="true">
    <PARAM NAME="MAYSCRIPT" VALUE="true">
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.1">
    <COMMENT>
    <EMBED type="application/x-java-applet;version=1.1" java_CODE = "ClientPart.class" NAME = "client" WIDTH = "800" HEIGHT = "400" pluginspage="http://java.sun.com/products/plugin/1.1.1/plugin-install.html"><NOEMBED></COMMENT>
    </NOEMBED></EMBED>
    </OBJECT>
    <!--
    <APPLET CODE = "ClientPart.class" WIDTH = "800" HEIGHT = "400" NAME = "clientPart" >
    </APPLET>
    -->
    <!--"END_CONVERTED_APPLET"-->
    </DIV>
    </BODY>
    </HTML>
    Thanks your kindly help.
    Alva

    Everthing looks fine to me from here, you should be able to just call the java function direct such as
    document.myAppletObj.doMethod();
    I think your problem could be that your object is called "client". IE can get funny about names, it didn't like me calling a method delete()!!
    Try adding something else to the name such as "my_client", and see if this works any better.
    Chris

  • Use of javascript and textarea with HTML editor

    Hi all,
    I have been trying to use some onchange javascript in the HTML Form Element Attributes of an item which is a textarea with an HTML Editor. It just seems to ignore the code. When you "view source" the code does not seem to be there.
    What I am attempting to do is described in thread: detecting changes to items prior to submitting page
    i.e. to warn a user that if they leave the page without saving they will lose their changes. It works fine with most of the other items on the page i.e. text boxes, select lists but not the textarea with html editor.
    Is there somewhere else I should be putting my js for items of this type? I have spent some time looking through the forum posts but cannot find an answer so far.
    Thanks,
    Brian

    I'm having the same problem.
    Would like to use the onChange event in a textarea with html editor.
    This works in Firefox (where I don't get the html editor but only a textarea) but doesn't seem to work in IE.
    Is there another way of detecting the user has changed the text in the html editor?
    Thanks,
    Pieter

  • How to include javascript and HTML in analysis output?

    Is there any document for that? Currently I set Treat Text As HTML under Data Format tab and include some simple HTML in Column formula, but I doubt it is correct way to include javascript and HTML in ayalysis output. Can anybody provide any idea or sample?
    Thanks

    Hi,
    i am not sure about javascript but yes treat text as Html is used to utilize HTML power in OBIEE.There are many examples of this.Common uses are a href,GoNav and PortalPagenav fuction.These function are mix of HTML and OBIEE.We gebrally use this option when we want to carry out some HTML operation on data rendered by OBIEE.Common example is to make data values a hyperlink for which we use a href
    See the below links for GoNav and a href
    http://108obiee.blogspot.com/2009/09/go-url-request-navigation-between.html
    Creating Hierarchies on Direct Database Requests
    You can also write java scripts here.
    Regards,
    Sandeep

  • Problem: Localisation with JSTL FMT and Struts

    Hello!
    I am working on my first project with JSP / Servlets including JSTL and Struts Tag Libraries.(plus tiles from JSTL)
    I am trying to use localised messages, to deploy a webshop in multiplle languages.
    I allready managed to accomplish that the messages are read out of a file ApplicationResources.en.properties and another one ApplicationResources.de.properties which will be chosen by the preferences of the browser (JSTL FMT:message tag).
    The strange this is, this only works the first time the servlets are compiled. After I opened the servlet once in my browser, I am allways seeing the message in that language that was used first, even if I set the the locale trough a link in the URL. I am using this code:
    http://localhost:8080/Inkrement18/buchladenseite.jsp?lang=en
    <c:if test='${param.lang == "de"}'>
    DE <fmt:setLocale value="de" scope="session" />
    <fmt:setBundle basename="ApplicationResources" scope="session" />
    </c:if>
    <c:if test='${param.lang == "en"}'>
    EN <fmt:setLocale value="en" scope="session" />
    <fmt:setBundle basename="ApplicationResources" scope="session" />
    </c:if>It seems to me, the servlet is compiled once, and afterwards the locale does not get checked anymore. Is that possible?
    When I delete the compiled servlets from the work directory by hand, my link to change the locale manually works once, till I delete the servlets again (the session does not get killed by deleting the servlets!)
    My webserver is Jakarta Tomcat 5.5.9 and IDE Is eclipse.
    I am not sure if it matters here, but the main page consists of 4 parts like banner, menu, main-page, footer which gets assembled trough "tiles".
    Most submenues like shopping basket / catalogue are action servlets, realised with struts, calling another .jsp page by forward.
    Any ideas are really apreciated - I have no idea where to look for the error!
    If you need any more input from my side, please let me know!
    Best regards
    Jan

    Hey Experts!
    Nobofy has a clue on this? I have really no clue where to start to look for the problem...
    Cheers...Jan

  • Using javascript with struts

    hi ,
    i have a jsp page which has a function to be called in javascript,
    if all the values entered are correct, then the details need to be submitted to the action form in struts.
    the coding is like below:-
    <%@ page language="java"%>
    <%@ taglib uri="/WEB-INF/struts-bean.tld"      prefix="bean"%>
    <%@ taglib uri="/WEB-INF/struts-html.tld"     prefix="html"%>
    <%@ taglib uri="/WEB-INF/struts-logic.tld"     prefix="logic"%>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Title</title>
    <link href="css/cherrysoft.css" rel="stylesheet" type="text/css" />
    <script language="javascript" src="javascripts/function_client.js" type="text/javascript"></script>
    <script src="javascripts/chgoto.js" language="JavaScript" type="text/javascript"></script>
    <script language="JavaScript">
    function fixSize() {
         buttondiv.style.top =  document.body.offsetTop +(document.body.offsetHeight - buttondiv.offsetHeight );
         contentDiv.style.height = document.body.offsetHeight -  buttonbar.offsetHeight - buttondiv.offsetHeight-14;
         function cancel(obj){
    obj.action="FinanceView.do?do=listBook";
              obj.submit();
         function check_details(obj)
              var frmyear=document.forms[0].fin_fromyear.value;
              var frmmonth=document.forms[0].fin_frommonth.value;
              var toyear=document.forms[0].fin_toyear.value;
              var tomonth=document.forms[0].fin_tomonth.value;
              var yearabbr=document.forms[0].fin_year_abbr.value;
              //alert("From Year : "+frmyear+" frmmonth : "+frmmonth + " : toyear "+toyear+" : to month "+tomonth);
              if(yearabbr.length < 1)
                   alert("The abbreviation field is mandatory");
                   document.forms[0].fin_year_abbr.focus();
              else if(frmyear.length < 1)
                   alert("The from year field is mandatory");
                   document.forms[0].fin_fromyear.focus();               
              else if(frmmonth.length < 1)
                   alert("The from month field is mandatory");
                   document.forms[0].fin_frommonth.focus();
              else if(toyear.length < 1)
                   alert("The to year field is mandatory");
                   document.forms[0].fin_toyear.focus();               
              else if(tomonth.length < 1)
                   alert("The to month field is mandatory");
                   document.forms[0].fin_tomonth.focus();               
              else if(frmyear == toyear)
                   alert("The from and to year cannot be same");
                   document.forms[0].fin_fromyear.focus();
              else if(frmmonth>4)
                   alert("The from month cannot start from "+frmmonth);
              else if(tomonth<3)
                   alert("The to month cannot be less than "+tomonth);
              else if(frmmonth==tomonth)
                   alert("The from month and to month cannot be same");
              else
                   obj.action="FinanceView.do?do=listBook";
                   obj.submit();
    </script>
    </head>
    <body onLoad="fixSize();" >
    <html:form action="/FinanceBeanAdd">
    <div style="height:5%;width:100%" >
         <div id="buttonbar" style="border:0px ;margin-top:0px">
         <table width="100%" cellspacing="0" class="main" >
          <tr>
                   <td class="heading" >Add Financial Year Details</td>
                     <td width="24" background="<%=request.getContextPath()%>/images/bg-titlemid.jpg"></td>
                      <td width="100"  valign="bottom" background="<%=request.getContextPath()%>/images/bgline.gif"></td>
          </tr>
         </table>
         </div>
    </div>
    <DIV id="contentDiv" class="workareadiv"  style="height:85%;width:100%">
    <table width="600px" height="380px" align="center" border"0" cellpadding="0" cellspacing="0">
         <tr>
              <td valign="top">
                   <table border="0"align="center" cellpadding="0" cellspacing="0" >
                        <tr>
                             <td  colspan="2">
                             <table width="600px" height="380px" border="0" align="center" cellpadding="0" cellspacing="0" >
                                  <tr>
                                       <td colspan="3" bgcolor="#FFFFFF">
                                            <tr>
                                                      <td colspan="3" valign="top">
                                       <div  id="enter_details" style=display:block>
                                       <table border="0" bgcolor="#FFFFFF" width="730px" >
    <tr bgcolor="#FFFFFF" class="firstrow">
    <td width='30%' align='left'style="padding-left: 40px" >
    <b>Abbreviation</b><font color='red'>*</font>
    </td>
    <td width='70%'>
    <html:text property="fin_year_abbr" maxlength="7"/></td>
    </tr>
    <tr bgcolor="#FFFFFF" class="secondrow">
    <td width='30%' align='left'style="padding-left: 40px" >
    <b>From Year</b><font color='red'>*</font>
    </td>
    <td width='70%'>
    <html:text property="fin_fromyear" maxlength="4" /></td>
    </tr>
    <tr bgcolor="#FFFFFF" class="firstrow">
    <td width='30%' align='left'style="padding-left: 40px" >
    <b>From Month</b><font color='red'>*</font>
    </td>
    <td width='70%'>
    <html:text property="fin_frommonth" maxlength="2" /></td>
    </tr>
    <tr bgcolor="#FFFFFF" class="secondrow">
    <td width='30%' align='left'style="padding-left: 40px" >
    <b>To Year</b><font color='red'>*</font>
    </td>
    <td width='70%'>
    <html:text property="fin_toyear" maxlength="4" /></td>
    </tr>
    <tr bgcolor="#FFFFFF" class="firstrow">
    <td width='30%' align='left'style="padding-left: 40px" >
    <b>To Month</b><font color='red'>*</font>
    </td>
    <td width='70%'>
    <html:text property="fin_tomonth" maxlength="2" /></td>
    </tr>
                             <tr>
                                                           <td>
                                                           <logic:messagesPresent>
                                                                <ul><font color='red' >
                                                                     <html:messages id="error1">
                                                                          <li><%= error1 %></li>                         </html:messages>
                                                                     </font>
                                                                </ul>
                                                           </logic:messagesPresent>
                                                           </td>
                                                           </tr>
                                                           </table>
                                                           </td>
                                                           </tr>
                                            </td>
                                       </tr>
                                  </table>
                                  </div>
                                  </td>
                             </tr>
                             </table>
                        </td>
                   </tr>
              </table>
    </td>
    </tr>
    </table>
    </div>
               <div id="buttondiv" style="height:10%">
                                                                       <table width="100%" align="left" border="0" cellpadding="3" cellspacing="0"  class="main" >
                                                                     <tr>
                                                                          <td colspan="4" bgcolor="#FFFFFF">
                                                                               <table border="0" cellpadding="2" cellspacing="2" align="left">
                                                                               <tr>
                                                                               <td>
                                                                                    <div align="left" id="save_btn">
                                                                                    <!-- <html:button property="do" value="Save" onclick="check_details(this.form);"/>-->
                                                                                         <!--<html:submit property="do" value="Save"/> -->
                                                                                     <input type="button" value="Save" onclick="check_details(this.form);"%>
                                                                                    </div>
                                                                               </td>
                                                                               <td><div align="left">
                                                                               <html:button property="Cancel" value="Cancel" onclick="cancel(this.form);"/>
                                                                               </div></td>
                                                                               </tr>
                                                                               </table>
              </div>
    </html:form>
    </body>
    </html>
    [/b]the problem right now is when the values are entered the details are not getting stored and it returns to the view.
    pls require someone's help.
    thanks
    sreejith

    I don't see anything at all in that code that has anything to do with JDBC.
    So certainly that code by itself can't store anything in a database.

  • Animated gif and page refresh problem

    Animated gif and page refresh problem
    Hi There,
    I'm trying to build a simple "Please wait......" screen using jsp and javascript.
    So far all is going well except that my animatate gif keeps refreshing everything the page is refresh.
    Is there a way the i can prevent the body of the page from refreshing?
    below is my sample code:
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <jsp:useBean id="StatusBean" class="com1.CandidateRelease" scope="session"/>
    <html>
    <script LANGUAGE="JavaScript">
    function refresh()
    <% if (StatusBean.isRunning()) { %>     
         //setTimeout("refresh()", 1000);
         setTimeout("location='status.jsf'", 1000);
    <% }else{%>
         window.location= "busStopAdmin.jsf";
    <%} %>
    </script>
    <head>
         <script LANGUAGE="JavaScript">     
              refresh();
         </script>     
    </head>
    <body>
         <img id="myImage" src="../img/ojp_wait.gif" alt="" width="151" height="36">
    </body>
    </html>

    Animated gif and page refresh problem
    Hi There,
    I'm trying to build a simple "Please wait......" screen using jsp and javascript.
    So far all is going well except that my animatate gif keeps refreshing everything the page is refresh.
    Is there a way the i can prevent the body of the page from refreshing?
    below is my sample code:
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <jsp:useBean id="StatusBean" class="com1.CandidateRelease" scope="session"/>
    <html>
    <script LANGUAGE="JavaScript">
    function refresh()
    <% if (StatusBean.isRunning()) { %>     
         //setTimeout("refresh()", 1000);
         setTimeout("location='status.jsf'", 1000);
    <% }else{%>
         window.location= "busStopAdmin.jsf";
    <%} %>
    </script>
    <head>
         <script LANGUAGE="JavaScript">     
              refresh();
         </script>     
    </head>
    <body>
         <img id="myImage" src="../img/ojp_wait.gif" alt="" width="151" height="36">
    </body>
    </html>

  • OC4J 9.0.3 and Struts 1.1b1

    OC4J 9.0.3 is compatible with Struts 1.0.2 but has some problem with Struts 1.1b1 tag libraries, see the following error (struts-example):
    OracleJSP: oracle.jsp.parse.JspParseException: N. riga 2, <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    Errore: duplicated tag definitions within the same TLD: password
    OC4J 9.0.2 works fine with both Struts releases.
    Any hint?

    There was a bug in struts 1.1b1 where struts-html.tld had a duplication of
    the <password> tag. The bug is 8304 (also 8152), in the apache bug database.
    To fix it, basically, you need to get rid of the extra definitions in struts-html.tld.
    Note that this .tld is in 2 places in strut-example.war, 1) under WEB-INF and
    2) in the struts.jar in WEB-INF/lib/struts.jar.
    So, extract, edit and update the jars:
    1) jar xvf struts-example.war WEB-INF/struts-html.tld
    edit WEB-INF/struts-html.tld (remove whole second password tag)
    jar uvf struts-example.war WEB-INF/struts-html.tld
    2) jar xvf struts-example.war WEB-INF/lib/struts.jar
    cd WEB-INF/lib
    jar xvf struts.jar META-INF/tld/struts-html.jar
    edit as above
    jar uvf struts.jar META-INF/tld/struts-html.jar
    cd ../..
    jar uvf struts-example.war WEB-INF/lib/struts.jar
    3) Finally redeploy struts-example.war

  • Calling1.4.1 signed applet from Javascript causes keyboard/focus problems

    Pretty sure there's a JRE bug here, but I'm posting to forums before I open one in case I'm missing something obvious :-)
    This issue may be specific to IE, I haven't tested elsewhere yet. Our web application is centered around a signed applet that is initialized with XML data via Javascript. We first noticed the problem when our users started upgrading from the 1.3.x plug-in to the 1.4.x plug-in. The major symptom was that shortcut keys stopped working. I debugged the problem off and on for about a month before I boiled it down to a very simple program that demonstrates the issue (included below). Basically, the program has a function that adds a JButton to a JPanel and registers a keyboard listener (using the new DefaultKeyboardFocusManager class) that prints a message to the console. This function is called by the applet's init() method, as well as by a public method that can be called from Javascript (called callMeFromJavascript()). I also included a very simple HTML file that provides a button that calls the callMeFromJavascript() method. You can test this out yourself: To recreate, compile the class below, JAR it up, sign the JAR, and put in the same dir with the HTML file. Load the HTML file in IE 5.0 or greater, and bring the console up in a window right next to it. Now click the button that says init--you should see the small box appear inside the button that indicates it has the focus. Now press some keys on your keyboard. You should see "KEY PRESSED!!!" appearing in the console. This is proper behavior. Now click the Init Applet from Javascript button. It has removed the button called init, and added one called "javascript". Press this button. Notice there is no focus occurring. Now press your keyboard. No keyboard events are registered.
    Where is gets interesting is that if you go back and make this an unsigned applet, and try it again, everything works fine. This bug only occurs if the applet is signed.
    Furthermore, if you try it in 1.3, signed or unsigned, it also works. So this is almost certainly a 1.4 bug.
    Anyone disagree? Better yet, anyone have a workaround? I've tried everything I could think of, including launching a thread from the init() method that sets up the components, and then just waits for the data to be set by Javascript. But it seems that ANY communication between the method called by Javascript and the code originating in init() corrupts something and we don't get keyboard events. This bug is killing my users who are very reliant on their shortcut keys for productivity, and we have a somewhat unique user interface that relies on Javascript for initialization. Any help or suggestions are appreciated.
    ================================================================
    Java Applet (Put it in a signed JAR called mainapplet.jar)
    ================================================================
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MainApplet extends JApplet implements KeyEventDispatcher
        JPanel test;
        public void init()
            System.out.println("init called");
            setUp("init");
        public void callMeFromJavascript()
            System.out.println("callMeFromJavascript called");
            setUp("javascript");
        private void setUp(String label)
            getContentPane().removeAll();
            test = new JPanel();
            getContentPane().add( test );
            JButton button = new JButton(label);
            test.add( button );
            test.updateUI();
            DefaultKeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(this);
        public boolean dispatchKeyEvent(KeyEvent e)
            System.out.println("== KEY PRESSED!!! ==");
            return false;
    }================================================================
    HTML
    ================================================================
    <form>
    <APPLET code="MainApplet" archive="mainapplet.jar" align="baseline" id="blah"
         width="200" height="400">
         No Java 2 SDK, Standard Edition v 1.4.1 support for APPLET!!
    </APPLET>
    <p>
    <input type="button" onClick="document.blah.callMeFromJavascript();" value="Init Applet via Javascript">
    </form>

    I tried adding the requestFocus() line you suggested... Same behavior.
    A good thought, but as I mention in my description, the applet has no trouble gaining the focus initially (when init() is called). From what I have seen, it is only when the call stack has been touched by Javascript that I see problems. This is strange though: Your post gave me the idea of popping the whole panel into a JFrame... I tried it, and the keyboard/focus problem went away! It seems to happen only when the component hierarchy is descended from the JApplet's content pane. So that adds yet another variable: JRE 1.4 + Signed + Javascript + components descended from JApplet content pane.
    And yes, signed or unsigned DOES seem to make a difference. Don't ask me to explain why, but I have run this little applet through quite a few single variable tests (change one variable and see what happens). The same JAR that can't receive keyboard events when signed, works just fine unsigned. Trust me, I'm just as baffled as you are.

  • Combo box in JavaScript and store the combo box values into database

    i am a developer, i have a task ie.. i have combo box in JavaScript and i have to store the combo box values into database through JavaServerPage..
    i please every one to have a look on this and please reply soon....

    dear sir,
    your suggestions are really greater the god.............
    i have applied as you said , now i am the page as updated and also i nform you that its multi select ....
    i will show the codings , then u will get a clear identification
    <script language= "JavaScript">
    <!--
    function one2two() {
        m1len = m1.length ;
        for ( i=0; i<m1len ; i++){
            if (m1.options.selected == true ) {
    m2len = m2.length;
    m2.options[m2len]= new Option(m1.options[i].text);
    for ( i = (m1len -1); i>=0; i--){
    if (m1.options[i].selected == true ) {
    m1.options[i] = null;
    function two2one() {
    m2len = m2.length ;
    for ( i=0; i<m2len ; i++){
    if (m2.options[i].selected == true ) {
    m1len = m1.length;
    m1.options[m1len]= new Option(m2.options[i].text);
    for ( i=(m2len-1); i>=0; i--) {
    if (m2.options[i].selected == true ) {
    m2.options[i] = null;
    //-->
    </script>
    <form method="POST" name="theForm" action="update.jsp">
    <table bgcolor="white" border="1" cellpadding="5" cellspacing="2" align="center">
    <tr><td align="center">
    <select id=menu1 size=10 multiple>
    <option>javascript</option>
    <option>php</option>
    <option>Zeo</option>
    <option>asp</option>
    <option>jsp</option>
    <option>ajax</option>
    <option>struts</option>
    </select>
    <p align="center"><input type="button" onClick="one2two()" value=" >> "></p>
    </td><td align="center">
    Languages you know:<BR>
    <SELECT NAME="language" multiple>
    <OPTION VALUE="c">C
    <OPTION VALUE="c++">C++
    </SELECT>
    <p align="center"><input type="button" onClick="two2one()" value=" << " ></p>
    </td></tr></table>
    <center><input type="submit" value="update"></center>
    </form>
    <h4><u>Back<h4>
    <script language= "JavaScript">
    var m1 = document.theForm.menu1;
    var m2 = document.theForm.language;
    </script>
    </body>
    </html>

  • Javascript in offline html

    Hallo.
    I have a simple question.
    Is javascript in offline html supporteted in DSP?
    I tried to place very very simple html with one row javascript into my article. Updating article to the server takes hours!!! .
    DL from server to iPad is impossible

    I have gotten it to work without a problem. I create an folder for the page and save the inDesign file within that folder, additionally I include a folder named "html" and within that folder I structure the files just like I would on a server, images, js and css folders all linked within the .html. I have used Javascript to embed web pages within the inDesign/DPS workflow that serve as multiple choice quizes, fill in the blank questions and displaying of Twitter feeds. You can even use javascript along with the localstorage function in HTML5 to store answers to questions so that when the iPad is turned off the user's answers are remembered. I have never had a problem uploading, downloading and testing in the content viewer. You may want to delete your pages, recreate and upload.

Maybe you are looking for

  • Connect java to php web page

    Hello... I am new in this forum, so I am sorry if I post my question in wrong place. I have php web page and want to call my java classes i.e connect java to php. My java code will read from file some info. then will organize these info. finally, the

  • Music on iPhone won't play or download from cloud

    At some point my iphone 5S put a large amount of the music I had put on my phone up into the cloud.  Not sure what I enabled to allow that, but now a good 50% of my music is in the cloud so when I shuffle it just skips over them.  1.  Is there a way

  • N97 mini - vibration stopped working!

    hi! i need help , since friday the vibration of my n97 mini stopped working ! its really wierd , not vibrating anymore when i touch the screen and when i receivce calls sometimes it works for a min but then stops again. i know i shuold take it to a l

  • Dvd to macbook to ipod....

    Hi im new t the mac world ( just got my macbook yesterday) however i've been trying to download a dvd into my ipod... I've tried ripping the dvd to the mac and then download it into my ipod (which i also bought yesterday lol) However the audio was ge

  • Passing Parameter from 1 R/3 system to another

    Dear Gurus,                    I would like to know, if there is a possibility, by which you can pass or call a parameter/variable (with its value) from an ABAP Program in 1 R/3 System to another ABAP Program in 2nd R/3 system ??