waterinfo Posted January 14, 2012 Share Posted January 14, 2012 <body onload="initialize()" onunload="GUnload"> I need to run some function in the body instantly,How to do ? thanks for answer. Quote Link to comment Share on other sites More sharing options...
dionel1969 Posted January 14, 2012 Share Posted January 14, 2012 <body onload="initialize()" onunload="GUnload"> I need to run some function in the body instantly,How to do ? thanks for answer. I need this too. Quote Link to comment Share on other sites More sharing options...
zilav Posted January 15, 2012 Share Posted January 15, 2012 Add to UniserverModule.CustomFiles http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js Add to MainForm.Script $(function() { alert('Hello!'); }); However it will run before UniGui shows main form since it is initialized via ajax later. If you want to execute after main form is shown, use it's ClientEvents. Quote Link to comment Share on other sites More sharing options...
waterinfo Posted January 15, 2012 Author Share Posted January 15, 2012 Dear zilav,thank for u excellent suggestion! But's still make me fuse when many google's demo script can by load by my program,can u give me any more suggestion like this: <!-- You are free to copy and use this sample in accordance with the terms of the Apache license (http://www.apache.org/licenses/LICENSE-2.0.html) --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title> Google Visualization API Sample </title> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load('visualization', '1', {packages: ['gauge']}); </script> <script type="text/javascript"> function drawVisualization() { // Create and populate the data table. var data = new google.visualization.DataTable(); data.addColumn('string', 'Label'); data.addColumn('number', 'Value'); data.addRows(3); data.setValue(0, 0, 'Memory'); data.setValue(0, 1, 80); data.setValue(1, 0, 'CPU'); data.setValue(1, 1, 55); data.setValue(2, 0, 'Network'); data.setValue(2, 1, 68); // Create and draw the visualization. new google.visualization.Gauge(document.getElementById('visualization')). draw(data); } google.setOnLoadCallback(drawVisualization); </script> </head> <body style="font-family: Arial;border: 0 none;"> <div id="visualization" style="width: 600px; height: 300px;"></div> </body> </html> Quote Link to comment Share on other sites More sharing options...
zilav Posted January 16, 2012 Share Posted January 16, 2012 http://forums.unigui.com/index.php?/topic/1667-google-visualization-demo/ Quote Link to comment Share on other sites More sharing options...
waterinfo Posted January 17, 2012 Author Share Posted January 17, 2012 Thanks zilav! u demo can run very well on my computer,so I will try to follow your way to do with other component of google. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.