473,402 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Show Stopper

Pat
The contents of a simple form are sent to a Perl CGI in the server.
The Perl code is:
use CGI qw(:standard);
print "Content-type: text/html\n\n";
print "<html><head></head><body>Testing Thruput<br>";

print "<script language="JavaScript">";
print "</script>";

$value = param(myname);
print "$value<br>";
$value = param(addr);
print "$value<br>";
print "</body></html>";

If <script language="JavaScript"> and the matching </script> tag are
output to the browser, it will not process -- the browser hangs. If
these two lines are commented out, the browser handles the page
without a problem.

Question: Cannot a CGI output an HTML page that includes JavaScript?

I'm either missing something basic, or making a dumb mistake.

Pat
Jul 23 '05 #1
8 2013
On 3 Jun 2004 10:53:32 -0700, Pat wrote:
print "<script language="JavaScript">";


try..
print "<script type='text/javascript'>";

N.B. use of single quotes..

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #2
You have a quoting problem.

Try:

print "<script language='JavaScript'>";
print "</script>";

or:

print "<script language=\"JavaScript\">";
print "</script>";
--
i.m.
The USA Patriot Act is the most unpatriotic act in American history.

Jul 23 '05 #3
Pat wrote:
print "<script language="JavaScript">";

^
Quote marks!

And, since 1996, the language attribute has been deprecated and the type
attribute required.

print qq(<script type="text/javascript">);

or

print "<script type=\"text/javascript\">";
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #4
Lee
Pat said:

Question: Cannot a CGI output an HTML page that includes JavaScript?


For future reference, that would have made a much better
subject line than "Show Stopper".

Jul 23 '05 #5
Ivan Marsh wrote:
You have a quoting problem.

Try:

print "<script language='JavaScript'>";
print "</script>";

or:

print "<script language=\"JavaScript\">";

Or
print "<\/script>";
Mick
Jul 23 '05 #6
Lee
Mick White said:

Ivan Marsh wrote:
You have a quoting problem.

Try:

print "<script language='JavaScript'>";
print "</script>";

or:

print "<script language=\"JavaScript\">";

Or
print "<\/script>";


No need for that, since Perl doesn't find anything magical about "</".

That's only necessary if the code that's doing the writing is within
an XHTML page.

Jul 23 '05 #7
Pat
Lee <RE**************@cox.net> wrote in message news:<c9********@drn.newsguy.com>...
Pat said:

Question: Cannot a CGI output an HTML page that includes JavaScript?


For future reference, that would have made a much better
subject line than "Show Stopper".

Thanks to all of you for pointing out this basic error on my part. I
discovered it after I'd posted the message, and feel like a beginner
(which I am)!

And roger on a better subject line for my original message. I'll have
to think more about the subject, and not my feelings of the moment.

Thanks, all
Pat
Jul 23 '05 #8
"Pat" <pm********@yahoo.com> wrote in message
news:fd**************************@posting.google.c om...
Lee <RE**************@cox.net> wrote in message

news:<c9********@drn.newsguy.com>...
Pat said:

Question: Cannot a CGI output an HTML page that includes JavaScript?


For future reference, that would have made a much better
subject line than "Show Stopper".

Thanks to all of you for pointing out this basic error on my part. I
discovered it after I'd posted the message, and feel like a beginner
(which I am)!

And roger on a better subject line for my original message. I'll have
to think more about the subject, and not my feelings of the moment.

I just thought that this concept should not be buried in a thread, so I made
it the subject line. Not only newbies, either!

--
Mabden
Jul 23 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

77
by: nospam | last post by:
Reasons for a 3-tier achitecture for the WEB? (NOTE: I said, WEB, NOT WINDOWS. DON'T shoot your mouth off if you don't understand the difference.) I hear only one reason and that's to switch a...
3
by: dp | last post by:
I am new to VB.NET and I have a simple question. How do I show a form from a command button click event? The code I have below is not working. I am trying to show the form frmAgent. What am I...
2
by: Ajai Kumar .R | last post by:
Hai all, I've two or more forms on my app. My requirement is, Have to show the first form asa the user press a button have to hide the first form and show the second form. If the user press the...
0
by: Efkas | last post by:
I have a full custom application with some widged extending Controls like Label and PictureBox. I build a menu with these widgets. When I click on one of them, it calls a function to display...
13
by: Tim Smallwood | last post by:
Hi, This is probably a stupid question, but I can't seem to get a form to show / load? In the older versions of VB I'd use frmMyform.show / load myForm, etc? I looked at the help file and it...
4
by: bridgemanusa | last post by:
Hi All: I have a very long page of html that I want to take portions and hide them in divs, then show when a link is clicked. I have the hide show part working when the link is clicked, however...
5
by: ali | last post by:
Hello every one i need you help regarding div hide and show. i am having a link like <a href="#" onClick="expandWin()">show/hide </a> <div id=showHide> </div> within div i have lots of...
10
by: =?Utf-8?B?QWxiZXJ0IEZ1?= | last post by:
Hi, my function: myAdjustForm.Show(); I am using the Show method to show the pop-up window to the users in my C# program. I found that I have invoke this function TWICE at the beginning...
1
oranoos3000
by: oranoos3000 | last post by:
hi would you please help me i have a online shopping center that i show pictures of the my product in home page. in the InterExplorer pictures is shown correctly but in Firefox browser is shown...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.