HTML interesse |
|
heej bedankt!
enige nadeel is dat er geen PHP gebruikt mag worden maar dit is te ondervangen door de GET uit te lezen met javascript
ik ga het nu proberen en dan laat ik nog wel weten of het werkt
---> helaas het werkt niet... hoe kun je eigenlijk testen of de pagina idd geinclude wordt?
edit:
Ok het werkt
<script language="javascript">
// Read URL vars, -> ?group=[ID]
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for(var i = 0; i < hashes.length; i++)
{
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
var groupid = vars["group"];
// Specify your livefeed link here, make sure [&groupid="+groupid+"] remains in the url
file = "http://192.168.15.7/~leon/livefeed/?output=js&developerid=2137&groupid="+groupid+"&max=100";
// create a new script tag to the head of your page to load correct data from livefeed
var head = document.getElementsByTagName('head').item(0)
var scriptTag = document.getElementById('loadScript');
if(scriptTag) head.removeChild(scriptTag);
script = document.createElement('script');
script.src = file;
script.type = 'text/javascript';
script.id = 'loadScript';
head.appendChild(script)
</script>
<script language="javascript"> // Read URL vars, -> ?group=[ID] var vars = [], hash; var hashes = window .location .href .slice (window .location .href .indexOf ('?') + 1).split('&'); for(var i = 0; i < hashes.length; i++) { hash = hashes [i ].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } var groupid = vars["group"]; // Specify your livefeed link here, make sure [&groupid="+groupid+"] remains in the url file = "http://192.168.15.7/~leon/livefeed/?output=js&developerid=2137&groupid="+groupid +"&max=100"; // create a new script tag to the head of your page to load correct data from livefeed var head = document.getElementsByTagName('head').item(0) var scriptTag = document.getElementById('loadScript'); if(scriptTag) head.removeChild(scriptTag); script = document.createElement('script'); script.type = 'text/javascript'; script.id = 'loadScript'; head.appendChild(script) </script>
thnx voor de hulp, had zelf niet gedacht aan het toevoegen van een element met javascript |