Jump to content

Affecting gadget state on a web page


Yesideez

Recommended Posts

Just a little puzzled on this one.

 

Say I've got a page and the only thing on it is a load of gadgets. A couple checkboxes and a string gadget. I've not defined a form or a table yet when one of the checkboxes is ticked the string gadget is enabled. When it's unticked the string gadget is disabled. This I can imagine would be pretty simply.

 

Now let's place the gadgets inside a form - do I have to give it a name to be able to access the gadgets within Javascript?

 

Also, if I use a table do I have to give that a name to access it as above?

 

eg. document.myform.mytable.mystringgadget

 

Or can I still access the string gadget like this:

 

document.mystringgadget

 

I know and understand about nested objects (ie. a table inside a form may need to be accessed form first) but I can't get my head around when I have to name elements and include them in a document statement and when I don't.

Link to comment
Share on other sites

Thanks for that.

 

Unfortunately because JavaScript doesn't produce any error messages or even any codes its really difficult to debug.

 

Is there an add-on for Forefox or some other third party piece of software to help writing JavaScript?

 

I bought a small JavaScript pocket reference book but its been as useful as a chocolate teapot!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.