/    Sign up×
Community /Pin to ProfileBookmark

help me with Table cells and file

Hi!
i was trying to display content of the text file in a table cell. i found the code for 1 file only which is as follows:

[CODE]<script language=’JavaScript’>
<!–
function include(lyr,url)
{
if (document.all)
{
// IE version
try {
var xml = new ActiveXObject(“Microsoft.XMLHTTP”);
xml.Open( “GET”, url, false );
xml.Send()
document.getElementById(lyr).innerHTML=xml.responseText;
}
catch (e) {
var xml = new ActiveXObject(“MSXML2.XMLHTTP.4.0”);
xml.Open( “GET”, url, false );
xml.Send()
document.getElementById(lyr).innerHTML=xml.responseText;
}
}
else
{
// Mozilla/Netscrap 6+ version
var xml=new XMLHttpRequest();
xml.open(“GET”,url,false);
xml.send(null);
document.getElementById(lyr).innerHTML=xml.responseText;
}
}
//–>
</script>
<body>
<table> <tr><td>
<script language=’JavaScript’>
document.write(‘<div id=”somediv”>&nbsp;</div>’);
include(‘somediv’,’http://somepath/somefile.txt’);
</script>.
[/CODE]

but i am looking to display different files in same cell according with different link.

i don’t know about javascript and i have to do this in assignment and i can’t use frames.
so can anyone help me please??

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @dbashyal spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...