about combine ajax ,php and javascript -
i have main html file , using ajax call php file in same directory.
inside php file, call external javascript functions. javascripts functions not working. not possible?
i see generated source in web browser , normal. if call functions using php file (without using ajax), functions working , generated source same previous case. please me.
in html file using ajax follows:
xmlhttp.open("get","end_location_drop_down.php?q="+str,true); xmlhttp.send();
in php file functions follow,
<?php echo '<script type="text/javascript" src="../js/pointing.js"></script>'; //external script $btn8="'btn8'"; $q=$_get["q"]; echo '<script type="text/javascript"> nextpoint('.$at_id.'); //$at_id mean variable,nextpoint() java script function </script>'; ?>
in javascript function have image swapping functions.they can call nextpoint(). didn't work.
javascript functions executed when load page directly in browser, browser 1 interprets , executes javascript code. when javascript code in different page , page being called through ajax, there no browser execute javascript code before ajax response sent you. won't work.
Comments
Post a Comment