[thelist] JavaScript: Link between frames with a form

jon steele jjsteele22 at yahoo.com
Thu Aug 22 11:51:00 CDT 2002


If by "ItemList" you mean a select form field, you can use new Option to add an option to the
list.

However, I wouldn't use a direct href link for this, as that would reload the page when it is not
really needed. Modify your links to

<a
href="#"
onclick="a=parent.TopFrameName.formName.ItemList;a.options[a.options.length] = new Option("DocID
Goes Here","DocID Goes Here As Well")">link</a>

Jon

--- Susan Wallace <susanhw at webcastle.com> wrote:
> Not being familiar enough with JavaScript, I don't know where to start to
> work on this functionality:
>
> I have two frames
>
> FrameA
> FrameB
>
> Frame A contains a form with a field named ItemList
>
> Frame B contains Links (a href=) that will have a specific value (i.e.
> DocID=13)
>
> What I would like to do is this:
>
> When a link in Frame B is clicked, the DocID is appended to the contents of
> the form field ItemList in Frame A
>
> Where do I start?
>
> I searched for various things in Google, but searching JavaScript is too
> broad, and I don't find anything obvious when I try to narrow it down. Is
> there a specific part of a document that I need to search for?
>
> Thanks!
> Susan Wallace
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com



More information about the thelist mailing list