[thelist] JavaScript: Link between frames with a form

Tom Dell'Aringa pixelmech at yahoo.com
Thu Aug 22 12:26:02 CDT 2002


--- Susan Wallace <susanhw at webcastle.com> wrote:
> After some playing around with this, I have the link working to
> load the
> item number in the correct field, but now I need it to append to
> the listing.
>
> Here is an example page:
> http://www.webcastle.com/tests/FrameTest.html
>
> If you click the first link in the right frame, it fills in the
> number 15
> in the bottom field of the left frame. What I need to do is (I
> think)
> similar to what Tom sent which is have it feed to a function in the
> first
> frame and then append a comma and the next number to the list. If
> there was
> not already a value in the list, then don't insert the comma. Am I
> on the
> right track?

I think kind of - here is going to be your problem: What if I make a
mistake and want to remove one? Should they just go to the frame and
manually remove it? What if they accidentally leave a comma or some
bad data?

If I am guessing right, you want the user to add compositions that
will be submitted to the form, and it could be a fair number.

I don't think you want a text field then, you want is a multiple
option select field. They could click on the composition, the title
(not some number which has no meaning) could be added. You add as
many titles as you want.

Then, you have a control in the left frame for *removing* them if you
made a mistake. Select, click remove. The titles in the box should
not be editable (disabled) so they don't hack them and misspell them
(you can write the same values to hidden fields to get them to pass
to the form processing code.)

It might sound like a lot of work, but I think for the user its the
best - and its really not that hard to do. I can show you some code
offline if you are interested in that solution -

Otherwise - yes, just check for data and then append with commas!
LOL. Sorry for the length.

Tom

=====
var me = tom.pixelmech.webDeveloper();

http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]

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



More information about the thelist mailing list