Hello,
first to say that I am a total beginner in Javascript but I know some programming (python in particular) and am able to understand methods/parameters and so on.
Here's my problem:
I am trying to set up a page that changes every time it's visited, but without using php(which i don't know either) because it's not active on the server. The thing that should change is a single number in one attribute of an <embed> tag inside an <object>. The attribute itself is a long string of attributes - settings for the flash that runs in this embed-tag. In general I would like to change the number according to a file storing the number of visits and increments it with each new visit. So I need to set the whole attribute (which is a string called 'list' in the code below) from outside - with a javascript.
What I am trying now is simply setting the attribute without any changing/files. It looks like this:
[HTML]<script type="text/javascript">
function lista()
{
var list = "url=search_files/foret.swf&feuilles=2&objectif=100000000&am p;texte=Keep the left mouse button pressed <br> and move to look around.&zoomM=Zoom %2D&zoomP=Zoom %2B";
document.embeds[0].setAttribute("flashvars", list);
}
</script>[/HTML]
and the whole <object> looks like this:
[HTML]<object id="Flash" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" height="377" width="481">
<embed src="search_files/loader.swf" quality="high" bgcolor="#B3F285" name="<NAME>" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" height="377" width="481"></object>[/HTML]
I execute the function onload but the flash doesn't seem to get the parameters and stops after it's initial animation contained in the loader.
Where am I making a mistake?