Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > <input type='image'> ... IE fails to pass value while Mozilla and Netsacpe works

Reply
Thread Tools

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

 
 
John Everett
Guest
Posts: n/a
 
      07-31-2003
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
 
Reply With Quote
 
 
 
 
Michael Budash
Guest
Posts: n/a
 
      07-31-2003
In article <(E-Mail Removed) >,
http://www.velocityreviews.com/forums/(E-Mail Removed) (John Everett) wrote:

> 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/ht...ms/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-
--
Michael Budash
 
Reply With Quote
 
 
 
 
Eric J. Roode
Guest
Posts: n/a
 
      07-31-2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(E-Mail Removed) (John Everett) wrote in
news:(E-Mail Removed) om:

> 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-----
 
Reply With Quote
 
John Everett
Guest
Posts: n/a
 
      07-31-2003
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
 
Reply With Quote
 
Brian McCauley
Guest
Posts: n/a
 
      07-31-2003
(E-Mail Removed) (John Everett) writes:

> 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\\
 
Reply With Quote
 
Tad McClellan
Guest
Posts: n/a
 
      07-31-2003
John Everett <(E-Mail Removed)> wrote:
> 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*


--
Tad McClellan SGML consulting
(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
Tad McClellan
Guest
Posts: n/a
 
      07-31-2003
John Everett <(E-Mail Removed)> wrote:


> 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

--
Tad McClellan SGML consulting
(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
Eric J. Roode
Guest
Posts: n/a
 
      07-31-2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(E-Mail Removed) (John Everett) wrote in
news:(E-Mail Removed) om:

> 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/AwUBPymepmPeouIeTNHoEQKKBgCgg9z1xTzSb2UU1VSu7pVofm W+eBkAn0m3
Ql2j8Ge8kZbIT4lAU2Xbkxr2
=ch8u
-----END PGP SIGNATURE-----
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem understanding pass by value and pass by reference of arrays and what happens in the memory venkatagmail C++ 11 10-03-2007 02:00 PM
When I turn on my PC, it works, works, works. Problem! Fogar Computer Information 1 01-17-2006 12:57 AM
can't unescape image path in Netsacpe, adding image to td mscir Javascript 4 09-11-2005 12:13 AM
After rebooting my PC works, works, works! Antivirus problem? Adriano Computer Information 1 12-15-2003 05:30 AM
This code fails on IE but works with Netscape / Mozilla Madhusudan Singh Javascript 0 07-18-2003 09:29 PM



Advertisments