CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Using JScript in CGI

 



vakla
stranger

Oct 29, 2001, 12:45 PM

Post #1 of 4 (464 views)
Using JScript in CGI Can't Post

I have a cgi/pl script and it referes to a javascript source code for a menu system which resides in the same directory (the cgi-bin).

But I get a syntax error warnign (I have visual interdev installed) and then the menu system is not loaded.

It works with all my html files, and the cgi/pl script has html embedded in it -- so I don't see why this isn't working.

Any suggestions?



yapp
User

Oct 30, 2001, 3:10 AM

Post #2 of 4 (461 views)
Re: Using JScript in CGI [In reply to] Can't Post

Please tell more details or attach a file...

However, are all quotes escaped when using simple (one line) print statements, like

Code
print "This is a \"simple\" statement";

or do you use

Code
print <<TO_END; 
<HTML>
...
... These statements?
...More HTML code
...
</HTML>
TO_END

?

Are all dollar signes escaped, in order they don't get replaced with scalar variable values (unless you use single quotes).



vakla
stranger

Oct 30, 2001, 10:42 AM

Post #3 of 4 (459 views)
CLARIFICATION [In reply to] Can't Post

NOTE: The javascript code is not in the cgi file, but is called from this scipt after the body tag:

<SCRIPT LANGUAGE="JavaScript1.2"
SRC="HM_Loader.js"
TYPE='text/javascript'></SCRIPT>

I have the HM_Loader.js in the same directory -- as well as the other files HM_Loader calls. It works fine with my HTML files, but since the cgi creates an HTML page, it really ought to be working, too. I would think.



vallely
Novice

Nov 1, 2001, 3:12 PM

Post #4 of 4 (453 views)
Re: CLARIFICATION [In reply to] Can't Post

I would not put the menu files in the cgi-bin.
I would keep them in the public_html directory and access them for your Perl scripts by using the full URL when you call the Javascript menu.
Like this----
<SCRIPT LANGUAGE="JavaScript1.2"
SRC="http://my-domain/HM_Loader.js"
TYPE='text/javascript'></SCRIPT>

---------------------------------







 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives