Old 22-01-2004, 04:54   #1 (permalink)
dan
Iris Folder
 
dan's Avatar
 
Join Date: Apr 2003
Location: smokey
Posts: 2,643
Javascript loading?

Hey there, Got a quick Javascript query that I'm pretty sure I already know the answer to...

Can you load external files into an html page using Javascript? For example loading a txt file into a div?

Now from what I can tell this isn't really what it's designed for (being client side n' all) but I have found some (rather in depth it must be said) methods for doing this that are specific to IE or Nutscrape. Is this kind of functionality available in a more general cross platform way?

Why the hell would I want to do this anyway? Why not use an SSI?

Basically, I would normally use PHP but the people who I'm working the site up for (a school) have access to a Microsoft server that will only run ASP - I don't have the time or the will power to learn ASP so I'm trying to find some kind of workaround. They are pretty reluctant to purchase any other software that may help manage the site on their end as well

Of course they only found out they had the free server space after I'd worked up the designs and told them all the easy managment tools I could get working for them (admin back end etc) and then they land this on me... bugga. Still working on persuading them to get another server (but to upgrade to a linux server with RM costs stupid money)

Any Ideas - apart from ASP?

D.
  Reply With Quote
Old 22-01-2004, 06:29   #2 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,934
Given that PHP includes only require php support and a single line of markup/code, is it not safe to assume that the ASP equivalent is equally simple (read: quick to learn)?

PHP includes was the first thing I learned about PHP (actually what I came looking for), but it took me all of 30 seconds to learn how to implement it.
If you've got previous knowledge of ASP, then it should take you even less time than that to learn the ASP equivalent.
  Reply With Quote
Old 22-01-2004, 06:37   #3 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,200
Yep might as well use ASP...

Code:
<% <!-- #include file="SomeTextFile.txt" --> %>
__________________
That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
  Reply With Quote
Old 22-01-2004, 13:51   #4 (permalink)
lucidcreations
Part of the 3 out of 4
 
lucidcreations's Avatar
 
Join Date: Feb 2003
Location: cheshire
Posts: 2,079
yep ASP is a piece of piss especially if you write it in Javascript not VBscript (wanky language VBscript).

just: <!-- #include file="SomeTextFile.txt" --> will do the trick you dont need the asp tags either side.

if you wanna do ASP in javascript then just stick this at the top of your page.

<%@ language="javascript" %>
__________________
Jase
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8