473,388 Members | 1,340 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,388 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 1279
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.