nelis
10-10-2006, 02:19 PM
Ok I'm using a dynamic php page that loads a graphic from mysql data..
<img src="imageMeter.php">
I call that in a javascript file that puts it to a div tag
document.getElementById('element1').innerHTML = "<img src='imageMeter.php'>";
So clicking a particular javscript link displays the given graph to the element1 div.
My question is, is it possible, using a similar technique, that displays the output of a standard .php file?
Example
document.getElementById('element1').innerHTML = 'testpage.php'
where testpage.php is
<?php
echo "test string";
?>
Then clicking the link would put 'test string' into the element1 div tag...
<img src="imageMeter.php">
I call that in a javascript file that puts it to a div tag
document.getElementById('element1').innerHTML = "<img src='imageMeter.php'>";
So clicking a particular javscript link displays the given graph to the element1 div.
My question is, is it possible, using a similar technique, that displays the output of a standard .php file?
Example
document.getElementById('element1').innerHTML = 'testpage.php'
where testpage.php is
<?php
echo "test string";
?>
Then clicking the link would put 'test string' into the element1 div tag...