<input type='image'> ... IE fails to pass value while Mozilla and Netsacpe works

J

John Everett

newsgroup...

I have found that the <input type=image'> passes a value when
interpeted with Netscape or Mozilla but NOT with IE.

Consider the following:

HTML page passing a form...

<html>
<head>
</head>
<body>
<form name='test' action='test.cgi' method='post'>
<input type='image' name='test' value='1' src='../images/blue_bullet.jpg'>
</from>
</body>
</html>



Perl cgi script catching the form (test.cgi)...

#!/usr/bin/perl
use CGI;

my $page = new CGI;
my $test_value = $page -> param('test');
print $page -> header();
print "test value: $test_value <br>";


Both Netscape and Mozilla and print $test_value
as "1" while IE prints it as an empty string.

Why does the HTML page not pass the input value
to the cgi script?

Any help would be great!

Thanks in advance.
John
 
M

Michael Budash

newsgroup...

I have found that the <input type=image'> passes a value when
interpeted with Netscape or Mozilla but NOT with IE.

Consider the following:

HTML page passing a form...

<html>
<head>
</head>
<body>
<form name='test' action='test.cgi' method='post'>
<input type='image' name='test' value='1' src='../images/blue_bullet.jpg'>
</from>
</body>
</html>

Perl cgi script catching the form (test.cgi)...

#!/usr/bin/perl
use CGI;

my $page = new CGI;
my $test_value = $page -> param('test');
print $page -> header();
print "test value: $test_value <br>";


Both Netscape and Mozilla and print $test_value
as "1" while IE prints it as an empty string.

Why does the HTML page not pass the input value
to the cgi script?

per http://www.htmlhelp.com/reference/html40/forms/input.html:

"When the graphical submit button is clicked, the coordinates of the
click are sent with the form submission as name.x=x-value and
name.y=y-value where name is the value of the NAME attribute, x-value is
the click's pixels from the left of the image, and y-value is the
click's pixels from the top of the image..."

looks like Netscape and Mozilla have (at least) extended the proper
behaviour... try your test with param('text.x') and see qhat happens...

hth-
 
E

Eric J. Roode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(e-mail address removed) (John Everett) wrote in
use CGI;

my $page = new CGI;
my $test_value = $page -> param('test');
print $page -> header();
print "test value: $test_value <br>";


Both Netscape and Mozilla and print $test_value
as "1" while IE prints it as an empty string.

Why does the HTML page not pass the input value
to the cgi script?

Looks like both Mozilla and Netscape are doing the wrong thing, while IE is
adhering to the standards. Wonders never cease.

Your question has nothing to do with Perl. Questions like this should be
posted to a newsgroup related to html, like comp.infosystems.www.html.

Check for the 'test.x' or 'test.y' parameter, not 'test'.

- --
Eric
$_ = reverse sort qw p ekca lre Js reh ts
p, $/.r, map $_.$", qw e p h tona e; print

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPyjozGPeouIeTNHoEQIpfwCgoqPcXOPz9Fqz/aPSX3UFeU9QohkAoLSl
civQymX8zgPoMhmgCskY3zp+
=wKx6
-----END PGP SIGNATURE-----
 
J

John Everett

Newsgroup...

Thanks for the insight and the abuse.
Made me feel all warm and fuzzy inside.

This news group is full of Perl CGI questions.
Seemed like a wise place to post.
Suppose not.

I strongly suggust that this group becomes a
moderated group before someone has a heart attack ;-)

-John
 
B

Brian McCauley

This news group is full of Perl CGI questions.

This is true. And so long as they really are _Perl_ CGI questions
(and not FAQs and not SAQs and not trivially answered in the manual)
they are accepted.

If they are actually language independant CGI questions that happen to
be expressed in Perl then you'll find they are met with varying
degrees of annoyance depending on how obvious it is that they are
language independant.

Language independant CGI questions that make no mention of Perl are
almost always met with distain.
Seemed like a wise place to post.

Why would that be? Even if you'd falsely concluded that non-Perl CGI
questions were on-topic here, your question not only had nothing to do
with Perl, it also had nothing to do with CGI. Your question was
purely one about HTML and web browsers.
Suppose not.

I strongly suggust that this group becomes a
moderated group before someone has a heart attack ;-)

No, people should take responsibility for their own actions.

People should lurk for a while to figure out what is and what is not
considered acceptable. Note: the fact that some topic is often posted
about here does not mean you can infer it's on-topic. Before you
could infer that you'd have to check that it doesn't always draw a
chorus of diapproval.

--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
 
T

Tad McClellan

John Everett said:
Newsgroup...

Thanks for the insight and the abuse.
Made me feel all warm and fuzzy inside.

This news group is full of Perl CGI questions.
Seemed like a wise place to post.
Suppose not.

I strongly suggust that this group becomes a
moderated group before someone has a heart attack ;-)


It is self-moderated.

People post what they want to post, some get good responses, others don't.

People choose which articles they'll read, and which they'll never see.

I'm going to do that one right now!

*plonk*
 
T

Tad McClellan

This news group is full of Perl CGI questions.
Seemed like a wise place to post.


That ditch is full of trash.

Seemed like a wise place to dump.


"If everyone jumped off of a bridge, would you jump too?" [1]


"... looking for another place to put the garbage. We didn't
find one. Until we came to a side road, and off the side of
the side road there was another fifteen foot cliff and at
the bottom of the cliff there was another pile of garbage.
And we decided that one big pile is better than two little
piles, and rather than bring that one up we decided to
throw our's down." [2]



[1] Mom

[2] "Alice's Restaurant", Arlo Guthrie
 
E

Eric J. Roode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(e-mail address removed) (John Everett) wrote in
Thanks for the insight and the abuse.
Made me feel all warm and fuzzy inside.

I didn't think my post was abusive. I'm sorry you thought so.
This news group is full of Perl CGI questions.
Seemed like a wise place to post.
Suppose not.

Nope.

- --
Eric
$_ = reverse sort qw p ekca lre Js reh ts
p, $/.r, map $_.$", qw e p h tona e; print

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPymepmPeouIeTNHoEQKKBgCgg9z1xTzSb2UU1VSu7pVofmW+eBkAn0m3
Ql2j8Ge8kZbIT4lAU2Xbkxr2
=ch8u
-----END PGP SIGNATURE-----
 

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,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top