Hi, Thanks for the reply. There is no error shown in Google Chrome. Here is a test file.
<!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!--<script type="text/javascript" src="MochiKit-1.3.1/lib/MochiKit/ MochiKit.js"></script>--> <script type="text/javascript" src="MochiKit-1.4/lib/MochiKit/ MochiKit.js"></script> <title></title> </head> <body> <form action=""> <div style="margin-left:5px"> <h2>Analogue Inputs</h2></div> <!--AN1--> <div class="an"> <h3> </h3> <div class="tableDataGrey" style="width:130px;"> <label>Measuring Quantity <select name="an1MeasuringQ" size="1" id="[AN1_MEASURING_Q]"> <option value="level" >Level</option> <option value="pressure" >Pressure</option> </select> </label> </div> </div> </form> </body> </html> <script type="text/javascript"> function getAnalogueInputs(){ var node = 'pressure'; node = getElement('[AN1_MEASURING_Q]'); setNodeAttribute(node.options[getSignalTypeAsIndex(node [0])],'selected','selected'); } function getSignalTypeAsIndex(type){ if(type == "level") return 0; else return 1; } connect(window, 'onload', function() { getAnalogueInputs(); } ); </script> On Dec 7, 11:10 pm, "Per Cederberg" <[EMAIL PROTECTED]> wrote: > If you could provide more details on exactly what is breaking it would > be easier to help. Perhaps a minimal HTML file exposing the issue? If > you can find any error or debugging information from Chrome (if there > is any) that too would be very helpful. > > Cheers, > > /Per > > On Sun, Dec 7, 2008 at 8:49 PM, [EMAIL PROTECTED] > > <[EMAIL PROTECTED]> wrote: > > > Hi, > > > The following code doest work with Google Chrome but is OK with > > firefox and IE7 > > > node = getElement('[AN3_PRE_ALARM_ACTION]'); > > setNodeAttribute(node.options[getActionAsIndex(d.an3 > > [7])],'selected','selected'); > > > Any thoughts? > > > Regards, > > Nick --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~----------~----~----~----~------~----~------~--~---
