08-24-2008, 09:26 PM
|
#2 (permalink)
|
|
The Contributor
Join Date: Sep 2007
Location: London, UK
Posts: 47
Thanks: 4
|
I don't really understand what you want going on here. From what I understand, you want a page created for a user where the user specifies what jquery plugins they want on the page.
If I am correct then you might want something like:
PHP Code:
foreach($pluginData->plugin as $plugin){ $name = $plugin->name; echo ' <li><input type="checkbox" value="'.$name.'_plugin" name="plugin[]" />'.$name.'</li> '; }
Then for the tags:
PHP Code:
$plugin = $_POST['plugin']; for($i=0;$i<count($plugin);$i++){ $tags[$i] = $plugin[$i]; }
foreach($tags as $jqsrc){ echo "<script src=\"js/" $jqsrc . ".js\" type=\"text/javascript\"></script>"; }
So the script tag will link to the plugin.js file specified in the checkbox and this will loop through all the values in the tag array.
However, I have a horrible feeling I may have misunderstood you.. 
|
|
|
|