Grabbing text from a file

This is a discussion on "Grabbing text from a file" within the JavaScript Forum section. This forum, and the thread "Grabbing text from a file are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 6th, 2008, 11:59
New Member
Join Date: Apr 2008
Location: uk
Age: 27
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Grabbing text from a file

Hi I have a webform and it has three radio buttons. The buttons are labelled 1, 2 and 3. Only one can be selected at once. In the same folder as I keep the htm file I have three text files they are named 1.txt, 2.txt and 3.txt, the contents of these change from time to time. What i would like to do is be able to click on a radio button and then have the contents of the corresponding text file fill in a textarea box.
Any help much appreciated.
Thanks
Rob
Reply With Quote

  #2 (permalink)  
Old Apr 6th, 2008, 12:23
New Member
Join Date: Apr 2008
Location: uk
Age: 27
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Grabbing text from a file

I am thinking this is not actually possible BUT-
I arent using this on the internet I am using it on my own PC, so I dont mind putting the text in .js files instead - Is it then possible to reference the text in these and do as i mention in my first post?
Thanks,
Reply With Quote
  #3 (permalink)  
Old Apr 6th, 2008, 16:16
CloudedVision's Avatar
Nerdy Moderator
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 942
Blog Entries: 8
Thanks: 2
Thanked 21 Times in 21 Posts
Send a message via AIM to CloudedVision Send a message via MSN to CloudedVision Send a message via Skype™ to CloudedVision
Re: Grabbing text from a file

sure it's possible. You'll want to look into AJAX. I prefer Mootools. The beta is pretty stable, and has much better documentation.
__________________
echo "Take it easy, ".$CloudedVision;
.links { site: other-road-design; blog: only-nerds-allowed; project: resource-fish; organization: ARMIES6; }
<quote>&quot;I think it's wrong that only one company makes the game Monopoly&quot; - <name>Steven Wright</name></quote>
Last Blog Entry: More Cheat Sheets (Jul 12th, 2008)
Reply With Quote
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a log file (text file) and an XML file using XSL kdelacruz Other Programming Languages 1 Nov 4th, 2006 21:12
Is it possible to use an external text file for a variable AdRock JavaScript Forum 2 Sep 15th, 2006 17:25
Writing to a text file Gurpreet82 Classic ASP 0 Mar 15th, 2006 15:57
Text file download harlekin Classic ASP 2 Dec 5th, 2005 18:23
Need help with Web Page Text Grabbing ITUser Other Programming Languages 3 Aug 20th, 2005 00:21


All times are GMT. The time now is 22:49.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43