Are you loading these pages using iUI or jQuery? If so you need to change the Javascript, because the jQuery only triggers $(document).ready() when the main page is loaded, not when individual HTML fragments are inserted using AJAX. Try removing the $(document).ready() from around your script and see if that works.
Cheers, Niels Leenheer On Wed, Dec 2, 2009 at 3:01 PM, Bontas George <[email protected]>wrote: > Hello everybody, > > I have another question that keeps me busy!!! I need on loading of some > pages to run a javascript! how can this be done! > example: the javascript is not executed!!! :(( > <div id="graph" title="Graph" > > <fieldset> > <div class="row"> > > <table style="width:290px;height:20px; background-color:#FFF"> > <tr> > <td align="center" bgcolor="#2d3642" style="color:#FFF">50 > min</td> > <td align="center" bgcolor="#2d3642" style="color:#FFF">75 > min</td> > <td align="center" bgcolor="#2d3642" style="color:#FFF">100 > min</td> > </tr> > </table> > > <div id="placeholder" style="width:290px;height:150px; > background-color:#000"></div> > > </div> > <div class="row"> > <p> > <div class="whiteButton" onclick="graph()">View graph</div> > </p> > </div> > </fieldset> > </div> > > <script type="text/javascript"> > $(document).ready(function(){ > var d1 = []; > for (var i = 0; i < 14; i += 0.5) > d1.push([i, Math.sin(i)]); > > var d2 = [[0, 3], [4, 8], [8, 5], [9, 13]]; > > // a null signifies separate line segments > var d3 = [[0, 12], [7, 12], null, [7, 2.5], [12, 2.5]]; > > $.plot($("#placeholder"), [ d1, d2, d3 ]); > }); > > > -- > You received this message because you are subscribed to the Google Groups > "iPhoneWebDev" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<iphonewebdev%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/iphonewebdev?hl=en. > -- You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en.
