Hi Monks,
Hoping you can help me out as I've been unable to resolve an issue I'm having.
I have a CGI script that is calling a rather simple javascript file. Both are stored locally on the same server in the same directory.
The script (the CGI part) runs fine and does what it's suppose to but when the javascript portion is called it throws the following error:
Not a CODE reference at /xxxx/www/docs/xxxx/internal/xxxx/test.cgi line 48.
Here's the portion of the code calling the js script.
if ('20'.$Menu_Year == $Default_Year && $Menu_Month >= $Default_Mo
+nth && $Menu_Day >= $Default_Day) {
print $cgi->(-title=>'Pop-up Window',
-script=>{-language=>'javascript',
-type=>'text/javascript',
-src=>'http://s-internal.xxxx.com/xxxx/pop-up.js'});
It's just a simple alert window letting the user know that the date is out of bounds/not valid. I tried putting the code directly into the perl script but haven't had any luck. I'm using the alert\window.alert java function. I'd be open to other methods that accomplish the same task as well - looking into a few of those right now (so far no luck).
Permissions on the server are not an issue (775).
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.