Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Problem with include file.


Message #1 by "arun" <arun@l...> on Thu, 11 Apr 2002 17:25:34 -0700
try calling the function where you want to print the content ,

----- Original Message -----
From: "arun" <arun@l...>
To: "javascript" <javascript@p...>
Sent: Friday, April 12, 2002 5:55 AM
Subject: [javascript] Problem with include file.


> Hi all,
>
> I am having a displaying a html page with the design implemented using the
> style sheet. Body onload i am calling a JavaScript function which resides
in
> the include.js. The function gets executed and the result is displayed in
a
> different page as i am using "document.write" to display the content. So
> what happened is i am loosing my design implemented in the html file.
>
> My code goes like this:
>
> <html>
> <i am including the style sheet here>
> <script src="include.js" type=text/javascript>
>
>
> <body onload="javascript dunction is called">
> </body>
> </html>
>
>
>
> ***include.js*******
>
> function(..)
> {
> document.write(...);
> document.write(...);
> document.write(...);
> }
>
> I want the content to be displayed in the same html file which calls the
> JavaScript function.
>
>
> regards
>
> arun
>
>
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
> http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
> r-20
> Constructing Accessible Web Sites
> http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
> r-20
> Practical JavaScript for the Usable Web
> http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
> r-20
>


  Return to Index