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

Similar Messages

  • Problem using pdk-html:multibox and pdk-html:checkbox

    Hi all,
    I am developing a PDK struts application using OC4J 10.1.2. I have to create some form pages which are going to have some checkboxes. I have tried to follow the following code in order to use the pdk version of the checkbox in my form:
    in jsp file
    <logic:iterate id="item" property="items">
    <pdk-html:multibox property="selectedItems">
    <bean:write name="item"/>
    </pdk-html:multibox>
    <bean:write name="item"/>
    </logic:iterate>
    Given an ActionForm setup like this
    private String[] selectedItems = {};
    private String[] items = {"UPS","FedEx","Airborne"};
    public String[] getSelectedItems() {
    return this.selectedItems;
    public void setSelectedItems(String[] selectedItems) {
    this.selectedItems = selectedItems;
    ....... //getters and setters of items//
    In the reset method I also reinitialize the selectedItems array like :
    selectedItems=new String[]{};
    But the value of the multibox is not reflected in the action class. To my surprise, the html code generated by the server is similar to ordinary checkbox which ideally should carry some portlet specific information like pdk-html:text
    Same is the case with single checkbox. I have created a boolean variable for the single checkbox in the actionForm class. But same problem frustrates me again. The value is not passed simply.
    Can anybody comment. Is this some kind of a bug or may be there is no support for checkbox and multibox in pdkstruts.jar (10.1.2.0.2).
    Best regards,
    Omer

    following below the code that generate the XML. I still need help.
    I hope someone can help me in this issue
    The servlet that generate the XML.
    response.setContentType("text/xml");
    String Xml = "";
    Xml = Xml + "<?xml version=\"1.0\"?>";
    Xml = Xml + "<?xml-stylesheet href=\"/XslGravaCrit.xsl\" type=\"text/xsl\"?>";
    Xml = Xml + "<!-- Here is a sample XML file -->";
    Xml = Xml + "<page>";
    Xml = Xml + "<title>Test Page</title>";
    Xml = Xml + "<content>";
    Xml = Xml + "<paragraph>What you see is what you get!</paragraph>";
    Xml = Xml + "</content>";
    Xml = Xml + "</page>";
    try{
    TransformerFactory tFactory = TransformerFactory.newInstance();
    byte[] arr=Xml.getBytes();
    ByteArrayInputStream bytes=new ByteArrayInputStream(arr);
    Source xsl=new StreamSource("../XslGravaCrit.xsl");
    Templates template=tFactory.newTemplates(xsl);
    Transformer transformer = template.newTransformer();
    transformer.transform(new StreamSource(bytes), new StreamResult(response.getWriter()));
    }catch(Exception e){
    System.out.println("Excecao 100: " + e.getMessage() + e.getLocalizedMessage());
    The XSL XslGravaCrit.xsl
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:java="http://xml.apache.org/xslt/java" exclude-result-prefixes="java"
    version="1.0">
    <xsl:strip-space elements="*"/>
    <xsl:output method="html" indent="yes" version="4.0"/>
    <xsl:template match="page">
    <html>
    <body><b>
    <xsl:value-of select="java:java.util.Date.new()"/>
         </b>
    <xsl:for-each select="/page">
    <xsl:sort select="paragraph"/>
    <xsl:value-of select="paragraph"/>
    </xsl:for-each>
    <i>Hello World</i>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>

  • 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

  • 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

  • Submiting HTML Forms with JavaFX Webview

    I've long been searching for a good web robot framework. And I also need a gui for my robot.
    So w/ the advent of JAVAFX Webengine it seemed my needs have been met finally. Specially because on the webview tutorial here , Alla Redko says: "+It supports user interaction such as navigating links *and submitting HTML forms*+".
    But after looking at the api it doesn't seem that webengine supports submiting forms, only loading pages w/ the load() method. I guess I could populate the form fields and submit them w/ executeScript() but that's just sloppy.
    Is there a way to actually submit forms w/ webengine? Are there plans to implement this feature, analogous to the load() method?
    Thanks,
    JC

    Yea, as I mentioned in the first post, I could do all that w/ JS but it's just sloppy, since I'm using Java language, not JS.
    The finding certain fields part is easy w/ the Document model and xpath, it's the populating the fields and submiting the form along w/ its hidden input fields that is the missing part.
    Does anyone know if these things are planned for the future of Webview/Webengine?You can already do this in Java today using the existing APIs if you so wished.
    import javafx.application.Application;
    import javafx.beans.property.*;
    import javafx.beans.value.*;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Scene;
    import javafx.scene.control.*;
    import javafx.scene.layout.*;
    import javafx.scene.web.*;
    import javafx.stage.Stage;
    import org.w3c.dom.*;
    import org.w3c.dom.html.*;
    public class WebViewFormPost extends Application {
      public static void main(String[] args) { launch(args); }
      @Override public void start(Stage stage) {
        final TextField fxUsername = new TextField();
        final TextField fxPassword = new PasswordField();
        final BooleanProperty loginAttempted = new SimpleBooleanProperty(false);
        final WebView webView = new WebView();
        final WebEngine engine = webView.getEngine();
        engine.documentProperty().addListener(new ChangeListener<Document>() {
          @Override public void changed(ObservableValue<? extends Document> ov, Document oldDoc, Document doc) {
            if (doc != null && !loginAttempted.get()) {
              if (doc.getElementsByTagName("form").getLength() > 0) {
                HTMLFormElement form = (HTMLFormElement) doc.getElementsByTagName("form").item(0);
                if ("/oam/server/sso/auth_cred_submit".equals(form.getAttribute("action"))) {
                  HTMLInputElement username = null;
                  HTMLInputElement password = null;
                  NodeList nodes = form.getElementsByTagName("input");
                  for (int i = 0; i < nodes.getLength(); i++) {
                    HTMLInputElement input = (HTMLInputElement) nodes.item(i);
                    switch (input.getName()) {
                      case "ssousername":
                        username = input;
                        break;
                      case "password":
                        password = input;
                        break;
                  if (username != null && password != null) {
                    loginAttempted.set(true);
                    username.setValue(fxUsername.getText());
                    password.setValue(fxPassword.getText());
                    form.submit();
                    System.out.println("Submitted login for user: " + username);
        engine.getLoadWorker().exceptionProperty().addListener(new ChangeListener<Throwable>() {
          @Override public void changed(ObservableValue<? extends Throwable> ov, Throwable oldException, Throwable exception) {
            System.out.println("Load Exception: " + exception);
        GridPane inputGrid = new GridPane();
        inputGrid.setHgap(10);
        inputGrid.setVgap(10);
        inputGrid.addRow(0, new Label("Username: "), fxUsername);
        inputGrid.addRow(0, new Label("Password: "), fxPassword);
        Button fxLoginButton = new Button("Login to Oracle Forums");
        fxLoginButton.setOnAction(new EventHandler<ActionEvent>() {
          @Override public void handle(ActionEvent t) {
            if (notEmpty(fxPassword.getText()) && notEmpty(fxPassword.getText())) {
              loginAttempted.set(false);
              engine.load("https://forums.oracle.com/forums/login!withRedirect.jspa");
        final VBox layout = new VBox(10);
        layout.setStyle("-fx-background-color: cornsilk; -fx-padding: 10;");
        layout.getChildren().addAll(
          new Label("Enter your Oracle Web Account credentials"),
          inputGrid,
          fxLoginButton,
          webView
        stage.setScene(new Scene(layout));
        stage.show();
      private boolean notEmpty(String s) {
        return s != null && !"".equals(s);
    }Personally, I think using JavaScript via engine.executeScript calls in combination with jquery might be a less messy solution (as I don't like writing against the raw dom apis), but I understand that there are valid reasons why you might prefer to use a Java only solution.
    https://gist.github.com/jewelsea/3077942 "Embeds jQuery in a document loaded into a WebView."

  • Can I use JavaScript HTML Portlet and PDK Portlets

    Can I use JavaScript HTML Portlet and PDK Portlets?
    My Script works fine with the an HTML portlet but it always gives a an Error Message in the status bar is that normal...
    Other then that I have JavaScript in my PDK portlet page it does not work.. it is the the same javascript I use for in my HTML portlet which works in HTML portlets..

    You'll have to place your JavaScript in the header section of your Portal page. To do so, use HTML/UI templates. For more information, refer to the How to Design and Build Compelling Portal Interfaces whitepaper.
    Good luck,
    Peter

  • Using HTML, what happens to form variables on submit?

    If I create a simple AIR app that  has two files, lets say index.html and next.html, how would I pass form  variables from one page to the next since there is no server side  scripting?
    Can  it be done via javascript somehow, by maybe saving the variables from  the first page and then retreiving them on the second?
    Here a  sample of what I am trying to accomplish:
    index.html
    <html>
    <body>
    <form method="GET"  action="next.html" name="theName">
      Name:
      <input type="text"  name="textField">
      <input type="submit" value="submit"  name="submitButton">
    </form>
    </body>
    </html>
    next.html
    <html>
    <body>
    <!-- How to display  textField variable from previous pages theForm field? -->
    </body>
    </html>

    Found solution here:
    http://forums.adobe.com/message/2649503#2649503

  • HTML form and java

    Hi,
    I have been pulling my hair out for the past week on this with no suces EVEN after forum searching, googling ..........
    Here is the problem:
    I have an HTML form of the following type and need to pass in a Javascript variable to the servlet called on hitting the submit button.
    <script>document.write('<form name="Test" method="get" onSubmit="return chkfields(this)" action="/servlet/NewServlet?ABC='+unescape(params["ABC"])+'">')</script>For debugging purposes, I have a document.write statement and I see it on the page right above that line and it does display it on the field. However this thing does not pass the varible to the servlet. I even tried replacing the unescape(params["ABC"]) with just the variable name used in the form as ABC and that did nto work either. Please suggest any other suggestions.

    test.html:
    <!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
    <html>
    <head>
    <script language="JavaScript">
    function setHidden() {
      document.testForm.testInput.value = "test";
      return true;
    </script>
    </head>
    <body>
    <form method="post" name="testForm" action="test2.jsp" onSubmit="return setHidden()">
    <INPUT TYPE="hidden" NAME="testInput">
    <INPUT TYPE="submit" VALUE="submit">
    </form>
    </body>
    </html>test2.jsp:
    <html>
    </head>
    <body>
    <%
    out.println(request.getParameter("testInput"));
    %>
    </body>
    </html>

  • Using Javascript and ScriptUI to create a form that brings in a symbol from library

    Hello everyone,
    I've been trying to pull together the right info to use javascript to create a form to bring in particularsymbols from the symbol library based on the variables taken from the form. I've taken bits and pieces from various sample scripts and tried to make this work, but my problem appears when I try to use conditionals.
    This is a limited version of what I want to do, but it is enough to get the point across.
    1. I want to select a script that has various dropdown boxes. I would like the first dropdown to give me 3 options: 10, 13, 18
    2. I would also like another drop down box that gives me three more options: single needle, double needle, and knife edge.
    3. I would then like it to have an "ok" button and "Cancel" button.
    4. From here when I click the ok button, a symbol is brought in from the library depending on what parameters were given to the form.
    ex. If I selected 10 in the first drop down and double needle in the second, I would like "SYMBOL A" to be pulled from the library and centered on the artboard.
    ex. If I selected 13 in the first drop down and double needle in the second, I would like "SYMBOL B" to be pulled from the library and centered on the artboard.
    I've gotten the UI to pop up and it works as planned as well as bringing in a symbol, my problem comes when I try to incorporate conditionals and functions.
    Here is my script. Please let me know what I'm doing wrong.
    var myDoc = app.activeDocument;
    var Pallette = new Window ("dialog", "Create a Shell");
    Pallette.add ("statictext", undefined, "Fill Opening in Inches:");
    Pallette.orientation = "row";
    var myDropdown =  Pallette.add ("dropdownlist", undefined, ["10", "13", "18"]);
    myDropdown.selection = 1;
    var myButtonGroup =  Pallette.add ("group");
    myButtonGroup.orientation = "column";
    var btnCreate = myButtonGroup.add ("button", undefined, "OK");
    MyFillSelection = myDropdown.selection
    btnCreate.onClick = function () {
        if ( MyFillSelection = "13") {
                   symbolRef = myDoc.symbols["SYMBOL A"];
            symbolItemRef1 = myDoc.symbolItems.add(symbolRef);
           redraw();
    var btnCancel = myButtonGroup.add ("button", undefined, "Cancel");
      Pallette.show ();
    If anyone has any input, it would be much appreciated.
    thanks,

    MyFillSelection = myDropdown.selection is outside the function, so it will always read "13", nothing is making the value change.
    move that line into your function and add the text property to it...MyFillSelection = myDropdown.selection.text;
    then do your if comparisons, that will do it.

  • How to reference html form element in javascript ?

    Dear all,
    My DPK portlet is like this:
    I created a html form within it there a several textfields, a hidden field and a SUBMIT button.
    The application will call itself to insert a new record to database table on pressing the SUBMIT button.
    My problem is that since all the form textfields and the hidden field ara all the qualified names, and I want to set the hidden field to some value, say "ADD" on the onsubmit event in the form. How can I reference the hidden field in javascript ?
    Or can you suggest another strategy to do that ?
    Many thanks
    George (HK)
    Here are the code fragment:
    String portletParamSubmit = "mSubmit";
    String portletParamTitle = "mTitle";
    String portletParamURL = "mURL";
    String portletParamAction = "mAction";
    //Fully qualified URL.
    String fSubmit = HttpPortletRendererUtil.portletParameter(request, portletParamSubmit);
    String formName = UrlUtils.htmlFormName(pReq, null);
    String fTitle = HttpPortletRendererUtil.portletParameter(request, portletParamTitle);
    String fURL = HttpPortletRendererUtil.portletParameter(request, portletParamURL);
    String fAction = HttpPortletRendererUtil.portletParameter(request, portletParamAction);
    String vl_Title = "";
    String vl_URL = "";
    String vl_Action = "";
    String vl_result = "";
    if( pReq.getQualifiedParameter(portletParamAction) == "ADD")
    vl_Title = pReq.getQualifiedParameter(portletParamTitle);
    vl_URL = pReq.getQualifiedParameter(portletParamURL);
    //Add News.
    try{
    CallableStatement cs_2 = conn_erp03.prepareCall("{call XXCT_PORTAL_NEWS_PKG.P_ADD_NEWS(?,?,?,?,?,?)}");
    cs_2.setString(1, "ADD");
    cs_2.setString(2, pReq.getUser().getName());
    cs_2.setString(5, vl_Title);
    cs_2.setString(6, vl_URL);
    cs_2.registerOutParameter(10,Types.VARCHAR);
    cs_2.execute();
    vl_result = cs_2.getString(10);
    cs_2.close();
    catch (SQLException se) {
    sb.append("Query: SQL Exception: " + se.toString());
    System.out.println(sb);
    %>
    <head>
    <script language = "Javascript">
    <!--
    function SetAction() {
    document.<NAME THE OF HIDDEN FIELD>.value = 'ADD'; <====How to refer it ?
    return 1;
    // -->
    </script>
    </head>
    <body>
    <form name="<%=formName%>" method= "POST" action="<%=UrlUtils.htmlFormActionLink(pReq, UrlUtils.PAGE_LINK)%>" onSubmit="return SetAction()">
    <%= UrlUtils.htmlFormHiddenFields(pReq, UrlUtils.PAGE_LINK, formName)%>
    <table>
    <tr>
    <td>Title</td>
    <td><input type="text" length=100 name="<%=fTitle%>"></td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td>URL</td>
    <td><input type="text" name="<%=fURL%>"></td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td><INPUT type="submit" name="mysubmit" value="ADD NEWS"></td>
    <td><input type="hidden" name="<%=fAction%>"></td>
    <td> </td>
    <td> </td>
    </tr>
    </table>
    </body>

    hi Neeraj Sidhaye,
    After trying your suggest codings,
    I come to the problem of null pointer exception message captured in the application log file as:
    06/08/11 11:48:57 Prj_News: [instance=212602_PORTLET_NEWS_49519249, id=79187977878,4] ERROR: AbstractResourceRenderer.renderBody - recieved ServletException. Root cause is
    java.lang.NullPointerException
    What's wrong ?
    George (HK)
    Here is my coding:
    <%@page contentType="text/html; charset=Big5"
    import="javax.naming.*"
    import="javax.sql.*"
    import="java.sql.*"
    import="oracle.jdbc.*"
    import="java.sql.Date"
    import="java.util.*, oracle.portal.provider.v2.*"
    import="oracle.portal.provider.v2.http.HttpCommonConstants"
    import="oracle.portal.provider.v2.render.PortletRendererUtil"
    import="oracle.portal.provider.v2.render.PortletRenderRequest"
    import="oracle.portal.provider.v2.render.http.HttpPortletRendererUtil"
    import="oracle.portal.provider.v2.url.UrlUtils"
    %>
    <%
    StringBuffer sb = new StringBuffer();
    PortletRenderRequest pReq = (PortletRenderRequest)request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    %>
    <%
    //Database connection.
    InitialContext ic = new InitialContext();
    DataSource ds_erp03 = null;
    Connection conn_erp03 = null;
    try {     
    ds_erp03 = (DataSource)ic.lookup("jdbc/ERP03_DS");
    conn_erp03 = ds_erp03.getConnection();
    catch (SQLException se) {
    sb.append("Connection: SQL Exception: " + se.toString());
    System.out.println(sb);
    catch (NamingException ne) {
    sb.append("Connection: Naming Exception: " + ne.toString());
    System.out.println(sb);
    %>
    <%
    //Self defined names.
    String portletParamSubmit = "mSubmit";
    String portletParamMainCat = "mMainCat";
    String portletParamSubCat = "mSubCat";
    String portletParamTitle = "mTitle";
    String portletParamURL = "mURL";
    String portletParamDescription = "mDescription";
    String portletParamEffDateFm = "mEffDateFm";
    String portletParamEffDateTo = "mEffDateTo";
    String portletParamAction = "myAction";
    //Fully qualified URL.
    String fSubmit = HttpPortletRendererUtil.portletParameter(request, portletParamSubmit);
    String formName = UrlUtils.htmlFormName(pReq, null);
    String fMainCat = HttpPortletRendererUtil.portletParameter(request, portletParamMainCat);
    String fSubCat = HttpPortletRendererUtil.portletParameter(request, portletParamSubCat);
    String fTitle = HttpPortletRendererUtil.portletParameter(request, portletParamTitle);
    String fURL = HttpPortletRendererUtil.portletParameter(request, portletParamURL);
    String fDescription = HttpPortletRendererUtil.portletParameter(request, portletParamDescription);
    String fEffDateFm = HttpPortletRendererUtil.portletParameter(request, portletParamEffDateFm);
    String fEffDateTo = HttpPortletRendererUtil.portletParameter(request, portletParamEffDateTo);
    // String fAction = HttpPortletRendererUtil.portletParameter(request, portletParamAction);
    String fAction="myAction";
    String vl_MainCat = "";
    String vl_SubCat = "";
    String vl_Title = "";
    String vl_URL = "";
    String vl_Description = "";
    String vl_EffDateFm = "";
    String vl_EffDateTo = "";
    String vl_Action = "";
    String vl_result = "";
    %>
    <%
    if( pReq.getQualifiedParameter(portletParamAction).equals("ADD")) <= This line cause the null pointer exception <<<<<<<<
    vl_MainCat = pReq.getQualifiedParameter(portletParamMainCat);
    vl_SubCat = pReq.getQualifiedParameter(portletParamSubCat);
    vl_Title = pReq.getQualifiedParameter(portletParamTitle);
    vl_URL = pReq.getQualifiedParameter(portletParamURL);
    vl_Description = pReq.getQualifiedParameter(portletParamDescription);
    vl_EffDateFm = pReq.getQualifiedParameter(portletParamEffDateFm);
    vl_EffDateTo = pReq.getQualifiedParameter(portletParamEffDateTo);
    //Add News.
    try{
    CallableStatement cs_2 = conn_erp03.prepareCall("{call XXCT_PORTAL_NEWS_PKG.P_ADD_NEWS(?,?,?,?,?,?,?,?,?,?)}");
    cs_2.setString(1, "ADD");
    cs_2.setString(2, pReq.getUser().getName());
    cs_2.setString(3, pReq.getQualifiedParameter(portletParamMainCat));
    cs_2.setString(4, pReq.getQualifiedParameter(portletParamSubCat));
    cs_2.setString(5, pReq.getQualifiedParameter(portletParamTitle));
    cs_2.setString(6, pReq.getQualifiedParameter(portletParamURL));
    cs_2.setString(7, pReq.getQualifiedParameter(portletParamDescription));
    cs_2.setString(8, pReq.getQualifiedParameter(portletParamEffDateFm));
    cs_2.setString(9, pReq.getQualifiedParameter(portletParamEffDateTo));
    cs_2.registerOutParameter(10,Types.VARCHAR);
    cs_2.execute();
    vl_result = cs_2.getString(10);
    cs_2.close();
    catch (SQLException se) {
    sb.append("Query: SQL Exception: " + se.toString());
    System.out.println(sb);
    %>
    <SCRIPT SRC="<%=HttpPortletRendererUtil.absoluteLink(pReq,"clock.js")%>"></SCRIPT>
    <LINK REL=stylesheet TYPE="text/css" HREF="<%=HttpPortletRendererUtil.absoluteLink(pReq,"tables_style.css")%>">
    <head>
    <script language = "Javascript">
    <!--
    function doSubmit(myAction)
    // alert(myAction);
    if(myAction == 'ADD')
    document.forms[0].<%=fAction%>.value="ADD";
    else if(myAction == 'DELETE')
    document.forms[0].<%=fAction%>.value="DELETE";
    document.forms[0].submit();
    // -->
    </script>
    </head>
    <body>
    <form name="<%=formName%>" method= "POST" action="<%=UrlUtils.htmlFormActionLink(pReq, UrlUtils.PAGE_LINK)%>">
    <%= UrlUtils.htmlFormHiddenFields(pReq, UrlUtils.PAGE_LINK, formName)%>
    <table>
    <tr>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">Page</td>
    <td>
    <select name="<%=fMainCat%>">
    <option value="X">-- Please select --
    <option value="FAE">FAE
    <option value="PM">Product Marketing
    <option value="RD">R&D
    <option value="BU">Business Unit
    </select>
    </td>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">Region</td>
    <td>
    <select name="<%=fSubCat%>">
    <option value="X">-- Please select --
    <option value="1">Region 1
    <option value="2">Region 2
    <option value="3">Region 3
    <option value="4">Region 4
    </select>
    </td>
    </tr>
    <tr>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">Date From</td>
    <td><input type="text" size="6" maxlength="10" name="<%=fEffDateFm%>"></td>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">Date To</td>
    <td><input type="text" size="6" maxlength="10" name="<%=fEffDateTo%>"></td>
    </tr>
    </table>
    <table>
    <tr>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">Title</td>
    <td><input type="text" size="100" maxlength="100" name="<%=fTitle%>"></td>
    </tr>
    <tr>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">URL</td>
    <td><input type="text" size="100" maxlength="200" name="<%=fURL%>"></td>
    </tr>
    <tr>
    <td style="color:#fff;font-family:'Arial';font-size:14px;text-align:right;">Description</td>
    <td><textarea id="description" rows="5" cols="76" maxlength="500" name="<%=fDescription%>"></textarea></td>
    </tr>
    <tr>
    <td><input type="hidden" id="<%=fAction%>" name="<%=HttpPortletRendererUtil.portletParameter(request, portletParamAction)%>"></td>
    <td><input type=button value="Add" onClick="doSubmit('ADD')"></td>
    </tr>
    </table>
    </form>
    </body>

  • Making PL/SQL calls in an HTML form that also uses Javascript

    Hi -- I'm completely new to Web Development and am trying to create an HTML page which contains Javascript for the event handlers. However, I need to dynamically populate one of my combo boxes based on the change event of another combo box, and need to call a stored procedure to write the options for the dynamically loaded box. I also need to figure out how to write my data to the database, etc., so I figured that once I determine how to make my PL/SQL calls for this one event, I should be good to go with the others.
    Any help is greatly appreciated!
    ~Christine

    Hi!
    You have several options:
    -mod_plsql and Web Toolkit Reference
    http://download-uk.oracle.com/docs/cd/B14099_14/web.1012/b14010/toc.htm
    http://download-uk.oracle.com/docs/cd/B14099_14/web.1012/b15896/toc.htm
    -JDBC from Java
    http://download-uk.oracle.com/docs/cd/B19306_01/java.102/b14355/basic.htm#sthref160
    -portlet
    http://www.oracle.com/technology/products/ias/portal/pdk.html
    I think first you should read about this technologies to get better overview and then you can decide which is the best for you!

  • Can a form variable hold a javascript complex object?

    I have a method in a fragmentScript script object that creates a javascript object formatted like below:
    customerObject
        name      [string]
        address  [string]
        city        [string]
        state      [string]
        list of accounts    [array]
    When the script is done executing, the subform containing the script gets hidden, and needs to pass the object to another subform which becomes visible. 
    Can I pass this object via a form variable (located under File-Form Properties, Variables tab)?  That is, can a form variable contain a complex javascript object?
    Thanks,
    Elaine

    Hey Bruce, I'm having a problem with the eval funtion returning a null, can you help me?
    Here's my code snippet:
    var tempRetCust = objFragment.resolveNode("returnCustomerObj");    //this is good  
    var objCustomer = myCustomerObject;     tempRetCust= objCustomer.toSource();     app.alert("tempRetCust "
    + tempRetCust);       //  the toSource method works great and the alert here returns proper data
    var retCust = eval(tempRetCust.value);   if (retCust==null ) app.alert ("return cust is null");     // the eval doesn't seem to work and the retCust variable is null.
    Thanks!
    Elaine

  • MySQL:  SELECT * FROM with a Variable from an HTML form

    Hello,
    I would like to insert the variable "find" from the HTML form below in the MySQL "SELECT * FROM" query beneath it.  In other words, where the word "santafe" appears below, I would like to insert the variable "$find."  But I can't quite get it to work.  How do I do it?
    Thanks in advance,
    John
    <form action="tsearch11.php" method="post">
    <label>Enter Topic:
    <input type="text" name="find" size="55"/>
    <input type="hidden" name="searching" value="yes" />
    <input type="submit" name="search" value="Search" />
    </label>
    </form>
    Then, on tsearch11.php:
    <?
    mysql_connect("mysqlv3", "username", "password") or die(mysql_error());
    mysql_select_db("sand2") or die(mysql_error());
    $find = strip_tags($find);
    $find = trim ($find);
    $t = "SELECT * FROM santafe"; 
    $y = mysql_query($t);
    ?>

    Putting a form variable in a SQL query to look for table or column names requires an extra level of security. You need to create an array of the valid names, and check that the form variable is in that array.
    $find = get_magic_quotes_gpc() ? stripslashes($_POST['find']) : $_POST['find'];
    $find = mysql_real_escape_string(trim($find));
    // create an array of valid table names
    $tables = array('santafe', 'sanfernando', 'guadalupe');
    // check that the variable is in the permitted array
    if (in_array($find, $tables)) {
      $t = "SELECT * FROM $find"; 
      $y = mysql_query($t);
    } else {
      $error = 'Sorry, you selected an invalid table.';
    In the page itself, check whether $y exists before using it. Otherwise display the error:
    if (isset($y)) {
      // display the results
    } elseif (isset($error)) {
      echo $error;

  • Opening HTML form using javascript

    Hi,
    I want a syntax or code in javascript for moving one HTML form to another HTML form. I have to designed the Registration form in HTML. If click the Submit button, then it goes to another form. I validation in javascript. so i want a code for this is in javascript
    I tried this codes
    location.href='path of file';
    and
    document.URL='path of file';
    But it didn't work properly.
    Can anyone help me pls.

    Java is not Javascript.
    try on a javascript forum

  • Problem in opening 'Find Service Request' and 'Create Service Request' HTML forms

    Hi,
    I  am working on creating some date for EBS Service, and I am unable to open 'Find Service Request' and 'Create Service Request' HTML forms.
    I keep getting the error message :
    Oracle error - 20001: ORA-20001: APP-FND-02902: Multi-Org profile option is required. Please set either MO: Security Profile or MO: Operating Unit profile option. has been detected in MO_GLOBAL_INIT.
    I have min knowledge of EBS set up and configuration. We just use EBS as a source system for our ETLs.  Please suggest any workaround to get resolve the issue.
    Thanks,
    Kishore

    Navigate to System Administrator responsibility > Profile > System. Search for the profile MO: Operating Unit and under responsibility field, put in the responsibility name you are using for creating the service request, click OK and enter the desired operating unit value in the next window. It pulls up all operating units defined and you can chose the desired one.
    Thanks
    Shree

Maybe you are looking for

  • Firefox slow to start and websites won't load?

    Setup: Windows Vista. Firefox 4.0.1. McAfee Total Protection 2011. Wireless home network. As of yesterday everything worked well. Tonight I am having problems 1) connecting to the internet - I have to reconnect to my router before it accesses the int

  • 'Send to iDVD" from iPhoto problems - photos don't show up properly

    Hi When I send photos/albums from iPhoto to iDVD using the function: Share->Send to iDVD' iDVD opens up, but the screen is blank in iDVD, the project info shows the photos are there, but there is nothing playing - just the blank screen. When I do the

  • First post but hey

    ok this is my first post here, i have mainly been a lurker looking around see what problems can be resolved by what methods... (my specs are at the bottom of my post) the only problem that I seem to have is with HitMan 2, which i have not found a sol

  • HOW DO YOU DOWNGRADE TO 6.4????

    I need a link or a how-to downgrade to Itunes 6.4

  • Question about creating medleys

    I'm looking for opinions as to which method of combining mp3s into a medley will give the highest quality results (obviously, the best option would be to re-rip the original CD, these are alternatives for when the CD isn't available): 1 - Burn tracks