Discussion Locked

help on how to change document.location and innerHTML of a span in new doc

0 helpful
0 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello,

HELP!!!! I am at a lost of what to do. I need to changed the document.location to a news/index.html page. Here's the twist. I need to change the innerHTML of a span tag on the new page, news/index.html. Here's the code I have to date.... Changes the location great, but not the innerHTML of the span tag.

function getarticle(artnum, from){
var arttitle = "";
var article = "";
document.location.href = "news/index.html";
if (artnum == 10200302){
arttitle += "the news article title";
article += "the news article text";
}
document.getElementById("arttitle").innerHTML = arttitle;
document.getElementById("article").innerHTML = article;
}

Thank you in advance for any help you can provide.
Kim

0 replies

No replies were posted before this discussion closed.

This discussion is closed to new replies.