Let me append my earlier post.
If you write a function like this:
function myfunction(name){
document.form.name.do_something_legal_to_this_object
}
All you have to do on subsequent pages is pass the name of the object into
the function and you're good to go (e.g.
onClick="javascript:myfunction(objectName)") as long as the function is
included in the page.
Sorry for any confusion.
> -----Original Message-----
> From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 19, 2002 1:45 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] HTML Forms question...
>
>
> Not only does Mike's description below work really well for a
> single page,
> if you write all of your JS stuff like this, you can very
> easily use the
> same script on multiple pages. Portability! Works great for me.
>
> > -----Original Message-----
> > From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, November 19, 2002 1:35 PM
> > To: 'Rich Gray'; NIPP, SCOTT V (SBCSI); [EMAIL PROTECTED]
> > Subject: RE: [PHP-DB] HTML Forms question...
> >
> >
> > > -----Original Message-----
> > > From: Rich Gray [mailto:[EMAIL PROTECTED]]
> > > Sent: 20 November 2002 01:13
> > >
> > > If you name the checkbox as name="system[]" then PHP will
> > > automatically
> > > create an array of the checkbox values which can be
> > > subsequently accessed
> > > via $_POST['system'][n] - be warned however that the '[]' can
> > > screw up any
> > > JavaScript code that refers to the checkbox object...
> >
> > G'rrrr -- not this old chestnut again!
> >
> > It only "screws up" your JavaScript if you don't write your
> > JavaScript to
> > allow for it.
> >
> > It's really very simple: *by* *definition* in JavaScript,
> the notation
> >
> > a.b
> >
> > is *identical* to
> >
> > a["b"]
> >
> > Thus, if you have a single checkbox named with name="system",
> > then you can
> > access it in either of these ways:
> >
> > document.form.system
> > document.form["system"]
> >
> > By extension, if you have multiple checkboxes all named with
> > name="system[]", you can refer to them as:
> >
> > document.form["system[]"][0]
> > document.form["system[]"][1]
> > document.form["system[]"][2]
> >
> > etc...
> >
> > I know this works because I've been using it for years
> (even before I
> > started programming with PHP!).
> >
> > Cheers!
> >
> > Mike
> >
> >
> ---------------------------------------------------------------------
> > Mike Ford, Electronic Information Services Adviser,
> > Learning Support Services, Learning & Information Services,
> > JG125, James Graham Building, Leeds Metropolitan University,
> > Beckett Park, LEEDS, LS6 3QS, United Kingdom
> > Email: [EMAIL PROTECTED]
> > Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php