Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-19-2005, 07:37 AM   PM User | #1
Duffman12
Regular Coder

 
Join Date: Oct 2005
Posts: 124
Thanks: 7
Thanked 0 Times in 0 Posts
Duffman12 is an unknown quantity at this point
reading from file?

i'm trying to load in pages using innerHTML. is it possible to read a txt or html file using javascript? or in-line php/javascript?
Duffman12 is offline   Reply With Quote
Old 10-19-2005, 02:22 PM   PM User | #2
nikkiH
Senior Coder

 
nikkiH's Avatar
 
Join Date: Jun 2005
Location: Near Chicago, IL, USA
Posts: 1,973
Thanks: 1
Thanked 32 Times in 31 Posts
nikkiH is on a distinguished road
I assume pages on the server?
Since Javascript runs on the client, it can't access pages on the server without help from server-side scripting.
If you have PHP, you can use that instead.
If you don't want the client to have to refresh, use an AJAX methodology to call PHP (or another scripting language that runs on the server) from the client-side javascript.
__________________

If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
Bored? Visit
http://www.kaelisspace.com/
nikkiH is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:26 AM.


Advertisement
Log in to turn off these ads.