Hi, > The most interesting thing is > that it works as an independent HTML file but fails with the above > error when I ran it on my server as a JSP page.
Very suspicious. :-) Sounds like a deployment error. With things running on your server, if you go to your page, and then edit the address bar to manually retrieve the JavaScript files from the relative "scripts" location and press Enter, does it work? E.g., suppose your usual page is: http://localhost:8080/some/path/somefile.jsp ...you'd edit that to be: http://localhost:8080/some/path/scripts/prototype.js ...and see if you do, in fact, see the Prototype file. If you do, try: http://localhost:8080/some/path/scripts/scriptaculous.js ...and make sure you get the script.aculo.us file. You might try making sure that all of script.aculo.us' subsidiary files are there. If they're all there, I'm not sure what's going on. (OT: Prototype works best if you declare a doctype on your documents, e.g., XHTML transitional or some such. Quirks mode isn't really supported. But I don't think that's what's going on *here*.) HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Mar 16, 3:13 pm, sujikin <sujeetkumarsi...@gmail.com> wrote: > Hi, > > For the below script, I am getting the error "Sortable is undefined", > > <html> > <HEAD> > <title>ABCD</title> > <meta http-equiv="Content-Type" content="text/html; > charset=iso-8859-1" /> > <script language="javascript" src="scripts/prototype.js" type="text/ > javascript" ></script> > <script language="javascript" src="scripts/scriptaculous.js" > type="text/javascript" ></script> > <link href="theme/default.css" rel="stylesheet" type="text/css" /> > <style> > ul.testlist { > list-style-type:none; > margin:0; > padding:0; > } > ul.testlist li { > width:200px; > font:12px Verdana; > padding:4px; > cursor:move; > } > ul.testlist li.over { > background-color:#fcb; > } > </style> > </HEAD> > <body> > <div style="position:relative;left:100px;top:-5px;"> > <ul id="testlist" class="testlist"> > <li id="item_1">One</li> > <li id="item_2">Two</li> > <li id="item_3">Three</li> > </ul> > </div> > <div id="test2" ></div> > <script type="text/javascript" language="javascript" > > // <![CDATA[ > Sortable.create('testlist', { > onUpdate: function() { $('test2').innerHTML= Sortable.sequence > ('testlist');} > }); > // ]]> > </script> > </BODY> > </html> > > All the js files are included properly. The most interesting thing is > that it works as an independent HTML file but fails with the above > error when I ran it on my server as a JSP page. > > Any help will be appreciated! > > Thanks & Regards > Sujeet --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---