Jump to content

scriptaculous help with sortable


c_shelswell

Recommended Posts

Hi I'm having a real problem with creating a sortable list with scriptaculous. I've got it working just fine in Vista but for some reason it wont work at all in xp on firefox or ie6. I just keep getting the error: Sortable is not defined.

 

My code is below. If any one has any ideas why xp might not work that'd be great.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
	<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
		<head>
			<meta http-equiv="Content-type" content="text/html; charset=utf-8" />

		<script src="http://localhost/frameworks/prototype.js" type="text/javascript"></script>
		<script src="http://localhost/frameworks/scriptaculous/src/scriptaculous.js"></script>

			<title>test</title>
</head>

<body>

<ul id="categories" class="sortableList">
<li id="item_1">Galleries</li>
<li id="item_2">Art</li>
<li id="item_3">Roadtrip</li>
<li id="item_4">Yosemite</li>
<li id="item_5">Animals</li>
<li id="item_6">Australia</li>
<li id="item_7">Wesleyan</li>
<li id="item_8">California</li>
</ul>

<script language="JavaScript" type="text/javascript">
Sortable.create("categories", {
    onUpdate: function() {
    	alert('here');
    }
});
</script>
</body>
</html>

 

cheers

Link to comment
https://forums.phpfreaks.com/topic/129223-scriptaculous-help-with-sortable/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.