they way you are doing it is pretty much the only way you can pass a variable to the javascript. make sure $groupname is returning a value.
also, try using <?php instead of <?
Reputation Points: 235
Solved Threads: 193
Nearly a Posting Virtuoso
Offline 1,315 posts
since Jun 2007