Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Can I refer a js file in javascript function?


Message #1 by Floyd Hunag <flloid@p...> on Sun, 18 Feb 2001 09:26:05 +0800
Check out http://www.dansteinman.com/dynapi/
I know some of these functions can load js files dynamically by calling an 
include function which writes the <script> tags to the browser (look at 
the www.e4.com site to see the kind of thing it's capable of).
Reading this last mail, I think maybe you should look at some code at 
Netscape:
http://developer.netscape.com/docs/technote/dynhtml/collapse/index.html
This contains a library which creates collapsible lists (cross browser!) 
entirely using javascript. I'm developing a version of this to run from a 
database and it works like a dream in both browsers.
> Thanks Imar, I learn a lot from you reply.
> I'd like to describe my problem in more detail and pls kindly tell me if 
it 
> is possible.
> What I want to do is to swap text content using client side javascript 
> function.
> I guess everyone here know the category browsing, 
> when you click a main category, page will transfer to the subcategory 
page. 
> And I believe using client side javascript you can present the 
subcategory 
> on the fly in the same page. 
> It will surely reduce many unnecessary downloads. First I implement this 
> using javascript function that changes a div content, and it does very 
well 
> in IE, but Navigator doesn't display it well. 
> I am sure there is a better way to achieve this, but it is really beyond 
my 
> knowlege, and furthermore, like swap image trick does, when you click 
swap 
> image button, instead of presenting image on the fly, the image start 
> downloading from romote server. Everything will be perfect if swap text 
can 
> do this too, especially when you have many text contents to swap in one 
> page like comprehensive category.
> 
> Thanks everyone giving his suggestions!
> 
> From Ed.

  Return to Index