[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
tom wrote: > > http://www.100297.itsosbroadband.co.uk/play/simplelist.html > > will fail > take a copy of the file and do as above it will work! > OR add another button that calls addItem and the other one works??? The above fails in Iceweasel 3.0.6, I believe the issue stems from the INPUT element name colliding with the function name. In the DOM INPUT element name define a Javascript array, elements with the same name making additional entries in the array. So in the example 'name="AddItem"' defines the array AddItem in scope, overriding the function with the same name, hence the error "no such function". I can't explain everything you are seeing, but I think this probably helps explain where the confusion starts, you'll figure the rest out I'm sure. All very inelegant, but then one of Javascript's main problems is the environment in which it finds itself. Not an issue I've seen before, but (nearly) all our JavaScript at work is stuck in various namespaces to avoid namespace conflicts like this one. -- The Mailing List for the Devon & Cornwall LUG http://mailman.dclug.org.uk/listinfo/list FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html