From: SourceForge.net <no...@so...> - 2003-09-08 20:11:06
|
Bugs item #802480, was opened at 2003-09-08 08:50 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448266&aid=802480&group_id=47038 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Ryan Lubke (rlubke) Assigned to: Nobody/Anonymous (nobody) Summary: Calling document.forms[0].elementName.name fails Initial Comment: Using version 1.2.3 (or CVS HEAD), javascript evaluation fails when accessing forms via index. Example: a page that renders an image map with multiple 'live' areas. Here is an example of the AREA element: <area alt="NAmerica" coords=<SOME COORDS>" shape="poly" onmouseout="document.forms[0].mapImage.src='/images/world.gif'" onmouseover="document.forms[0].mapImage.src='/images/world_namer.gif'" onclick="document.forms[0].worldMap_current.value='NAmerica'; document.forms[0].submit()"> Using the source of the onClick as the argument to executeJavascriptIfPossible will yield: EcmaError: lineNumber=[1] column=[0] lineSource=[document.forms[0].elements['worldMap_current'].value='NAmerica'; document.forms[0].submit()] name=[ConversionError] sourceName=[)] message=[The undefined value has no properties.] errorObject=[ConversionError: The undefined value has no properties.] If the form is access via name instead of the index, then javascript evaluation works as expected. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448266&aid=802480&group_id=47038 |