Welcome to WebmasterWorld Guest from 54.147.10.72

Forum Moderators: open

Message Too Old, No Replies

External javascript for links drop box

Looking for external JS select box code to avoid page bloat

     

Shoestring

7:47 pm on Jun 20, 2003 (gmt 0)

10+ Year Member



We're currently working on a very streamlined update for the main page of our site and have run into an issue involving links...

Basically, we need to add a drop box with a ton of links for returning users. We don't care that they be Google friendly or visable on the page. The problem is that we also want to avoid code bloat. Thus, an on-page standard drop box won't cut it.

Is it possible to do this via external JS? If so, could someone point me to an example of such code?

Many thanks.

tedster

2:24 am on Jun 21, 2003 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



One simple way is to use the external file to define the select box's entire code string as a variable, let's call it "box". Then all you need on the HTML page is the call to the external .js file and a script element in the proper spot:

document.write(box)

 

Featured Threads

Hot Threads This Week

Hot Threads This Month