how to access parameter in query string
-
For a school project I need have a href attribute in an tag access another page. In the called page I need to acccess the parameter passed in. The parameter is the name of an MP3 file that I want to have automatically start playing via an embeded player object like windows media player. I know how to form the href tag and how to have a file play in an embedded player. I do not know how to access the file name via java script. I assume that once I get the file name I need to set it to a global java script variable and then access the varible via a java script function call to be made on the source attribute of the embedded object. Any help would be greatly appreciated. I have googled but not with sucess. I can not use any server side programming because the project does not allow for it. Thanks so much for your help, Patrick
-
For a school project I need have a href attribute in an tag access another page. In the called page I need to acccess the parameter passed in. The parameter is the name of an MP3 file that I want to have automatically start playing via an embeded player object like windows media player. I know how to form the href tag and how to have a file play in an embedded player. I do not know how to access the file name via java script. I assume that once I get the file name I need to set it to a global java script variable and then access the varible via a java script function call to be made on the source attribute of the embedded object. Any help would be greatly appreciated. I have googled but not with sucess. I can not use any server side programming because the project does not allow for it. Thanks so much for your help, Patrick
This kind of thing is much easier with server side programming. But otherwise, I would use javascript to store the info as a cookie (NOTE: NOT secure). Otherwise, you could still use a query string on the link (i.e. "yourpage.html?somekey=somevalue") and use javascript to break apart the url and get the filename on the player page.