I had this perl code that generated .html automatically everyday users visited my website. the java script included in that generated .html doesnt work at all. I even tested this java in other html and it does run. is there any special header i need to include in my perl script so that java will run. ? pls reply
Mar 9, 2001, 5:07 AM
Veteran (19537 posts)
Mar 9, 2001, 5:07 AM
Post #2 of 12
Views: 5865
What is the code you have?
You shouldn't have to do anything....it should run as normal.
Paul Wilson.
Installations:
http://www.wiredon.net/gt/
You shouldn't have to do anything....it should run as normal.
Paul Wilson.
Installations:
http://www.wiredon.net/gt/
Mar 9, 2001, 9:17 AM
User / Moderator (314 posts)
Mar 9, 2001, 9:17 AM
Post #3 of 12
Views: 5824
also please understand the enormity of the difference between Java and JavaScript. they have absolutely nothing to do with one another apart from their name and the fact that they are highly object oriented.
-g
s/(\d{2})/chr($1)/ge + print if $_ = '8284703280698276687967';
-g
s/(\d{2})/chr($1)/ge + print if $_ = '8284703280698276687967';
Apr 29, 2001, 8:40 AM
User (158 posts)
Apr 29, 2001, 8:40 AM
Post #4 of 12
Views: 5791
I too have just experienced, for the first time, a problem executing java script within perl generated html.
On adding the script (which runs perfectly in a simple html document) between <java script> tags, to my dbman code I receive the error message:
-----------
Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: /0;s ");
}
count/: nested *?+ in regexp at /usr/home/domain/usr/local/etc/httpd/cgi-bin/dbman/diary.pl line 246.
--------------------------------------------------
The line in question is part of the java script, not the perl script.
Is perl somehow trying to execute this?
I am not a perl or java programmer, so help with this would be much appreciated.
David Olley
Anglo & Foreign International Limited,
http://www.afil.co.uk
On adding the script (which runs perfectly in a simple html document) between <java script> tags, to my dbman code I receive the error message:
-----------
Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: /0;s ");
}
count/: nested *?+ in regexp at /usr/home/domain/usr/local/etc/httpd/cgi-bin/dbman/diary.pl line 246.
--------------------------------------------------
The line in question is part of the java script, not the perl script.
Is perl somehow trying to execute this?
I am not a perl or java programmer, so help with this would be much appreciated.
David Olley
Anglo & Foreign International Limited,
http://www.afil.co.uk
Apr 29, 2001, 10:42 AM
Veteran (19537 posts)
Apr 29, 2001, 10:42 AM
Post #5 of 12
Views: 5839
Seeing the code would help.
Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/
Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/
Apr 29, 2001, 1:02 PM
Veteran (19537 posts)
Apr 29, 2001, 1:02 PM
Post #7 of 12
Views: 5775
Around the html and javascript you will see
print qq| and to end.. |;
Replace it with.....
print qq~ and to end ~;
Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/
print qq| and to end.. |;
Replace it with.....
print qq~ and to end ~;
Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/
Apr 29, 2001, 1:23 PM
User (158 posts)
Apr 29, 2001, 1:23 PM
Post #8 of 12
Views: 5801
Thank you Paul. That fixed it. The dbman script now runs correctly. Unfortunately, java returns an error message:
Expected ')', quoting a line number. I have checked for balanced paretheses, and all is well.
The strange thing is that the java script on its own works fine, but not within the perl script. I have cut and pasted the working script into the .pl file, but still get the java runtime error returned.
David Olley
Anglo & Foreign International Limited,
http://www.afil.co.uk
Expected ')', quoting a line number. I have checked for balanced paretheses, and all is well.
The strange thing is that the java script on its own works fine, but not within the perl script. I have cut and pasted the working script into the .pl file, but still get the java runtime error returned.
David Olley
Anglo & Foreign International Limited,
http://www.afil.co.uk
it'd help if you didn't put the javscript in the perl file..
i saw this line..
document.write("<a href=\"" + linkdays[c][2] + "\">");
perl outputs that as
document.write("<a href="" + linkdays[c][2] + "">");
which is a syntax error in javascript..
change that to
document.write("<a href=\\"" + linkdays[c][2] + "\\">");
there are probably more.. but i saw that one and i didn't want to look anymore
Jerry Su
http://www.jsu07.com
i saw this line..
document.write("<a href=\"" + linkdays[c][2] + "\">");
perl outputs that as
document.write("<a href="" + linkdays[c][2] + "">");
which is a syntax error in javascript..
change that to
document.write("<a href=\\"" + linkdays[c][2] + "\\">");
there are probably more.. but i saw that one and i didn't want to look anymore
Jerry Su
http://www.jsu07.com
Apr 29, 2001, 4:02 PM
User (158 posts)
Apr 29, 2001, 4:02 PM
Post #11 of 12
Views: 5773
Thank you Jerry
The correction that you pointed out was all that was necessary. Now the page displays the java perfectly.
I have promised myself that I will put aside some time to study both perl and java. Messing around with code that I don't fully understand is bound to end in tears. Most of the time I seem to get away with it, though. I am too old to pretend to keep up with young programmers, and I do not do this for a living (I would starve).
It probably makes you experts cringe!
While I am at it, thanks also to Eliot. I will look into using js files instead. All I have to do is learn how to do that. I may have some time before breakfast. Now the dbman application is looking the way it should, and I am quite pleased with it.
David Olley
Anglo & Foreign International Limited,
http://www.afil.co.uk
The correction that you pointed out was all that was necessary. Now the page displays the java perfectly.
I have promised myself that I will put aside some time to study both perl and java. Messing around with code that I don't fully understand is bound to end in tears. Most of the time I seem to get away with it, though. I am too old to pretend to keep up with young programmers, and I do not do this for a living (I would starve).
It probably makes you experts cringe!
While I am at it, thanks also to Eliot. I will look into using js files instead. All I have to do is learn how to do that. I may have some time before breakfast. Now the dbman application is looking the way it should, and I am quite pleased with it.
David Olley
Anglo & Foreign International Limited,
http://www.afil.co.uk