Menu

Problem in a Javascript block

Anonymous
2003-05-06
2003-05-07
  • Anonymous

    Anonymous - 2003-05-06

    Hi,
      I am getting a ScriptException for the following script block. The message I get is TypeError : undefined is not a function. {httpunit; }

    <script language="JavaScript1.2">
       parent.getTimeDiff(); parent.getDate("Rendering query list");
       var reloadUrl = location.href;
       var postData = "O=1&Form=doquery.jsp&s=server.com&S=HPD%3aHelpDesk&Qual=%27Login+Name%2b%27%3d$USER$+AND+%27Status%27%3c%22Resolved%22&U=user&Pw=pw&S=HPD%3AHelpDesk&Qual=%27Login+Name%2B%27%3D%24USER%24+AND+%27Status%27%3C%22Resolved%22&O=1&Pw=pw&Form=doquery.jsp&s=server.com&U=user&";
       var searchString = location.search;
       var searchStringLength = searchString.length;
       if ( searchStringLength > 0 )
       {
          searchString = searchString.substring(1);
       }
       var searchIndex = postData.indexOf(searchString);
       if ( searchIndex == 0 )
       {
          postData = postData.substring(searchStringLength);
       }
       if ( (reloadUrl.charAt(reloadUrl.length-1) != '&') && (postData.charAt(0) != '&') )
       {
          reloadUrl += "&";
       }
       reloadUrl += postData;
    </script>

    It is the second script block and there is another script block after it.
    I have tested with the version 1.5.3 and 1.5.4-d-05May.

    Thanx
    richard

     
    • Anonymous

      Anonymous - 2003-05-06

      It seems to that there might be some problem with the handling of the parent object. When I comment the first line the problem seems to go away.

      Does anybody know how HttpUnit handles the parent object?

      Thanx
      richard

       
    • Russell Gold

      Russell Gold - 2003-05-06

      getTimeDiff and getDate(String) are not supported.

       
    • Anonymous

      Anonymous - 2003-05-07

      getTimeDiff and getDate are defined in the parent inside a JavaScript file. So is there any other supported way of calling functions in the parent page?

      Thanx
      richard

       

Log in to post a comment.

Auth0 Logo