Jump to content

Is it possible to fetch the string that its value changes every 5 seconds by javascript partial refresh


megalomania

This topic is 2284 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hello, everyone. I have a question.

I have web viewer object named "web". If I start a script running, Every 5 seconds, it fetches the string from the HTML that is shown in the web viewer, and keeps creating new records.

Just like this 

GetLayoutObjectAttribute ( "web" ; "content" )

Then the target value always get refreshed every 5 seconds.

javascript is just like this

        function updateLastvalue(new_last_value){
            var current_last_value = $('.last-value').text();
            var fixed_last_value = Number(new_last_value).toFixed(8);
            $('.last-value').text(fixed_last_value);
         
            // update
            document.title = fixed_last_value";
        }

and the number that I want to fetch but it changes every 5 seconds is just like this

 <td><span class="last-value”>297</a></td>

How can I take out this 297 and another numbers that continues changing?

GetLayoutObjectAttribute ( "web" ; "content" ) takes out only the number that was shown first. 

Can anyone help me with this?

Edited by megalomania
Link to comment
Share on other sites

This topic is 2284 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.