hhmmm, both of these work, now i'm confused as to which to use
what's the pro's and con's of each ?
and thanks for that i've never seen the window[] thing before
i'm new to javascript but i have seen eval() before, not should what it actually does, but still.
thanks both.
Hello
i've rewrote this code over but i can't get it to work (still), i have a function with arguments likes this...
function getdata(tt,num){
var s=tt+num;
alert(s); //for testing // and works fine up to this point.
var listdata= s.split("^"); // <-- something wrong here
for some...
I just tried your suggestion and something bad must of happened because the first file ''file1.js'' loaded as it should just like you said, but all the other *.js file would not work, I then tried to sneek them in to the cache by putting them in back ground sound tags...
( <bgsound...
If I loaded them all i'd more than likely get errors or it would just look a mess because the *.js files look like this..
file1.js
var data="lots of text";
file2.js
var data="lots of text";
and file3.js and so on, i'm sure you can see a theme forming.
thanks for the reply by the way.
there is only the one <script src=file1.js> in the head of the html page, i'm using on click to change the name of the src, also the whole page does get reloaded as i'm using a div's innerHTML and that all that changes in the page
Hi, All
I have some *.js files that i'm using to hold data that is sent to a div tag using innerHTML, I'm using the onclick event to change the name of the *.js file so that it loads new data i.e ( onclick='rtf.src=file2.js';getdata(); ) changing it to file2 from file1, but the trouble is when...
Hi, all
I sent an e-mail to my server (smtp pop3) with gmail
two days ago at test@mydomain.com and I received the
email, Then i tried it again today and I received
nothing, not even an e-mail telling me it couldn't
be sent. Does anyone know why and where it could
have went to ?.
when i say the status bar shows ( localhost/mainindex.js )
i just mean i can see it trying to load in the js without
the "/", o/s XP pro, browser firefox.
having said that i've just tryed your code..
<script id="rtf" src="main/index.js"></script>
<font...
Probably, i thought i'd ask here as to why the "/" chatacter
was being remaoved first, as it would be alot quicker
to put
<font onclick="javascript:rtf.src='main/index.js';">change</font>
or
<font onclick="rtf.src='main/index.js';">change</font>
than it would to write a whole new...
it should work.
when i use ..
<script id=rtf src="index.js"></script>
<font onclick="javascript:rtf.src='index2.js';">change</font>
it will change, but i need the sub folder "main".
maybe Targol, but it doesn't change.
It works fine when i change it by hand
ie edit it to <script src="main/index.js"></script>
or <script src="main/index2.js"></script>
but i want it to change onclick.
i can't use document.write as i am already writing into a
div innerHTML=, and it will rewrite my page, unless i do it
at the time that the page is first loaded, which seems alot
of work just to change the rtf.src .
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.