fdark Posted April 8, 2011 Share Posted April 8, 2011 hello....how to take javascript from php page using javascript like this & what does mean page.php?complete& function include(file) { var head = document.getElementsByTagName('head').item(0); var old = document.getElementById('lastLoadedCmds'); if (old) head.removeChild(old); script = document.createElement('script'); script.src = file; script.type = 'text/javascript'; script.defer = true; script.id = 'lastLoadedCmds'; void(head.appendChild(script));}include("page.php?complete&") Link to comment Share on other sites More sharing options...
justsomeguy Posted April 8, 2011 Share Posted April 8, 2011 The filename is the name of the PHP script which is outputting the Javascript code. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.