Jump to content

how to retrieve runtime values from another process/page ?


drorgo

Recommended Posts

OK , it's a little bit tricky , however I can't get it done  ??? ...

There is a main page HTML/JS file that continuesly picks random numbers and print then on screen.

there are 2 or more 'viewers' that can hook to a certain URL and observe the main page and its changing random numbers at real time - each viewers see *exactly* the same view.

I know how to implement this using files (saving each random number into a temp file , each one of the viewers fetch this file content and prints it onscreen) , yet : this has few disadvantages :

1. slow (I/O).
2. the viewers are not really *exactly* tuned to the main page changing numbers - there is some kind of latency in this scenario.
3. the viewers don't see 100% of the main page information this way.

I think that AJAX might be handy here , yet I need a guiding hand here ,

I would start from the following question :

How can I get realtime dynamic values (which keeps changing each second) from a main page using other JS files (using some kind of socket or open connection I guess) ?






Thanks.




Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.