NetTalk Central

Author Topic: How to refresh a Marquee inside a form  (Read 4677 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
How to refresh a Marquee inside a form
« on: July 06, 2012, 04:08:26 AM »
Hi,
I need to refresh a Marquee that is inside a from, like a browse is refreshed without refreshing the entire page.
Please see attached picture
1) Header embeded in the Menu proc
2) Form embeded in the Menu proc below the header
3) Marquee inside the Form as a DISPLAY field, its contents must be dinamic depending on the stock prices
4) The menu
5) Memory form wich filters the browse
6) Browse filtered an refreshed by a timer defined inside the Advance Browse tab
I need the Marquee to be refreshed like the browse is.

I´ve tried with a JavaScript like:

<script type="text/JavaScript">
<!--
function timedRefresh(timeoutPeriod) {
   setTimeout("location.reload(true);",timeoutPeriod);
}
</script>
<body onload="JavaScript:timedRefresh(5000);">

But it refresh the entire page and it is not acceptable.
Any way to do this?
Thanks!


[attachment deleted by admin]
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: How to refresh a Marquee inside a form
« Reply #1 on: July 08, 2012, 10:12:24 PM »
probably the easiest way is to put your custom code in a netwebsource procedure as it has the timer option on it.

Cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: How to refresh a Marquee inside a form
« Reply #2 on: July 09, 2012, 05:16:54 AM »
Thanks Bruce,
The Menu proc is a NetWebSource.
I´ve added it a timer=1000
But it seams not to work.

Looking at the page soude code The menu timer is coded:

SetTimer('menuwin',1000,'','',0);

And the browse timer is coded:

SetTimer('banalisisopciones_uanalisisopciones',10000,'_refresh_=current','_parentProc_=uanalisisopciones',0);

Is it OK?, the menuwin timer does not need the '_refresh_=current' param?

Where in the source code can I put some message to see if its working? I´ve tried in the Top Of Routine embed but it is called only two times at the beginning and never again.

Regards
Alberto
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: How to refresh a Marquee inside a form
« Reply #3 on: July 09, 2012, 06:34:08 AM »
>> Is it OK?, the menuwin timer does not need the '_refresh_=current' param?

yes, that's fine.

>> Where in the source code can I put some message to see if its working? I´ve tried in the Top Of Routine embed but it is called only two times at the beginning and never again.

putting MESSAGEs in will break the server, so don't do that.
If you want to see if it's working, you should see the call coming in on the web server's log screen.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: How to refresh a Marquee inside a form
« Reply #4 on: July 09, 2012, 06:47:00 AM »
Ok, looking at the server log screen I see the menuwin called only the first time, then the calls of the browse refresh.
See attached image.
May be ti is not possible to have two timers in one web page?



[attachment deleted by admin]
-----------
Regards
Alberto