jazzery mobile every x second auto-refresh
JCM porting and having trouble finding that page To display properly that appears to be refreshed automatically, dozens of threads have been created to create content for every X seconds, but a clear solution is not found with code example. The purpose of this page is to display the arrival and departure information as things that appear in an airport.
The previous approach was, as in the header there is javascript. PHP content (one style table) named DIV is loaded after each other, then automatically refreshes every ten seconds and works great:
Control page:
& lt; Head & gt; ... & lt; Script type = "text / javascript" & gt; Function Refresh_My_DynamicContent () {$ ("# id_My_DynamicContent"). Load ("NewContent.php"); SetTimeout (function () {Refresh_My_DynamicContent ();}, 10000); } & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; SetTimeout (function () {Refresh_My_DynamicContent ();}, 1000); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div data-role = "page" & gt; & Lt; Div id = "id_My_DynamicContent" & gt; & Lt; / Div & gt; & Lt; / Div & gt;
When I display content, but without JQM, I use this kind of approach with extended pop-ups. Does anyone please help me with "Junk" for proper view of JQM, which refreshes itself with the code example?
I think your code should be
& lt; Script type = "text / javascript" & gt; $ (Function () {setTimeout (function () {$ ("# id_My_DynamicContent"). Load ("NewContent.php", {'reload': true});}, 1000);}); & Lt; / Script & gt;
Also check that the work after the first call is going on, I'm not sure if jquery moble also depends on all heads, if so, then you also get js from PHP
& lt ;? Php echo '& lt; Script type = "text / javascript" & gt; $ (Function () {setTimeout (function () {$ ("# id_My_DynamicContent"). Load ("NewContent.php", {'reload': true});}, 1000);}); & Lt; / Script & gt; '; ? & Gt;
Comments
Post a Comment