What I'm wanting to do is pass a variable into an HTML file that uses the variable two ways: 1) it reads an XML file to display data (which it does correctly), and 2) pass the same variable on to a SWF file so that the SWF knows which FLV to pull in and display.
So, for example, let's say I want to use "textOnly.htm?pageNum=10001"
In my <head>, I have:
var url = ""+document.URL;
if(url.indexOf("?") < 0 )
var qs = url.split('?');
var paramMap = qs.split('&');
for(var i = 0; i < paramMap.length; i++)
var nvPair = paramMap[i].split('=');
if(nvPair == paramName)
var pageNum = getParameter("pageNum");
Currently, the pageNum will pull "10001" out of the example I used, and down in the body, I'm able to pull out the text that I want to display.
However, I cannot pass this same variable to a swf file.
<param name="movie" value="videoforHTML.swf?pageNum=' + getParameter('pageNum') + '"/>
<param name="movie" value="videoforHTML.swf?pageNum=' + pageNum + '"/>
and it still doesn't work.
I've put quotes around pageNum in the ' + pageNum + ' section.
What am I doing wrong? I know it's pulling the pageNum out of the header correctly, because I can alert(pageNum) and it works beautifully. There's got to be a way to add it to the value.