SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: missing ) after argument list
-
Aug 4, 2006, 04:59 #1
- Join Date
- Jul 2004
- Location
- The Netherlands
- Posts
- 1,469
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
missing ) after argument list
I'm working on a website that has lots of flash animations running on it. And am trying to fix the "Click to activate this content" issue that appeared since SP2 for IE6.
One of the suggestions from the site of MS is to place the content in a seperate .js file and load it at the location where the flash file should appear. This works just fine for Flash files that don't make use of php to fill in the Flashvars values, if you do try to use that technique with a file that does use php to file in a value i get the following error.
missing ) after argument list
gelijkenissen_php... (line 4)
document.write('<PARAM NAME="FlashVars" VALUE="user_id=<?php echo($_GET['user_id']); ?>&language=nl">');
The content of the .js file
Code:document.write('<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH="780" HEIGHT="500">'); document.write('<PARAM NAME="movie" VALUE="swf/index.swf">'); document.write('<PARAM NAME="quality" VALUE="high">'); document.write('<PARAM NAME="FlashVars" VALUE="user_id=<?php echo($_GET['user_id']); ?>&language=nl">'); document.write('<PARAM NAME="menu" VALUE="false">'); document.write('<EMBED SRC="swf/index.swf" WIDTH="780" HEIGHT="500" FlashVars="user_id=<?php echo($_GET['user_id']); ?>&language=nl" QUALITY="high" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" TYPE="application/x-shockwave-flash" MENU="false">'); document.write('</EMBED>'); document.write('</OBJECT>');
-
Aug 4, 2006, 05:03 #2
- Join Date
- Nov 2004
- Location
- Ankh-Morpork
- Posts
- 12,158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It seems as if your file is not being run through the PHP parser, so the JavaScript engine is actually seeing your PHP code instead of the generated code.
The single quotes you use in the PHP statement conflict with the ones surrounding the entire argument to document.write().Birnam wood is come to Dunsinane
-
Aug 4, 2006, 05:20 #3
- Join Date
- Jul 2004
- Location
- The Netherlands
- Posts
- 1,469
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I changed it to $_GET[\'user_id\'], and it works fine now. Thanks
Bookmarks