Calling a function within java

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mysticslayer
    New Member
    • Feb 2008
    • 5

    Calling a function within java

    Hi all,

    I've got the following problem. I got a error '19': jsProgressBarHa ndler is undefined. How can i solve this problem?

    This is a sample of my asp page:

    <html>
    <head>

    <script type="text/javascript" src="js/prototype.js"></script>


    <script type="text/javascript" src="js/jsProgressBarHa ndler.js"></script>

    </head>
    <body>

    <form>
    <table class="Form" border="0">

    <tr></tr>
    <table class="Form" border="0">
    <tr>
    <td>
    <table class="Form" border="0">
    <tr>
    <td width = "170px">Relatie gegevens</td></tr>
    <tr><td>
    <span class="progress Bar" id="element1">0 %</span>

    <%
    Call importdata
    %>

    ....

    </html>

    <%

    Sub ImportData

    %>
    <script language="javas cript">

    jsProgressBarHa ndler.makePerce ntage('element1 ','<%=curperc%> ');

    </script><%
    End Sub
    %>
  • CroCrew
    Recognized Expert Contributor
    • Jan 2008
    • 564

    #2
    Hello mysticslayer,

    Without looking at the code in your JavaScript include files it will be hard to debug your problem. From looking at what you have posted I think your problem is in how you are calling the JavaScript function in the include file. I think if you take off the leading “jsProgressBarH andler.” it “might” work.

    Hope it help you out~

    Comment

    • mysticslayer
      New Member
      • Feb 2008
      • 5

      #3
      Hi,

      Well I tried to change it only makePercentage, but that didn't work. Now it is the error Object Expected. Can it be that the full page allready has to be loaded before you can use the functions of an external javascript?

      Thanks in advance

      Comment

      • mysticslayer
        New Member
        • Feb 2008
        • 5

        #4
        This is the javascript I am calling in the external script.

        setPercentage : function(target Percentage) {
        // add the percentage on the queue
        this.queue.push (targetPercenta ge);

        // process the queue (if not running already)
        if (this.running == false) {
        this.processQue ue();
        }

        },

        Maybe this will help? Or if you need some more javascript please ask

        Comment

        Working...