![]() |
| ||
| Capturing data from txt file using JavaScript/HTML I have successfully converted my .tiff file to a text file. This was a major step. My issue now that i am facing is "capturing" pertinent data. I am attempting to do this by running a JavaScript to create an HTML file from the .txt file. I am having trouble figuring out how I am going to pass the argument of a .txt file and embedding it into the HTML page. Thoughts? Anyone? Bueller? Bueller? dano |
| ||
| Re: Capturing data from txt file using JavaScript/HTML JavaScript cannot read a text file. You need to use server side code, such as ASP.NET or PHP, to process a file and render it to HTML. However, you can store large text strings as JavaScript variables, and use the JavaScript document.write() method to write HTML strings. |
| ||
| Re: Capturing data from txt file using JavaScript/HTML Not sure if this will help but a friend wrote some kind of script (.js, .class) or something of that nature to do just what you are wanting. I'll try to send him here to help you out! It was called awrite.js or jwrite.js. I know he had posted it on some java search site, just not sure which one. Once again i'll try to send him here to help you out! In the mean time try a search engine and put in awrite or jwrite. You might be able to find it on the net! |
| ||
| Re: Capturing data from txt file using JavaScript/HTML I thought, Javascript can not work with FSO. It's good to see this article. Ryan <URL SNIPPED> |
| ||
| Re: Capturing data from txt file using JavaScript/HTML The only way to capture or embed .txt file into (x)HTML document, is to use AJAX. Just let me know if you need some example over this thing. |
| ||
| Re: Capturing data from txt file using JavaScript/HTML What about JQuery?? jQuery Documentation: http://docs.jquery.com/Ajax/load#urldatacallback If not maybe try this code: /*For safety reasons I would only allow the PHP file to determine the location of the file...if you want the ability to pick your file just post and I will modify my code*/ |
| ||
| Re: Capturing data from txt file using JavaScript/HTML Don't bust yourself guys. Original post was Dec 2004!!! Airshow |
| ||
| Re: Capturing data from txt file using JavaScript/HTML Oh wow I didn't realize that this thread was that old. Now that I think about it....was jQuery even around back then? |
| ||
| Re: Capturing data from txt file using JavaScript/HTML Quote:
Airshow |
| ||
| Re: Capturing data from txt file using JavaScript/HTML Hi flash, JQuery is made for shorthand ellaboration of Javascript lines and simplifies the way you write your programs. And about that documentation that you've provided still uses AJAX Technology. If you will just take a good look over its frameworks, you'll see that all parts of it, is created by the method's, and properties of the Javascript language. And also if he wants this with PHP, then im sure this query wouldn't be here in the first place. |
| All times are GMT -4. The time now is 6:03 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC