Troubleshooting "Failure to solve JavaScript variable" in OpenScript

I'm new to OATS and need some help trying to debug two errors my script is getting.
I'm trying to develop a simple script for a 3rd party application we use. The app itself has worked fine for a couple of years.
I record a script of a simple transaction to create a permit for creating a Historic District (it's a public works application). The recording works fine. I record a Load Test Web/HTTP script.
When I play it back I get two errors. First there is a "failure to solve JavaScript varaible" error, followed by a "variable not found" error. They look like they are related. I guess solving the first error will eliminate the second. I've tried correlating the script following playback. No change. I've also tried recording it using the FLEX protocol. Also no change.
Although this is not preventing the execution of OATS, it is pretty important because it is preventing the development of the load test I need to develop.
I have used the OpenScript Diagnosis Tool and fixed everything it told me to fix:
- Setting the Java to use the browser proxy settings... did that.
- It tells me the Rule File is missing for Oracle Forms, and tells me how to recreate it. But, I can't do that because this is not an Oracle script. It is a Web/HTTP
script.
- It also tells me to disable the IE Enhanced Security Settings. That is already done but it keeps telling me to do it anyway.
- It tells me to use a newer version of Firefox and to check the Firefox profile. But, this is an IE script.
Running as an Administrator under Windows 2008 Server R2 SP1.

Opened an SR on this issue, worked with tech support and finally discovered the problem. OATS was correlating some things that shouldn't have been correlated. Went into the correlation rules, turned off Javascript correlaation, re-recorded the script and the problem dissappeared. That left me with just one error. I went to that line in the script, chose "... revert to recorded" to reverse the correlation and eliminated the last of the problems.

Similar Messages

  • Get javascript variable in JSP

    Hi all,
    can anybody tell me- how to get javascript variable in JSP,
    in the same file (JSP).
    Is this possible.
    I can use JavaScript to get the value,
    but then I have no way to get that to the JSP code.
    Please give the appripriate answer with code.
    Thanks
    amitindia

    Hi all,
    Thanks for your quick response.
    So u are right that we can not call javascript variable
    in the same JSP. and pass them to the bean class.
    So what I did --- I get java script variable in another JSP using
    request.getParameter(); and then redirected to previous JSP.
    and I have solve my problem.
    Actually I had to call bean class and pass varible to the bean
    method but I was getting the same problem that I disscussed but now it
    has been solved.
    Thanks again for participation
    amitindia

  • Assigning a java value(filepath) to a javascript variable

    I have a JSP where I have a java variable(obtained from session) which is nothing but a filepath(say C:\superb.xpdl). When I try to use the variable in javascript using var scriptVar = "<%= sessionVar %>";, the sessionVar value i.e. the filepath is getting modified (like C:superb.xpdl). Slashes are interpredted in a different way(\t for tab, \n for new line etc.,) How to get the filepath with no modifications while assigning to javascript variable? will encoding(using escape()) and decoding help?

    unfortunately you need to double up the slashes
    maybe this will work
    scriptVar = "<%= sessionVar.replaceAll("\\", "\\\\") %>";
    or maybe it will cause a infinite recursion problem (i'm too lazy to try it)

  • How can i assign a Javascript variable to JSP variable

    Hi guys
    how i can assign a javascript variable to jsp expression.,
    e.g.,
    <input type = "button" value = "Add more" onclick = "return submitform1('<%=s%>')">
    function submitform1(String s)
          var s1 = s
    document.form1.action = "../intimation.do";    /* Here i want to pass the value s1 to jsp or servlets without using hidden fields and Query string*/
           document.form1.submit();
          return false;
    /*  i want to pass the values thru session whether it is possible */
    pls give sample code
    Reply
    Marimuthu

    You don't have the session.
    All you have is HTTP.
    The only way to communicate from the client to the server is via an HTTP request. The only way to send a value like that is with a parameter.
    Using a form with method="submit" as mentioned will pass the parameters without displaying them in the url bar (is that what you wanted?)

  • Using javascript variable in spry if statement

    is it possible to put a javascript variable in to the spry if
    statement to test?
    like <div spry:if="javascriptvar == {ds_RowNumber}"....
    thanks.

    Hi rogerfreak,
    When the region processes a spry:if, it simply takes the
    value of the spry:if attribute, replaces all of the data references
    in it with real values from the data set and then evals the result
    (executes the string).
    So you can do something like:
    <script>
    var ds1 = new Spry.Data.XMLDataSet("foo.xml", "/foo/bar");
    var gMode = 5;
    function GetMode()
    return gMode;
    </script>
    <div spry:region="ds1">
    <ul spry:if="gMode == 5">
    <li spry:repeat="ds1">{name}</li>
    </ul>
    <div spry:if="gMode == 12" spry:repeatchildren="ds1">
    {name}
    </div>
    </div>
    In the example above the list markup will be written out if
    gMode is 5, but if it is 12, it will write out the div markup.
    You can also call functions:
    <div spry:region="ds1">
    <ul spry:if="GetMode() == 5">
    <li spry:repeat="ds1">{name}</li>
    </ul>
    <div spry:if="GetMode()== 12"
    spry:repeatchildren="ds1">
    {name}
    </div>
    </div>
    --== Kin ==--

  • How to pass javascript variable to PLSQL stored procedure

    Hi,
    How can I pass a javascript variable to a database procedure. I have a form with a radio button group and would like to save the value of the selected radio button to a database table by passing the value to the stored procedure.
    Thanks

    Hi
    You can use iframe to call the procedure. Here is an example used in dynamic page or pl/sql portlet. The pl/sql procedure is called myprocedure and resists in the schema myschema. This example passes 2 parameters, but I have not yet reased a limit.
    First the call within a javascript function:
    myiframe.location.href="myschema.myprocedure?p_myprameter1=" + vJvascriptparameter1 + "&p_myprameter2=" + vJvascriptparameter2;
    Then the iframe:
    <iframe id="myiframe" height="0" width="0" frameborder="0"></iframe>
    You can let the pl/sql procedure print a value, that can be used i the portlet. You can get the value in a javascript this way:
    myvalue=top.window.frames["myiframe"].document.body.innerHTML;
    Best regards
    Klaus

  • How to assign Javascript variable to ABAP variable

    Hi All,
    I have a requirement to create a page where each of the table cells will have drop down boxes with Red, Yellow and Green colors.
    When the user selects the color it has to be saved to database.
    Now the problem is, I'm using HTML as HTMLB was very complicated for the kind of layout the client needed.
    I have created a onChange event for each of these drop down boxes (please keep in mind the dropdown ids are dynamically created by looping the ABAP internal table).
    I'm passing this.id on change event and capturing the id name. Now using this id I have to read an internal table.
    But the problem is, this is javascript variable and cannot be passed directly to read table statement.
    Please help me in this regard.
    Lots of points will be given for valuable inputs.
    PS: I have gone through the thread Assign a Javascript variable value to a ABAP variable
    But doesn't seem to work for my case as I'm using HTML.

    Hi Chait,
    you need to populate a HTML form field with the variable. Most commonly people use the...
    <INPUT type="hidden" id="param1">
    construct.
    In your javascript you can then just set the value of param1.
    Of course you could also dynamically create the elements at runtime in your javascript code.
    Cheers
    Graham Robbo

  • How to access javascript variable's value in a jsp tag?

    Is there any way to access the value of a javascript variable in jsp?

    Hi
    by the way your question is ambigous, i understand the question to some extent here i there is a sample code which may be help full to you. As this problem is faced by me when i was developing some dynamic pages in my company.
    <%@ page language="java" %>
    <html>
    <head>
    <script language="JavaScript">
    var i = 10;
    var k = 20;
    </script>
    </head>
    <%
         String Jspi = "";
         Jspi = ("<script>document.write(i);</script>");
         out.println(Jspi);
         Jspi = ("<script>document.write(k);</script>");
         out.println(Jspi);
    %>
    </body>
    </html>
    This will help u out.
    Cheers
    Rambee

  • How to pass the javascript variable value to a jsp

    Hi
    I am trying to set a javascript variable with onClick event of a radio button in jsp
    and I am assigning this variable to a hidden property in JSP whic has the corresponding getter an setter method in form.
    But I am not able to retrtieve the value assigned in either form/action .can any body help me in this:
    The code is
    <script language="javascript">
    var jais="";
         function setValue(val)
              jais=val;
         document.o.value=jais;
    </script>
         <html:hidden property="o" value=""/>
    <input type=radio name="1"
                                            value="xyz"
                                                                          onclick="setValue('XYZ')" >
                                            ABC                                        
    and in the correspoding form bean I have
    private String o_val =null;
    public String geto()
    return o_val;
    public void seto(String strs)
    o_val=strs;
    In the action I am trying to access
    by
    1)String j=((form name)form.geto();
    2)String j=request.getParameter("o")
    but with both of them I am getting the value null
    Thanks in Advance

    You need to set the value of the hidden field in your function.
    Setting an unrelated variable will not help.
    function setValue(val)
    document.forms[0].o.value = val;
    also your get/set methods should be getO() and setO().

  • Assign a Javascript variable value to a ABAP variable

    Hi,
       I wish to assign a javascript variable value to  a ABAP variable. Any ideas how to do that?
        Many thanks.
    Rgds,
    Bernice

    Here's another suggestion for you.
    BSP Application: SBSPEXT_HTMLB
    Check out the radionbuttongroup.bsp
    So then instead of using a standard HTML radio buttons you can use the HTMLB element with the parameter for onClick set then in your DO_HANDLE_EVENT you can read the value.
    VIEW
    <htmlb:radioButtonGroup id="radio">
      <htmlb:radioButton id="id_link"
                       text="Link"
                    onClick="myClickHandler"/>
      <htmlb:radioButton id="id_unlink"
                       text="Unlink"
                    onClick="myClickHandler"/>
    </htmlb:radioButtonGroup>
    DO_HANDLE_EVENT
      DATA:   lt_event        TYPE REF TO if_htmlb_data.
      lt_event = cl_htmlb_manager=>get_event_ex( request ).
      if lt_event IS NOT INITIAL.
        if  lt_event->event_name = htmlb_events=>radiobutton.
           case lt_event->event_id.
            when 'control_id_link'.
              schalter = ' '..
            when 'control_id_unlink'.
              schalter = '1'.
           endcase.
        endif.
      endif.
    There is an example of how to use it and read it in the DO_HANDLE_EVENT you then just have to pass the variable around (in this example the variable name is schalter and is defined as char1 in the class)

  • Passing struts-tag value to java / javascript variable in JSP

    Hello all,
    Im trying to pass the value got from the struts-tag to the java variable in the Jsp. However Im not able to get the o/p. Can u guys help me on this pls...
    <logic:notEmpty name="TreeBean" property="list">
        <logic:iterate id="Type" name="TreeBean" property="list" indexId="i">
         <br/><bean:write name="Type" />
        </logic:iterate>
    </logic:notEmpty>Here the list can be populated in the jsp page. However i want the values into jsp list. Im not able to populate the same..
    <% List jspList = null;
    %> I want the values into the jspList variable for further processing. Can u guz pls help me on this....

    Which do you want it in?
    A java variable for use in <% scriptlet code %> or a javascript variable for use on the client end?
    scriptlet:
    <jsp:useBean id="TreeBean" type="java.util.List" class="java.util.ArrayList" scope="?????" />
    Having scriptlet code on the page is considered bad coding style.
    What is it you are trying to accomplish by making the value accessible?
    What are you trying to do in java / javascript that can't be done with JSP tags?

  • Assigning values to a javascript variable

    Hi,
    Using request dispatcher, i'm forwarding the control to a html from a servlet like this(obj.forward(/index.html?field1=value1&field2=value2).
    In the receiving end, ie., in the html i would like to assign those 2 field1,field2 values to a javascript variables. Javascript located in the index.html.
    I don't know how to do this.
    Pls any one help me to get of this pblm
    Thanks in Advance
    Kannan.T

    Hi thanks for ur reply,
    You r telling while forwarding a request from one
    servlet to another servlet, we can't add query
    string(requestparameters). But then how come this
    code is working?
    RequestDispatcher
    rdis=getServletContext().getRequestDispatcher("/MyServ
    let?type=normal");
    rdis.forward(req,res);Well I owe an apology here - I was not completely correct. I have tested and found that you can indeed add parameters that way. The catch is that these parameters are nested to that forwarded /included resource. It is not available in the original jsp or to some other resource included from the original jsp unless ofcourse you add the parameter again.
    >
    please give me a solution.
    Like this i have to forward my request (with
    querystring) to a html page.
    That htmlpage should receive parameters and assign
    the values to a javascript variables.
    how can i achieve this.
    thanks in advance.My original reply stands.
    You cannot do that in a html page. You have to have a jsp that generates the html.
    ram.

  • How to assign a JSP variabl's value to a JavaScript variable?

    Hello,
    I want to assign a JSP variable's value to JAVASCRIPT variable.
    or how to assign JavaScript variable's value to JSP varialbe
    HOw do i do it ?
    can anyone please help?
    Regards and thanks for your time.
    Ashvini

    I want to assign a JSP variable's value to
    JAVASCRIPT variable.
    var jsVariable = <%=someVariable%>;
    or how to assign JavaScript variable's value to JSP
    varialbeYou can't. JSP is server-side and JavaScript is client-side. The JSP variables are never available on the client side for any sort of assignment.

  • How to use javascript variable in BSP/ABAP and vice versa

    Hello Experts,
    In IC WEBCLIENT, there is a view.In the view.htm i want to fetch  the screen resolution and as per the resolution i want set the width of that view.
    1, I wrote the below  javascript to fetch the screen resolution.
       Can i use a notmal ABAP variable inside the javascript? and   If i use can i access that variable after the javascript.?
       Can i assign a javascript variable to a nrmal abap variable??
       The code sample  is like :
    Start of javascript
       if (screen,width == 1024 )
         lv_width = 500  "lv_width is an ABAP variable.
      else
        lv_width = 700
    **END OF JAVASCRIPT
       **Now i want to use lv_width  to assign to a table view attribute(Width)
    <crmc: tableview..
                    width = <%= lv_width >
    the code is not giving any error. But the problem is that lv_width is not giving the correct value, its getting initialized to initial value...
    Requesting the experts to please provide some suggestions/solution for the above issue.
    Thanks and Regards
    Sudhansu

    Hello Sudhansu,
    First of all there was a little mistake at my previous answer:
    you got lw_width = 700
    because at Server Side you have following code:
    lw_width = 500.
    lw_width = 700.
    but if you were writing your code like this:
    <%=lw_width %> = 700.
    then you will get the result that I was talking about : 0 = 700
    Sorry for the mistake
    Now for your question:
    if you want to get a value from the server and assign it to JScript variable you should write like this :
    var aaa;
    aaa = <%=lw_width %>;
    this code assign the server variable lw_width value into aaa  JScript varible.
    I'm not sure what exactly you want to do but look at this link:
    http://www.pageresource.com/jscript/jscreen.htm
    to get the idea how to get and use Screen Resolution variables at your JScript code.
    Good luck
    Eli Steklov
    Please Reward Points if it Helped

  • How to save javascript variable in database

    Hi all,
    I'm trying to save a javascript variable to the database. What is the smartest way to do this. I searched the forum, but don't seem to find the answer.
    I' m using the following htp.p code.
    htp.p('
    GEvent.addListener(map, "click", function(marker, point) {
    if (marker) {
    map.removeOverlay(marker);
    } else {
    var marker = new createMarker(point,"This place","Some stuff to" +
    "display in the<br>Last Info Window");
    var point = marker.getPoint();
    var lat = point.lat();
    var lng = point.lng();
    alert("Long " + lng);
    alert("Lat " + lat);
    map.addOverlay(marker);
    marker.openInfoWindowHtml(lat);
    insert into employees(employee_id,
    geom)
    values (8
    ,SDO_GEOMETRY(2001, 8307, SDO_POINT_TYPE(lat, lng, NULL), NULL, NULL)
    commit;
    htp.p('
    The code works fine when I substitute the 'lat' and 'lng' variables for hard coded data.
    Since javascript is a dynamic content on the page, the abaove code probably can't work.
    I get the error: column not allowed here.
    Is there maybe a html_db procedure which I can use?
    Thanx,
    Pim

    It seems, you can accomplish this with htmldb_Get ( http://apex.oracle.com/pls/otn/f?p=11933:63). You should create a process with your insert statements and reference it by instantiating of htmldb_Get object.
    Best regards
    Maxim

Maybe you are looking for