skubie, I've fixed the problem. The error was in the repaint() method--which was expecting that the <select /> element had a title attribute.
I've uploaded a fixed version of the plug-in: http://www.givainc.com/labs/linkselect_jquery_plugin.htm Let me know how the new version works out for you. -Dan (BTW - I recommend looking into adding a title attribute to your select tag, it can make the linkselect a little more user-friendly.) On Thu, Jul 30, 2009 at 11:35 AM, skube <sku...@gmail.com> wrote: > > Here is a distilled (cut and paste) version of the code. Only the > plugin is not supplied. > The error that is coming up is I[0] is undefined > > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// > www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> > <head> > <title>Test</title> > <style type="text/css"> > a.linkselectLink {text-decoration:none; display:block;} > .linkselectContainer {position: absolute; left: 0; top: 0; > display: none; max-width: 500px; } > .linkselectContainer .scrollable {width: auto; background- > color: white; text-align: left; overflow: auto; max-height: 216px; > clear: both;} > .linkselectContainer ul {margin: 0px; padding: 0px;} > </style> > <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/ > jquery.min.js" type="text/javascript"></script> > <script src="jquery.linkselect.min.js" type="text/javascript" ></ > script> > <script type="text/javascript"> > $(function(){ > > $("#one").linkselect({ > change: function(){ > $("#two").linkselect("replaceOptions", > [{value:"1",text:"asdf"}]); > } > }); > > $("#two").linkselect(); > > }); > </script> > > </head> > <body> > <select id="one"> > <option>option 1-1</option> > <option>option 1-2</option> > <option>option 1-3</option> > </select> > <select id="two"> > <option>option 2-1</option> > <option>option 2-2</option> > <option>option 2-3</option> > </select> > </body> > </html> >