aliento Posted October 30, 2008 Share Posted October 30, 2008 Hello! I need some help here: The main page : <head> <script type="text/javascript"> function Loadvidsko() { fM = document.getElementById('loadder'); fM.innerHTML = '<div id="container"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>'; loadSWFObject(); loadPlayer(); }; function loadSWFObject() { var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = '../../index/movie/swfobject.js'; head.appendChild(script); fM = document.getElementById('report1'); fM.innerHTML = 'movie/SWFObject.js loaded'; }; function loadPlayer() { var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = '../../index/movie/load.js'; head.appendChild(script); fM = document.getElementById('report2'); fM.innerHTML = 'Media Player loaded'; }; </script> </head> <div id="content" style=" width:449px;height:230px; overflow:hidden;"></div> <a href="javascript:ajaxpage('movie/index.html', 'content');" >>>click here<<</a> The page movie/index.html : <script type="text/javascript">Loadvidsko()</script> When i put a link at the movie/index.html <a href="#" onclick"javascript:Loadvidsko()"> it works but with <script type="text/javascript">Loadvidsko()</script> it doesnt. Any advise? Thank u Link to comment https://forums.phpfreaks.com/topic/130747-load-and-execute-javascript-into-a-page-loaded-with-ajax/ Share on other sites More sharing options...
F1Fan Posted October 30, 2008 Share Posted October 30, 2008 Are you wanting the PHP called in the AJAX to load and run JS code, rather than the PHP generating HTML? Link to comment https://forums.phpfreaks.com/topic/130747-load-and-execute-javascript-into-a-page-loaded-with-ajax/#findComment-678543 Share on other sites More sharing options...
aliento Posted October 30, 2008 Author Share Posted October 30, 2008 I use ajaxpage because only this i know and i am calling an html file with js. Is there any other correct technology? Thank you Link to comment https://forums.phpfreaks.com/topic/130747-load-and-execute-javascript-into-a-page-loaded-with-ajax/#findComment-678644 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.