Hi Guys..
How can i achieve this?
I have a php file called showornot.php
It will return either 1 or 0
With javascript ajax how can i have the browser check showornot.php
and if it returns 1, The js will need to create a div above the page with an iframe in it.
Any ideas how to do it?
I have code to do normal ajax , However this will just fill a div with the returned data from the php file..
I need JS to look at the result and then show a div if the data returned is "1"
Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<script language="javascript" type="text/javascript">
<!--
function getdata() {
$(\'#mydiv \').load(\'showornot.php\');
}
//-->
</script>
|