Using javascript to redirect a form in portal to a report

Hi. I am trying to call a report or a dynamic page from a form I created. When I select the query button I want it to show the report or dynamic page based on the parameters I passed in the URL. I have the following javascript functions that get the parameters from the comboboxes.
Additional PL/SQL Code... before displaying the page.
htp.p('<script language="JavaScript">');
htp.p('function getItemInst(form,targetInst)');
htp.p('{var objname;');
htp.p(' var selectedInst;');
htp.p(' for(var j =0; j < form.length; j++)');
htp.p(' { objname = form.elements[j].name.split(".");');
htp.p(' if(objname[2] == targetInst)');
htp.p(' { selectedInst = form.elements[j].value;');
htp.p(' return selectedInst;');
htp.p(' }');
htp.p(' }');
htp.p('}');
htp.p('function getItemCip(form,targetCip)');
htp.p('{ ');
htp.p(' var objname;');
htp.p(' var selectedCip;');
htp.p(' for(var j =0; j < form.length; j++)');
htp.p(' {objname = form.elements[j].name.split(".");');
htp.p(' if(objname[2] == targetCip)');
htp.p(' { selectedCip = form.elements[j].value;');
htp.p(' return selectedCip;');
htp.p(' }');
htp.p(' }');
htp.p('}');
htp.p('</script>');
When I click the query button it uses this code:
using a query button->onclick javascript event handler
var v_inst = getItemInst(this.form, "INST");
var v_cip_course = getItemCip(this.form, "CIP_COURSE");
var exec_url = "http://"+window.location.hostname + "/pls/portal/MAJOR_APP.PROGRAMOFSTUDYSEARCHRESULTS.show?p_arg_names=p_cip_course&p_arg_values="+v_cip_course+
"&p_arg_names=p_inst&p_arg_values="+v_inst;
window.location.href=exec_url;
My problem is that it doesn't use the new url I created and go to the report. It just refreshes the form page I created. I am I missing a step or something?
Thanks ;)

Maybe you could try it like this... I saw this question answered not too long ago.
Submit Portal Form Values to Portal Report

Similar Messages

  • Problem with using javascript in interactive adobe form

    Hi All,
        I have a problem when accessing text field value which is present inside a subform using javascript.
    I tried giving data.page4.sub-5.<fieldname>.rawvalue but its not working. Please provide a solution.
    Thank you in Advance.

    Since this question is related to JavaScript running within the Form and not the connection between the form and Web Dynpro - it really belongs in the Interactive Forms by Adobe Forum.

  • Problem using javascript to submit jsf form, values not submitted

    Greetings!
    I have a t:selectOneMenu where I want the page to be submitted when they change the selected value. At this point, I am able to get the form to submit and reload the page, which is all fine. The problem is that none of the values from the page are not set in the backing bean. I have break points on the setter methods that are not being hit.
    I have tried a number of things from searching multiple forums, but here are snippets from my latest version...
    <h:form>
    <t:commandLink id="hiddenLink" forceId="true" value="test link"
    action="#{pc_PageX.doBtnHiddenLinkAction}"></t:commandLink>
    <t:selectOneMenu id="pageList_top" forceId="true" value="#{pc_PageX.ValueX}"
         onchange="jspellSync(); submitPageX();">
         <f:selectItems value="#{pc_PageX.ListX}" />
    </t:selectOneMenu>
    </h:form>
    function submitPageX(){
         var hiddenLink = document.getElementById("hiddenLink");
         hiddenLink.click();
    }Note that the <t:commandLink> is not hidden, though it will be in the final version if I can get this to work.
    If I click the commandLink myself, the page is submitted with all the page values as expected. If I change the list value, thus using javascript to fire the commandLink's click event, the page is submitted with NO values.
    Can anyone come up with an explanation for this behavior? Or better yet, a solution?
    A couple other things I've tried...
    - Not using a commandLink and using jsf's submit function -> onchange="jspellSync(); submit();"
    - Clicking the link using other ways -> hiddenLink.fireEvent('onclick');
    If all else fails, I'll just add a button that they have to click to submit the form.

    snotmare wrote:
    BalusC wrote:
    I recall this problem in one of the ancient JSF versions. Which JSF version do you use? Do you have any room to upgrade to latest? We're using an IBM implementation of JSF, which is at version 7.0. The IBM implementation appears to be built on the JSF base 1.1.That's not an IBM JSF implementation, they do not have any one, they just have some component libraries which runs on top of some JSF implementation. RAD/WSAD ships by default with Sun JSF RI. Try upgrading to at least 1.1_02 which you can download from the aforementioned link. There's a gap of 2 years (and inherently a lot of bugfixes) compared to 1.1. If the application server used supports Servlet 2.5, you could even upgrade to the latest 1.2.
    We've had other issues with the IBM implementation, which could be the cause in this case too. We've been talking about switching to MyFaces, but there is one feature of the IBM version that we like. It's basically a script collector (hx:scriptCollector) that allows us to do pre-processing on the page.As said before, IBM does not have a JSF implementation. So replacing RI by MyFaces wouldn't make any difference.

  • Using JavaScript to Determine a Form's Folder Name

    We have an awful lot of forms, and in many cases, our custom JavaScript applies to all forms in a given folder. We would like to determine the form's folder name so that we don't have to list each and every form in a giant "IF" statement.
    Has anyone figured out how to determine a form's folder using JavaScript?
    Thanks!
    - Jake

    Jake_Turrell wrote:
    I think the only solution to the "refresh" issue would be to somehow query the hsp_object table and grab the parent_id (which for a form is the folder ID). If anyone figures out how to query the application repository from JavaScript,that would be very, very cool.
    As the database is server side and javascript is client side you would have to use something like an ajax call that passes the form id into an jsp script, the jsp script would query the repository and return the value to javascript.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to validate People Picket control at client side using javascript/Designer in New form.aspx

    Hi Folks,
    I have list library with 2 columns. where as 1 column is people picker control and it is not mandatory filed .
    When the user open newform.aspx and fill all the column values and submit it should show error message if user not enter any data in people picker control column though it is not a mandatory column.
    How to achieve this by using javascript or sharpoint designer.

    Hello,
    Here is script for that:
    http://social.msdn.microsoft.com/Forums/en-US/f1c2a651-a0fb-484d-af33-e7084439b6c8/validate-sharepoint-people-picker-using-javascript?forum=sharepointgeneralprevious
    http://ankursharepoint.blogspot.in/2012/10/javascript-validation-of-people-picker.html
    Edit your newform.aspx page and add content editor webpart on that page. Then add script on HTML source section.
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Use Javascript to redirect URL on exit of BSP

    Hi all,
    On closing of a web planning session(an BW-BPS created BSP), I would like to automatically redirect the URL address to a URL of my choice after the session is correctly closed (releasing all locks etc).
    I am looking to do this by including a javascript statement. Anyone know how to do this?
    Thanks and regards,
    Rael

    Hi Rael,
    Create 2 BSP Pages in your Appln using the foll code.
    <b> First Page  </b>
    <b>1.</b> Layout
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content design="design2003">
      <htmlb:page title = "sdsd ">
        <htmlb:form>
          <htmlb:button id      = "exitpage"
                              text    = "Exit"
                              design  = "EMPHASIZED"
                              onClick = "OnClickEventHandlerName" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b>2.</b> OnInputProcessing
       CLASS cl_htmlb_manager DEFINITION LOAD.
       DATA event TYPE REF TO if_htmlb_data.
       event = cl_htmlb_manager=>get_event_ex( request ).
       CASE event->event_id.
         WHEN 'exitpage'.
           navigation->goto_page( 'session_exit.htm' ).
       ENDCASE.
    <b> Session_exit Page </b>
    <b>1</b>. Layout
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <script language="JavaScript">
    function exitBSPApplication()
    <% CLASS cl_bsp_login_application DEFINITION LOAD. %>
    var EXIT_URL = "<%= CL_BSP_LOGIN_APPLICATION=>GET_SESSIONEXIT_URL( page =
    page ) %>";
    EXIT_URL += "&bsp_do_not_delete_sso2_cookie=X";
    self.location.href=EXIT_URL;
    window.open(EXIT_URL);
    </script>
    <form name="frmmenu" method="post">
    <body onload="exitBSPApplication()">
    Rgds,
    Jothi.
    Pl close the thread if your problem is solved.

  • Using Javascript to email a form in a workflow process

    I've created an Acroform which will be routed around in a workflow process.  The user will open the form, add information and hit a button which is coded in javascript usng the mailDoc function.
    It works perfectly EXCEPT that each time the document is forwarded, "Adobe Acrobat Pro.pdf" gets appended to the name of the file in the email.  It doesn't actually rename the file, so the file does open properly, but the email looks pretty goofy.
    Example.  The filename is Form14.pdf. 
    When the third person signs off and clicks the email button, the email is created, with the address, subject line and body of the email completed, and the document attached has the little icon and then
    - Form 14.pdf - Adobe Acrobat Pro.pdf - Adobe Acrobat Pro.pdf - Adobe Acrobat Pro.pdf
    Is there some way to prevent it from concatenating like this every time the document is emailed?
    Thanks!!!

    Maybe you could try it like this... I saw this question answered not too long ago.
    Submit Portal Form Values to Portal Report

  • Using Javascript to reset a form on document load

    I am trying to reset all field vaules on a acrobat form to the default values, when the form is initially loaded.  I am trying to use the resetForm() method in a document level script, but not having any luck.
    I have been able to reset fields after user inputs such as a button that resets the form, or a script the will reset a form prior to importing field data... but I need to ensure all data is removed from the form when the form first loads
    Any ideas?

    I believe you mean a document level JavaScript, Entering Document Level Scripts, since a Folder level script would require the placing of the code into one of the Acrobat Application's JavaScript folder on the user machine, Entering Folder Level Scripts. Placing the JS code as a Document Level Sept will clear the form when the form is opened. One could also use the Page Open action if additional code is added to prevent re clearing the form if part of a multi page document and one navigates back to the original page.
    You should also consider turning off auto complete and auto caching of form data.
    Minimizing Exposure of Personal Information on Public Computers

  • Using JavaScript to submit a form with multiple submit buttons

    I am a newbie to JavaScript, so hopefully someone can answer
    this for me.
    On my user registration form, I have two buttons that submit
    the form, 'check_availability' (to check if the username is
    available) and 'register'. In my PHP script, I check which button
    was pushed by checking which POST value is set,
    $_POST['check_availability'] or $_POST['register'].
    If I set the 'register' button to a JavaScript function that
    validates the form and then submits it, how do I get my PHP script
    to think 'register' was pushed?

    Sorry I used my old captcha script there.
    [php]
    <?
    session_start();
    if(isset($_POST['button_name'])){
    //DO SOMETHING HERE
    } else {
    //Add the page data
    ?>
    [/php]
    "east99" <[email protected]> wrote in
    message
    news:fepqr8$2mr$[email protected]..
    > Firstly name your buttons then use this script:
    >
    > [php]
    > <?
    > session_start();
    > if(isset($_POST['button_name'])){
    > if ($_POST['vercode'] != $_SESSION['vercode'] OR
    $_SESSION['vercode']=='')
    > {
    > // echo '<strong>Error
    Message</strong><br>';
    > $error = '<strong><font
    color="#FF0000">Error
    > Message</font></strong><br>';
    > } else {
    >
    > //Add the page data
    >
    > }
    > ?>
    > [/php]
    >
    >
    >
    > "AngryCloud" <[email protected]> wrote
    in message
    > news:fecu6r$cl5$[email protected]..
    >>I am a newbie to JavaScript, so hopefully someone can
    answer this for me.
    >>
    >> On my user registration form, I have two buttons
    that submit the form,
    >> 'check_availability' (to check if the username is
    available) and
    >> 'register'. In
    >> my PHP script, I check which button was pushed by
    checking which POST
    >> value is
    >> set, $_POST['check_availability'] or
    $_POST['register'].
    >>
    >> If I set the 'register' button to a JavaScript
    function that validates
    >> the
    >> form and then submits it, how do I get my PHP script
    to think 'register'
    >> was
    >> pushed?
    >>
    >
    >

  • 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.

  • Reset report pagination using javascript / ajax ?

    Hiho,
    i have a page where i pull a ppr report from a different page using htmldb_get like described in Carls excellent examples. The first page also contains a textfield to set a where condition in the report, for examle to search a streetname..
    Now i need a way to reset the pagination of the report using javascript.
    Example:
    I search for street_name_1 and the report returns 100 rows, 10 rows on each page. Now i use the pagination links to switch throught report pages to page 5.
    Now i search for street_name_2 and the report returns 5 rows, so this would only be one page in the report. But the report pagination still is on page 5, so no results are shown. And no pagination buttons either.
    What can i do to reset the pagination before i pull the report without submitting the page?
    Thanks for help,
    DIrk

    I have similar problem with AJAX report pagination. When I click the pagination for next set of rows, it gives "undefined" error. I'm trying to call "get.clear('RP');" in the javascript function as susggested in above url, but doen't work. any examples are appreciated.
    thanks,
    Surya

  • Chained LOVs in portal using Javascript

    Has anyone gotten this to work in portal forms. I have an LOV in a form based on a table and when the user selects a value in LOV 1 it should populate the LOV2 item with the corresponding values. Please note that the time it takes to refresh using the traditional chained LOV solution in portal is too inefficient and causes the page to refresh when it shouldn't have to. This should be a fairly simple task considering nearly all web sites have this simple functionality but within portal I have not been successful in implementing this.
    Can anyone offer a solution?
    Thanks

    OK,
    This is the functionality that I am looking for. Can someone tell me whether or not this is possible in portal?
    <html>
    <head><!--
    This file retrieved from the JS-Examples archives
    http://www.js-examples.com
    1000s of free ready to use scripts, tutorials, forums.
    Author: Artem - http://javascript4free.by.ru
    -->
    <script language="JavaScript">
    <!-- Begin
    var africaArray = new Array("('Select country','',true,true)",
    "('Ethiopia')",
    "('Somalia')",
    "('South Africa')",
    "('Other')");
    var middleeastArray = new Array("('Select country','',true,true)",
    "('Egypt')",
    "('Iran')",
    "('Israel')",
    "('Kuwait')",
    "('Lebanon')",
    "('Morocco')",
    "('Saudi Arabia')",
    "('Syria')",
    "('Turkey')",
    "('U. A. Emirates')",
    "('Other')");
    var asiaArray = new Array("('Select country','',true,true)",
    "('Armenia')",
    "('Bangladesh')",
    "('Cambodia')",
    "('China')",
    "('India')",
    "('Indonesia')",
    "('Japan')",
    "('Malaysia')",
    "('Myanmar')",
    "('Nepal')",
    "('Pakistan')",
    "('Philippines')",
    "('Singapore')",
    "('South Korea')",
    "('Sri Lanka')",
    "('Taiwan')",
    "('Thailand')",
    "('Uzbekistan')",
    "('Vietnam')",
    "('Other')");
    var europeArray = new Array("('Select country','',true,true)",
    "('Albania')",
    "('Austria')",
    "('Belarus')",
    "('Belgium')",
    "('Bosnia')",
    "('Bulgaria')",
    "('Croatia')",
    "('Cyprus')",
    "('Czech Rep.')",
    "('Denmark')",
    "('Estonia')",
    "('Finland')",
    "('France')",
    "('Germany')",
    "('Greece')",
    "('Hungary')",
    "('Iceland')",
    "('Ireland')",
    "('Italy')",
    "('Latvia')",
    "('Liechtenstein')",
    "('Lithuania')",
    "('Luxembourg')",
    "('Macedonia')",
    "('Malta')",
    "('Monaco')",
    "('Netherlands')",
    "('Norway')",
    "('Poland')",
    "('Portugal')",
    "('Romania')",
    "('Russia')",
    "('Slovakia')",
    "('Slovenia')",
    "('Spain')",
    "('Sweden')",
    "('Switzerland')",
    "('Ukraine')",
    "('United Kingdom')",
    "('Other')");
    var australiaArray = new Array("('Select country','',true,true)",
    "('Australia')",
    "('New Zealand')",
    "('Other')");
    var lamericaArray = new Array("('Select country','',true,true)",
    "('Costa Rica')",
    "('Cuba')",
    "('El Salvador')",
    "('Guatemala')",
    "('Haiti')",
    "('Jamaica')",
    "('Mexico')",
    "('Panama')",
    "('Other')");
    var namericaArray = new Array("('Select country','',true,true)",
    "('Canada')",
    "('USA')",
    "('Other')");
    var samericaArray = new Array("('Select country','',true,true)",
    "('Argentina')",
    "('Bolivia')",
    "('Brazil')",
    "('Chile')",
    "('Colombia')",
    "('Ecuador')",
    "('Paraguay')",
    "('Peru')",
    "('Suriname')",
    "('Uruguay')",
    "('Venezuela')",
    "('Other')");
    function populateCountry(inForm,selected)
    var selectedArray = eval(selected + "Array");
    while (selectedArray.length < inForm.country.options.length)
    inForm.country.options[(inForm.country.options.length - 1)] = null;
    for (var i=0; i < selectedArray.length; i++)
    eval("inForm.country.options=" + "new Option" + selectedArray[i]);
    if (inForm.region.options[0].value == '')
    inForm.region.options[0]= null;
    if ( navigator.appName == 'Netscape')
    if (parseInt(navigator.appVersion) < 4)
    window.history.go(0);
    else
    if (navigator.platform == 'Win32' || navigator.platform == 'Win16')
              if(!document.getElementById)
    window.history.go(0);
    function populateUSstate(inForm,selected) { 
    var stateArray = new Array("('Select State','',true,true)",
    "('Alabama')",
    "('Alaska')",
    "('Arizona')",
    "('Arkansas')",
    "('California')",
    "('Colorado')",
    "('Connecticut')",
    "('Delaware')",
    "('Columbia')",
    "('Florida')",
    "('Georgia')",
    "('Hawaii')",
    "('Idaho')",
    "('Illinois')",
    "('Indiana')",
    "('Iowa')",
    "('Kansas')",
    "('Kentucky')",
    "('Louisiana')",
    "('Maine')",
    "('Maryland')",
    "('Massachusetts')",
    "('Michigan')",
    "('Minnesota')",
    "('Mississippi')",
    "('Missouri')",
    "('Montana')",
    "('Nebraska')",
    "('Nevada')",
    "('New Hampshire')",
    "('New Jersey')",
    "('New Mexico')",
    "('New York')",
    "('North Carolina')",
    "('North Dakota')",
    "('Ohio')",
    "('Oklahoma')",
    "('Oregon')",
    "('Pennsylvania')",
    "('Rhode Island')",
    "('South Carolina')",
    "('South Dakota')",
    "('Tennessee')",
    "('Texas')",
    "('Utah')",
    "('Vermont')",
    "('Virginia')",
    "('Washington')",
    "('West Virginia')",
    "('Wisconsin')",
    "('Wyoming')");
    if (selected == 'USA') {
    for (var i=0; i < stateArray.length; i++) {
    eval("inForm.country.options[i]=" + "new Option" + stateArray[i]);
    if ( navigator.appName == 'Netscape') {
    if (parseInt(navigator.appVersion) < 4) {
    window.history.go(0)
    else {         
    if (navigator.platform == 'Win32' || navigator.platform == 'Win16') {
    window.history.go(0)
    else {
    if (selected == 'Other') {
    newCountry = "";
    while (newCountry == ""){
    newCountry=prompt ("Please enter the name of your country.", "");
    if (newCountry != null) {
    inForm.country.options[(inForm.country.options.length-1)]=new Option(newCountry,newCountry,true,true);
    inForm.country.options[inForm.country.options.length]=new Option('Other, not listed','Other');
    if(inForm.country.options[0].text == 'Select country') {
    inForm.country.options[0]= null;
    }// End -->
    </script>
    <title>JS</title>
    </head>
    <body>
    <form name="globe">
    <p><select name="region"
    onchange="populateCountry(document.globe,document.globe.region.options[document.globe.region.selectedIndex].value)"
    size="1">
    <option selected value>Select Region</option>
    <option value="asia">Asia</option>
    <option value="africa">Africa</option>
    <option value="australia">Australia</option>
    <option value="europe">Europe</option>
    <option value="middleeast">Middle East</option>
    <option value="lamerica">Latin America</option>
    <option value="namerica">North America</option>
    <option value="samerica">South America</option>
    </select> <select name="country"
    onchange="populateUSstate(document.globe,document.globe.country.options[document.globe.country.selectedIndex].text)"
    size="1">
    <option selected value>&lt;--------------------</option>
    </select> </p>
    </form>
    <p align="center"><br>
    JS-Examples.com </p>
    </body>
    </html>

  • How to set a form element value using javascript?

    Hello,
    I have been using the following two functions in AS 9.0.2 to set form values in javascript and it works correctly. However, the same code does not work in AS 10.1.2.0.2. Would appreciate if someone could let me know how to set form elements using Javascript(onchange of a field).
    function set_item_value(p_field_name, p_value)
    var v_index, v_full_name;
    for(v_index=0; v_index<document.forms[0].length; v_index++)
    v_full_name = document.forms[0].elements[v_index].name.split
    if (v_full_name[2] == p_field_name)
    document.forms[0].elements[v_index].value = p_value;
    function get_item_value(p_field_name)
    var v_index, v_full_name, v_return="";
    for(v_index=0; v_index<document.forms[0].length; v_index++)
    v_full_name = document.forms[0].elements[v_index].name.split
    if(v_full_name[2] == p_field_name)
    if(document.forms[0].elements[v_index].type != "radio")
    v_return = document.forms[0].elements[v_index].value;
    else
    if(document.forms[0].elements[v_index].checked)
    v_return = document.forms[0].elements[v_index].value;
    if(v_return == " ")
    v_return = "";
    return v_return;
    Thanks
    Dev

    This is not the best way to write JavaScript in Portal environment!
    You can't be sure that a form is the first in the html source!
    In Portal you change the order of your portlets, and also you can have several instances of the same portlet on the same page!!!
    You should use qualified form and field names!
    Please check the following JPDK methods:
    UrlUtils.htmlFormName
    HttpPortletRendererUtil.portletParameter

  • HTMLB Form Validation using JavaScript

    Hi All,
    <b>
    I have created a portal appliaction using JspDynPage.
    I have created a form using HTMLB tags. I want to validate the inputfields before sending it to the server for processing.
    The validation has to be done using Javascript
    </b>
    <b> How do i got about this ??? </b>
    regards
    Brahmachaitanya

    I have written the following code to perform the validation.......
    <b>
    function validate()
              var funcName=htmlb_formid+"_getHtmlbElementId";
                func=window[funcName];
              var inpBox1 = eval(func('if1'));
              var eno=inpBox1.getValue();
              if(eno=='' || eno==null)
                   alert('Please Enter Employee Number');
                   htmlbevent.cancelSubmit=true;
              var inpBox2 = eval(func('if2'));
              var ename=inpBox2.getValue();
              alert(ename);
              if(ename=='' || ename==null)
                   alert('Please Enter Employee Name');
                   htmlbevent.cancelSubmit=true;
              var inpBox3 = eval(func('absencetype'));
              var atype=inpBox3.getValue();
              if(atype=='' || atype==null)
                   alert('Please Enter Absence Type');
                   htmlbevent.cancelSubmit=true;
              var inpBox4 = eval(func('if4'));
              var from=inpBox4.getValue();
              if(from=='' || from==null)
                   alert('Please Enter From Date');
                   htmlbevent.cancelSubmit=true;
              var inpBox5 = eval(func('if5'));
              var to=inpBox5.getValue();
              if(to=='' || to==null)
                   alert('Please Enter To Date');
                   htmlbevent.cancelSubmit=true;
              var inpBox6 = eval(func('if6'));
              var approve=inpBox6.getValue();
              if(approve=='' || approve==null)
                   alert('Please Enter Approver Name');
                   htmlbevent.cancelSubmit=true;
    </b>
    The problem now is that i am getting the <b> alert message only for Employee Number.</b>
    <b> I am not getting the alerts if I leave the the other fields blank </b>
    <b> How do i go about this ????????? </b>
    regards
    Brahmachaitanya

  • Getting error while using javascript in Forms 11g

    Hi All
    From OTN I have downloaded .zip file contains demo of Integrating Oracle Forms 11g with javascript.
    I have gone through every step and intergrated the javascript with Forms 11g.
    I am gettin an runtime error FRM-92190: JavaScript is unable to evaluate expression.
    Can anyone help me in this please.
    I placed every directory and file as mentioned in that demo.
    I use Win XP SP3,
    Forms [32 Bit] Version 11.1.1.4.0 (Production). patch set1.
    Internet Explorer 8.
    Thanks,
    Maddy

    Hi
    Thanks for your response
    I am just want to see how can a form looks using the javascript.
    and I want to use javascript in our Forms application to enhance them.
    If I can understand that demo it may be easy for me to implement the JS in our application.
    That error says that some wrong expression passed to the web.javascript_eval_expr
    js.html is placed here C:\Oracle\Middleware\asinst_1\config\FormsComponent\forms\server
    Left out files and directories are placed here C:\Oracle\Middleware\user_projects\domains\middleware_int\servers\WLS_FORMS\tmp\_WL_user\formsapp_11.1.1\e18uoi\war
    updated my .cfg and .env file as required.
    Is it problem with configuring the JS files and directory or Problem with javascript code????
    Thanks,
    maddy

Maybe you are looking for

  • Software does not find the Database server

    Hi all, We are going to move database from old server MSSQL 2005 Express to the MSSQL 2008 R2 STD. For test I backuped DB from old server then restored at the new one. For some reason the software does not find the new server. I checked everything as

  • Functioning Monitor will not display with Mac Mini

    I'm trying to get an IBM E74 CRT monitor working with an early 2009 Mac Mini. I have it connected with Apple's mini-DVI to VGA adapater. The Mac "sees" the monitor since with screen sharing I can see the Display System Preference when the monitor is

  • How do I call an external program

    From within my Java program I want to execute an external program and dump the output into a string or array of strings. In perl this is trivial $a=`dir`. How do I do it in Java? Thanx, Art.

  • Help on XML+SQL- HTML

    I use the following SP to test transformation of XML and XSL, but the processXML seems didn't work, the result which should be a HTML is XML itself, please help. create or replace procedure xslsample is p xmlparser.Parser; xmldoc xmldom.DOMDocument;

  • HT204350 Incorrect link to "OS X: How to migrate data from another Mac using Mountain Lion and earlier"

    Incorrect link to "OS X: How to migrate data from another Mac using Mountain Lion and earlier". Should be http://support.apple.com/kb/HT6025