dc_jt Posted February 6, 2008 Share Posted February 6, 2008 Hi Can someone explain to me why this wont work please?: echo '<img id="1" class="items" src="../assets/images/cookie.gif" />'; echo '<script type="text/javascript">'; echo '//<![CDATA['; echo 'new Draggable("1", {revert:\'true\'})'; echo '//]]>'; echo '</script>'; Thanks Quote Link to comment Share on other sites More sharing options...
craygo Posted February 6, 2008 Share Posted February 6, 2008 You may have to put things on new line especially if you have comment in your code. <?php echo "<img id=\"1\" class=\"items\" src=\"../assets/images/cookie.gif\" />\n"; echo " <script type=\"text/javascript\">\n"; echo "//<![CDATA[\n"; echo "new Draggable(\"1\", {revert:'true'})\n"; echo "//]]>\n"; echo "</script>\n"; ?> Ray Quote Link to comment Share on other sites More sharing options...
dc_jt Posted February 6, 2008 Author Share Posted February 6, 2008 Thanks very much that worked great Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.