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

Discussion in 'Perl Misc' started by John Everett, Jul 31, 2003.

  1. John Everett

    John Everett Guest

    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
    John Everett, Jul 31, 2003
    #1
    1. Advertising

  2. In article <>,
    (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/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-
    --
    Michael Budash
    Michael Budash, Jul 31, 2003
    #2
    1. Advertising

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

    (John Everett) wrote in
    news::

    > 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-----
    Eric J. Roode, Jul 31, 2003
    #3
  4. John Everett

    John Everett Guest

    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
    John Everett, Jul 31, 2003
    #4
  5. (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\\
    Brian McCauley, Jul 31, 2003
    #5
  6. John Everett <> 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
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Jul 31, 2003
    #6
  7. John Everett <> 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
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Jul 31, 2003
    #7
  8. -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    (John Everett) wrote in
    news::

    > 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-----
    Eric J. Roode, Jul 31, 2003
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tricky
    Replies:
    0
    Views:
    555
    Tricky
    Mar 19, 2009
  2. Mike Meng
    Replies:
    3
    Views:
    234
    Yi Zheng
    Sep 7, 2008
  3. Madhusudan Singh
    Replies:
    0
    Views:
    61
    Madhusudan Singh
    Jul 18, 2003
  4. Susan Cranford
    Replies:
    2
    Views:
    385
  5. mscir
    Replies:
    4
    Views:
    111
    mscir
    Sep 11, 2005
Loading...

Share This Page