Click to See Complete Forum and Search --> : Loading content from outside the page


AndrewA
10-15-2003, 05:07 AM
Right if got a vertical scrolling text box which has news and stuff like that in it. In the script a variable is set equal to a string containing the HTML content for the box like this.

var singletext=' HTML content '

What I want to do is load this HTML content from a seperate file. I've been looking around and i'm not sure if it's poissble but I thought I would ask here to see if anyone knew how to do it.

Andrew A.

pyro
10-15-2003, 07:10 AM
You should use a server-side language such as PHP to do this...

AndrewA
10-15-2003, 07:43 AM
I thought it may require that sort of thing, unforutnatly the company i'm working of ris too mean to buy a proper web hosting so I cannot do any CGI at all. Thats why i'm leaning quite heavily on JavaScript to deliver what they want.

Ta anyway.

Andrew A.

pyro
10-15-2003, 07:46 AM
Tell them that 13% (http://www.thecounter.com/stats/2003/May/javas.php) of users will not be able to use their site if it relies on JavaScript...