On Friday, June 11, 2004, at 02:36  pm, Rob Walch wrote:

How to pass some params to the shockwave movie like in HTML pages:
http://www.mysite.com/mypage?param=1.

I think what Igor is looking for is a JavaScript solution. I'd be interested
in knowing how to do this too.


If you have a page when you address like this, can you have some JavaScript
in the page that would take that 'param' value, and then write it into your
SW object and embed tags (and if so how) ?

<script language="JavaScript" type="text/javascript"> <!--

// Get location string
myLocation = String(document.location.href);

// get query string
queryString = myLocation.substr( myLocation.indexOf("?") + 1 );

// get parameter value
paramValue = queryString.substr( queryString.indexOf("=") + 1 );

// then just write the sw1 parameter into your object/embed tag
// as normal using document.write()...

// -->
</script>

this does assume that you are only passing one variable in the url, but
it should be easy enough to adapt to handle more parameters.

I'd favour a PHP approach myself, but this should do the trick.

HTH,

Chris

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to