[Javascript] code generator doesn't load script

Muchacho, Laurent (TWIi London) LMuchacho at twii.net
Thu Mar 20 07:35:05 CST 2003


Hi Len

I had a look to your page and it seems that the error occur only when you
launch the window because when it's open and you refresh your scroller work 
This make me think simply that the browser is calling your object before the
browser had time to load the js file. 

Laurent 

ps:this is only a guess and I'm not sure completely this is what's happening
I wait to see what David T.Lovering have to says for this one maybe after 10
confusing email he will have explain it. 



-----Original Message-----
From: Dierickx, Len (ESAS) [mailto:len.dierickx-eds at eds.com]
Sent: 20 March 2003 12:03
To: '[JavaScript List]'
Subject: [Javascript] code generator doesn't load script


Hi there,

I am creating a code generator for some cut-n-paste code I wrote, to avoid
to many questions about it.
The problems goes like this:

A page with a form generates the object ang gives this object:

var my= new scrollerObj('my','150','100','3','100','content in
here','333333','777777','1',[1,"none","#000000"],[2,"none","#ffffff"]); 

This is written in a script tag.
The object responds to the script loaded in hte head with this
<script type="text/javascript" src="js/ooscroller.js"></script>
doesn't work as it should, after that I added the code directly to the page
but that doesn't change a thing.
When I open a window using javascript, the first time the code is written to
the new window, loads the ooscroller.js file (checked with a document.write
at the end of the code) but it doesn't show the scroller >

Error on page
Lie: 10 
Char: 1
'scrollerObj' is undefined.
code: 0

second time you push the button both scrollers are written to the javascript
opened window, the error remains but it works.

Check the code on http://n.one.port5.com/generator_v1.3.html

tnx for checking,

Len Dierickx

 
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript


DISCLAIMER - The preceding e-mail message (including any attachments)
contains information that may be confidential, may be protected by the
attorney-client or other applicable privileges, or may constitute non-public
information.  It is intended to be conveyed only to the designated
recipient(s) named above.  If you are not an intended recipient of this
message, or have otherwise received it in error, please notify the sender by
replying to this message and then delete all copies of it from your computer
system.  Any use, dissemination, distribution, or reproduction of this
message by unintended recipients is not authorized and may be unlawful. The
contents of this communication do not necessarily represent the views of
this company.


More information about the Javascript mailing list