473,399 Members | 2,159 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,399 software developers and data experts.

Problem with IE(6.0)

121 100+
Hello,

I have one problem regarding <input> tag in forms
i am using input type=image and should be work as a submit buttom
in Mozilla firefox its working very fine, after submit the image button i can
able to get the post values of the text box.

whereas in IE(6.0) if i open same code in the IE i was not able to get the post values of text box. i.e. the image submit button is not working properly if a changed from type=image to type=submit it will work fine(i.e. i can get the post values).

so, this is my problem can any one get solution for this
Oct 24 '07 #1
4 1281
Atli
5,058 Expert 4TB
Hi.

I've used this method in IE6 without problems.
Could you show us your form and the code you use to read the data?
Oct 24 '07 #2
sbettadpur
121 100+
Hi.

I've used this method in IE6 without problems.
Could you show us your form and the code you use to read the data?

hi,

herewith i am sending my code..........
################################################## ##########
[html]<html>
<head>
<title>button</title>
</head>
<body>

<form name='f1' action='button.php' method='post'>
Firstname<input type='text' name='t1'>
Lastname <input type='text' name='t2'>
<!-- <input type='submit' name='sub' src='forward.gif' value='Fw'> -->

<input type='image' name='sub' src='forward.gif' value='Fw'>


</form>

<?php

$fname = $_POST['t1'];
$lname = $_POST['t2'];
$but = $_POST['sub'];

if(isset($but) or ($but == "sub") ) {

echo $fname;
echo $lname;
echo $but;
}

?>
</body>
</html>[/html]
################################################## ###########

The above code is working fine in Mozilla firefox whereas in IE it's working only when the submit button type='submit' but not in type='image'
Oct 25 '07 #3
Atli
5,058 Expert 4TB
Ok.. I see.

I've done a little testing and it appears that when an image is used to submit a form you get _x and _y values for the image, and a value for the image itself if the value is set. If it is not, no value for the image itself is sent.

IE6 does not include the value for the image, even if it is specified so you PHP code was ignoring the entire thing when it didn't receive a value for the image.

I tried this code on the data sent by your form:
Expand|Select|Wrap|Line Numbers
  1. echo "<pre>";
  2. print_r($_POST);
  3. echo "</pre>";
  4.  
And in IE6 I got these results:
Expand|Select|Wrap|Line Numbers
  1. Array
  2. (
  3.     [t1] => asdf
  4.     [t2] => asdf
  5.     [sub_x] => 17
  6.     [sub_y] => 72
  7. )
  8.  
In Firefox I got these results:
Expand|Select|Wrap|Line Numbers
  1. Array
  2. (
  3.     [t1] => asdf
  4.     [t2] => asdf
  5.     [sub_x] => 85
  6.     [sub_y] => 52
  7.     [sub] => Fw
  8. )
  9.  
Note that the sub_x and sub_y values changed every time I submitted, even tho the code remained the same, in both browsers. Have no idea why.

So all you need to do is modify your code to check the sub_x or sub_y values instead of the sub element and it should work fine.
Oct 25 '07 #4
sbettadpur
121 100+
Hello,

Thank you very much, your idea is helped me a lot and also i learnt new thing that if we gave submit button type=image we have to check for the x and y coordinates,

thanks
Oct 29 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: B McDonald | last post by:
Hi. I am trying to straighten out some DIV issues in the rendering of my no-tables CSS website. Right now the biggest issue is trying to render 2 columns several DIVs deep in the box model for my...
5
by: Charles Blaquière | last post by:
As part of my explorations in liquid design, I'm exploring ways to use the overflow: hidden property -- when browser windows become too narrow, I want (some) images to get cropped rather than have...
6
by: SeaPlusPlus | last post by:
I've got a problem... IE 6.0 twitches when I hover over a link then it won't twitch again for that group of links but will twitch the first time on the next group... and the next group... etc... ...
5
by: Chris Beall | last post by:
See http://pages.prodigy.net/chris_beall/BeallSprings/WC.Deed%20GG.116-17.html using the CSS at http://pages.prodigy.net/chris_beall/BeallSprings/BSstyle.css The page is a transcript of a...
8
by: Bob Skutnick | last post by:
Greetings, I'm hoping someone has experienced a problem I'm having: I have an existing ASP application (working fine) that uses an SSL server certificate. My user community is made up of both...
5
by: Stephen | last post by:
Hi, I have a problem with Netscape. I am using javascript to pass values and redirecting to the same place. it works fine in IE and not in netscape. please suggest. function popup(WardrobeSet)...
5
by: Segfahlt | last post by:
I need a little help here please. I have 2 win forms user controls in 2 different projects that I'm hosting in 2 different virtual directories. The controls have been test and operate okay in...
4
by: Eric Lindsay | last post by:
I seem to be running into problems when I try viewing pages at my site http://site.sheltersrus.com.au/ using this stylesheet http://site.sheltersrus.com.au/sheltersrus.css in Internet Explorer 6. ...
12
by: garyusenet | last post by:
I have had no replies to my previous post so perhaps I didn't write it good enough. Please excuse new thread but i wanted to break from the last thread hopefully this thread will be better. ...
1
by: crazy works | last post by:
hello guys, i have problem in the scroll bar on my css code , i am trying to use that css menu from that link http://www.cssplay.co.uk/menus/slide_fly.html it actually works very good but i want...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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,...

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.