Debugging simple script under Aptana

R

RichardOnRails

Hi,

First, is this an appropriate NG for talking about debugging
JavaScript in Aptana?

Assuming it is, I'm trying to get a script to read an external text
file and display the text somehow. The script just dies in the file-
read operation, with no symptom. I tried unsuccessfully to get the
Debugger to run the HTML file.

I put up the following on my personal website:

1. The HTML file: http://home.comcast.net/~CaptQueeg/DemoFileIO.html
2. Some Aptana settings: http://home.comcast.net/~CaptQueeg/AptanaDebugSettings.jpg

Did any obvious mistakes jump out at you? Do my Aptana settings
suggest a reason why I can get anything happening under the debugger?

Thanks in Advance,
Richard

Key software: WinXP-Pro/SP2, FireFox 2.0.0.6, Firebug IE 7.0, Apatana
0.2.9.16696, Java JVM 1.5.0_11-b03

Other S/S: Ruby 1.8.2-15, Rails 1.1.6, Gem 0.9, MySQL 5.0.27-nt,
SciTE 1.72, SeaMonkey 1.1.4, OE 6.0, IE7,Apache Tomcat/5.5.12,
MS Office 2003 SP2, MSDevEnv 2002 v. 7.0.9466. .NET Frwk 1.0,
AVG-Free 7.5.476, Prevx1 2.0.2.23, Startup Cop Pro 2.03
 
R

RichardOnRails

Probably not and if my curiosity hadn't got the best of me

I've heard it killed a cat. This time it snared a knowledgeable
answer. I glad for that.
The problem is your call to the undefined fopen function. fopen is,
typically, a PHP function that opens a file.

I'm new to JavaScript and Aptana. I found an example on the Web
offering this code, but I didn't see any mention of PHP. But thanks
for alerting me to the problem.
Nice site; thanks.

I've just found some AJAX routines that may serve my purpose despite
FAQ 43; I'll see.
The error message was very intuitive as it pointed straight at the fopen
call.

You're so right. I never noticed that red warning in the Status Bar.
I know from the alerts the the "fopen" line was problematic, but I
didn't know exactly what the problem was. Thanks for pointing that
out, Randy.

Best wishes,
Richard
 
R

RichardOnRails

Hi Randy,

Thanks for your follow-up.
If you are trying to open a local file on the client machine then AJAX
isn't the solution. It will "work" when testing locally but it won't
work when testing from a server. Or, are you trying to open a file on
the server?

Initially, I'm working on my client machine, where the text file is
in the same directory as the HTML file, or a sub-directory.

When I put it up on a web server, the same relationship will obtain.

I haven't worked on that today, because I got distracted by another
question: how to have multiple <script type="text/javascript"
src= ...> entries. I just solved that, so my day ends nicely.

Regards,
Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top