homepage Welcome to WebmasterWorld Guest from 54.205.247.203
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
External javascript for links drop box
Looking for external JS select box code to avoid page bloat
Shoestring




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

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




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

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)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved