Okay, this problem could either be javascript related or HTML related. Maybe a bit of both.

I picked up a form dependancy script from somewhere, and it works great. Only problem is, I can't seem to get the SELECTED option working for dropdown menus, which is kind of annoying.

I'd contact the creator, but the help thread has been dead for months.

I tried every HTML option I could find with no results, which led me to believe the problem is in the script somewhere.

Or I could just have missed something.

So, first, here is the javascript (sorry for length). If no one can find a cause there I'll move on to questioning folks in the HTML forum.

/*
Form Manager: A simple method of constructing complex dynamic forms.
Written by Twey, http://www.twey.co.uk/.
Use, copying, and modification allowed, so long as credit
remains intact, under the terms of the GNU General Public License,
version 2 or later. See http://www.gnu.org/copyleft/gpl.html for details.
*/

What I mean to say is, in a form, you have something like:
select
option
option
option
/select

I am trying to choose which option displays automatically in the dropdown. Now, with this javascript in play, currently NO OPTION is displayed as standard in the dropdown, as you will well see.

I hope that is more clear.

KyleT4L

08-14-2008, 02:39 AM

Anyone have any thoughts on this, mayhaps?

rangana

08-14-2008, 05:36 AM

I'm sorry for not coming in the thread last day, I was so busy. Anyway, which drop-down/s do you want to see by default?

So, your goal is to have a default "dropdown" be seen during load. Was it?

KyleT4L

08-14-2008, 08:30 PM

Not a problem, dude.

Anyway, sorta.

For example, if you click BLS at the top, new dropdown menus appear.

But they're blank.

You have to physically click them and select an item. I would rather that a 'standard' item be automatically selected when they appear.

Like a regular dropdown menu WITHOUT the javascript, you can use the SELECTED option to show which item will show up first on the dropdown (without clicking it), or otherwise the first item will appear first.

For some reason with this script that is no longer true.

Clearer?

rangana

08-15-2008, 02:19 AM

It was'nt clear, not when I viewed your page on IE which exhibits the problem you were describing. I have a hard time figuring what your problem was since FF does'nt show what IE is showing (oddly).

For a fix, replace the script to this:

/*
Form Manager: A simple method of constructing complex dynamic forms.
Written by Twey, http://www.twey.co.uk/.
Use, copying, and modification allowed, so long as credit
remains intact, under the terms of the GNU General Public License,
version 2 or later. See http://www.gnu.org/copyleft/gpl.html for details.
*/

No dice. Although the first selection in each dropdown was shown, it also negated the function of the dependancy script. Every drop down was shown on the page, rather than some being hidden until another selection was made.

rangana

08-15-2008, 05:57 AM

I have to admit that I'm confused and it beats me.
You might find luck on posting on DD. Twey, the owner of the script goes often on DD forum (http://dynamicdrive.com/forums/member.php?u=3374).