Closed Thread Icon

Preserved Topic: HTML or JavaScript for Form Elements? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=18493" title="Pages that link to Preserved Topic: HTML or JavaScript for Form Elements? (Page 1 of 1)" rel="nofollow" >Preserved Topic: HTML or JavaScript for Form Elements? <span class="small">(Page 1 of 1)</span>\

 
CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 11-13-2001 20:58

I have noticed that some web sites use JavaScript to write the form elements of a drop down menu. What would be the advantage of doing it this was as opposed to just putting it in with HTML code?

You can see what I mean by looking at Symantec's Website.

~Thanks in advance.

Sash
Paranoid (IV) Inmate

From: Canada, Toronto
Insane since: May 2000

posted posted 11-13-2001 21:22

The reason that comes to my mind is to not show the menu to the non-javascript browsers. They use javascript jump menu, so it wouldn't work on non-javascript browsers.

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 11-13-2001 21:48

Well, that makes some sense. I can't figure out why someone would want to do this instead or just making it in the HTML script. Seems like it is just making more work.
Just a questions.

Thanks Sash

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 11-14-2001 01:45

I've also used PHP to grab MySQL data from a database, then create the drop menu on the fly. Also, you can use JavaScript to populate a drop menu based on certain criteria, such as the value of a previous form field. An example that comes to mind is Ford. Go to that page, and look at the VEHICLE SELECTOR. You notice that the bottom drop menu doesn't have any options until you choose something in the top drop menu.

Hope this helps.

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 11-14-2001 02:23

This particular example is wierd because it does look like it uses a cgi for the menu to back up the JS.

In this case it's unecessary. But Sash did give a good reason.

Pugz is correct as well some sites dynmically change the menus depending on a previous choice. However the way this was implemented is not the way to do that.



:[ Computers let you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila. ]:

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 11-14-2001 14:14

Thanks for the input guys! I guess I was just wondering if I was missing something on Symantec's site. I just didn't see any reason for them to do this. If they were concerned about the JavaScript Jump page thing for older browsers, they could have simply just used a "<noscript>" tag.

I'm not trying to critisize their work but I was just wondering if I was missing something.

Thanks for the input Pugzly! That was something that I didn't know. Cool!

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 11-14-2001 22:34

I can see no reason at all for symantec's site using the Js the way they did. Netscape and IE still render their form elements with completely different sizes and I could see that as another good reason to use Js.

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 11-14-2001 22:57

Yep. That's my point exactly Bugimus. I was just wondering if I was missing something.
I'm not the best JavaScripter.

C:\

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 11-14-2001 23:00

I can't see a good reason for it double (and triple) drop down menus are done very differently as in the example Pugzly's example shows and see here:
www.wsabstract.com/script/cut183.shtml

The only use I can think for doing something that way is to dynamically write it in so it can be moved but that doesn't seem to be the point here either.

My guess is that it is just one of those things we do because we've been doing it since the year dot (when was that 1997!?!) and it worked then so why change it?

Emps


You're my wife now Dave

« BackwardsOnwards »

Show Forum Drop Down Menu