Hi Song,
What kind of error do you have i firebug ???
While reading code, I can say that the ajax.update will insert HTML
inside a DOM element.
But what your trying to do is insert inside a div an iFrame.
So beside that, I suggest not using the ajax.update, but simply an
iframe. So the code become:
Filename : heloajax.html
<html>
<head>
<script src="js/prototype.js"></script>
<script src="fusioncharts/JSClass/FusionCharts.js"></script>
</head>
<body>
<a href="javascript:void loadTab( 'heloajax_1.html' )">Tab 1</a> |
<a href="javascript:void loadTab( 'tab2.html' )">Tab 2</a> |
<a href="javascript:void loadTab( 'tab3.html' )">Tab 3</a>
<iframe id="content" style="padding:5px;border:2px solid black;"
src="about:blank"></div><script>
function loadTab( tab ) {
$('content').src=tab;
}
loadTab( heloajax_1.html' );
</script>
</body>
</html>
the code of heloajax_1.html:
<html>
<head>
<script language="JavaScript" src="../fusioncharts/JSClass/
FusionCharts.js"></script>
</head>
<body>
<div id="chartDivTopSigInt_Live" align="center">XXXXXX</div>
<script type="text/javascript">
var myChart1 = new FusionCharts("fusioncharts/Charts/Pie3D.swf",
"myChartId", "550", "250");
myChart1.setDataURL("intdatalive_db.xml");
myChart1.render("chartDivTopSigInt_Live");
</script>
</body>
</html>
and it should work like that.
--
david
On 8 jan, 09:16, Song <[email protected]> wrote:
> Hi,
>
> I use below code to display a page which including flash in a table,
> Filename : heloajax.html
> <html>
> <head>
> <script src="js/prototype.js"></script>
> <script src="fusioncharts/JSClass/FusionCharts.js"></script>
> </head>
> <body>
> <a href="javascript:void loadTab( 'heloajax_1.html' )">Tab 1</a> |
> <a href="javascript:void loadTab( 'tab2.html' )">Tab 2</a> |
> <a href="javascript:void loadTab( 'tab3.html' )">Tab 3</a>
> <div id="content" style="padding:5px;border:2px solid black;"></
> div><script>
> function loadTab( tab ) {
> new Ajax.Updater( 'content', tab, { method: 'get' } );
> }
> loadTab( heloajax_1.html' );
> </script>
> </body>
> </html>
>
> the code of heloajax_1.html:
> <html>
> <head>
> <script language="JavaScript" src="../fusioncharts/JSClass/
> FusionCharts.js"></script>
> </head>
> <body>
> <div id="chartDivTopSigInt_Live" align="center">XXXXXX</div>
> <script type="text/javascript">
> var myChart1 = new FusionCharts("fusioncharts/Charts/Pie3D.swf",
> "myChartId", "550", "250");
> myChart1.setDataURL("intdatalive_db.xml");
> myChart1.render("chartDivTopSigInt_Live");
> </script>
> </body>
> </html>
>
> The page heloajax_1.html can display normal when I access it
> directly , but can not display flash when access it via heloajax.html.
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en.