Is the error occurring when the page loads, because of this:
  conn(window, 'onload', model_id_changed);
or when the select changes, because of this:
  conn($('form_model_id'), 'onchange', model_id_changed);

I'm guessing it's the former.  In that case, the event is going to be
very different than in the latter case.  I don't even know if IE will
have a target for a window load event (and I'm on Linux ATM so I can't
test), but even if it does, it will almost certainly be window, so
what you're really saying is:
  var model_id = window.value;
Since the window doesn't have a value property, that would explain
your error.

Hope that helps,
Jeremy

P.S.  You can simplify this line:
  conn($('form_model_id'), 'onchange', model_id_changed);
slightly to:
  conn('form_model_id', 'onchange', model_id_changed);
because Signal.connect (like most if not all of the DOM functions)
will automatically do the $() for you if you pass a string as an
argument when it's expecting an element.
On Oct 25, 9:49 am, shday <[EMAIL PROTECTED]> wrote:
> I should have mentioned it. Line 24 is:
>
>    var model_id = event.target().value;
>
> On Oct 25, 12:30 pm, machineghost <[EMAIL PROTECTED]> wrote:
>
> > Stupid question: which line is line 24? (or more specifically, which
> > line caused the error, as line 24 in your reduced version might be
> > different than 24 in the original)
>
> > Jeremy
>
> > On Oct 25, 6:55 am, shday <[EMAIL PROTECTED]> wrote:
>
> > > For the page below, I get the following error message:
>
> > > Line: 24
> > > Char: 4
> > > Error: Object required
> > > Code: 0
>
> > > In FireFox there is no error.
>
> > > Here is the page (I've actually chopped down the real page to this
> > > test version). You will have to place Mochkit.js in the same folder as
> > > the page to get the same error.
>
> > > Any help would be appreciated.
>
> > > Steve
>
> > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
> > > "http://www.w3.org/TR/html4/loose.dtd";>
> > > <html>
> > > <head>
> > >     <meta content="text/html; charset=utf-8" http-equiv="content-
> > > type">
> > >     <title>Study Request Tracking System</title>
> > > <script src="MochiKit.js" type="text/javascript"></script>
> > > <script type="text/javascript">
> > > var conn = MochiKit.Signal.connect;
>
> > > function replace_lab(req) {
> > >    var lab = evalJSONRequest(req).lab;
> > >    replaceChildNodes($("form_lab"),
> > >        map(
> > >            function(s) {
> > >                return OPTION(s)
> > >            },
> > >            lab
> > >        )
> > >    );
>
> > > };
>
> > > function model_id_changed(event) {
>
> > >    var model_id = event.target().value;
> > >    var def = doSimpleXMLHttpRequest("/model/" + model_id + "/
> > > get_lab");
> > >    def.addCallback(replace_lab);
>
> > > };
>
> > > function init_model_selector() {
> > >    conn($('form_model_id'), 'onchange', model_id_changed);
>
> > > };
>
> > > conn(window, 'onload', init_model_selector);
> > > conn(window, 'onload', model_id_changed);
>
> > > </script>
> > > </head>
> > > <body>
> > >   <form action="/insertrequest" method="post" class="tableform"
> > > name="form" enctype="multipart/form-data">
> > >     <table cellpadding="2" cellspacing="0" border="0">
> > > <tr class="odd">
> > >             <th>
> > >                 <label class="fieldlabel"
> > > for="form_model_id">Model_id</label>
> > >             </th>
> > >             <td>
> > >                 <select id="form_model_id" name="model_id"
> > > class="singleselectfield requiredfield">
>
> > >             <option value="">Please select a model</option>
> > >             <option value="10">A13 - lung studies</option>
> > >             <option value="13">CYT - intranasal</option>
> > >             <option value="17">FIB - pulmonary fibrosis</option>
> > >     </select>
> > >             </td>
> > >         </tr><tr class="even">
> > >             <th>
> > >                 <label class="fieldlabel" for="form_lab">Lab</label>
> > >             </th>
> > >             <td>
> > >                 <select id="form_lab" name="lab"
> > > class="singleselectfield requiredfield">
> > >     </select>
> > >             </td>
> > >         </tr>
> > >         <tr>
> > >             <td></td>
> > >             <td><input type="submit" class="submitbutton"
> > > value="Save"></td>
> > >         </tr>
> > >     </table>
> > > </form>
> > > </body>
> > > </html>


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to