Need help ..

Hy,.

I'm trying to do something .. of medium complexity .. from my point of view .. but i can`t do it ..

In short ..

Let's say we have index.html and the body is linked to this ..

<span id=news>News 1</span>

Well .. i created a javascript that can change the News 1 to any text that i want ..

var news;

function el(id) {

if (document.getElementById) {

return document.getElementById(id);

} else if (window[id]) {

return window[id];

}

return null;

}

function updateNews() {

if (!news) {

return;

}

news.innerHTML = 'test';

}

so far so good .. but now i want something else .. i want this script to load the string that needs to change from .. let's say from a text file .

Is this possible ?

[852 byte] By [SuperStarRoa] at [2007-10-2 10:56:43]
# 1
i'm sorry, but javascript is actually compleatly unrelated to java except in name. I doubt you will find your anwers on this forum.
Ken_Sa at 2007-7-13 3:22:21 > top of Java-index,Java Essentials,New To Java...
# 2
Java and Javascript are not the same.I'd try a javascript forum: http://www.google.com/search?q=javascript+forum
prometheuzza at 2007-7-13 3:22:21 > top of Java-index,Java Essentials,New To Java...
# 3
maybe somebody knows .. and they will be nice to help me ..or .. something like that ..as a "bonus" question :is there anyway from a inline frame to call a javascript function in the html that includes the inline frame. Pls somebody ...
SuperStarRoa at 2007-7-13 3:22:21 > top of Java-index,Java Essentials,New To Java...
# 4

Seriously, java and javascript are compleatly diffrent. In fact lots of java programmers hate the fact that javascript uses java in the name because they are so diffrent. I don't even know what you are talking about let alone the answer to your question. It is a bit like walking into a butchers and asking about fresh veg.

If you find your anser here I wil be very supprised, you should look somewhere else.

Ken_Sa at 2007-7-13 3:22:22 > top of Java-index,Java Essentials,New To Java...