473,386 Members | 1,726 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,386 software developers and data experts.

Browser incompatibility with Form Fields

7
Hi there,

My name's Paul and i'm an experienced non-HTML/PHP developer, just getting to grips with HTML & PHP.

I have a simple form which is working fine in Mozilla, but not in IE5.

The problem is that when the form is presented to the user, they cannot type anything into the input fields in IE5 but they can when using Mozilla.

Here is a sample of the code:

Expand|Select|Wrap|Line Numbers
  1. echo "<form action='processform.php' method='post'>";
  2.         echo "<h1 class='d'>";
  3.         echo "<table border='0' cellspacing='0' cellpadding='0'>";
  4.         echo "<tr><td align='right'><B>First Name:</td>";
  5.         echo "<td><input type='text' name='firstname' value='$firstname' size='30' maxlength='30'></td>";     
  6.         echo "</tr>";
  7.         echo "<tr><td align='right'><B>Surname:</td>";
  8.         echo "<td><input type='text' name='surname' value='$surname' size='30' maxlength='30'></td>";     
  9.         echo "</tr>";
  10. </table>
  11. </form>
  12.  
The h1.d is defined as:
Expand|Select|Wrap|Line Numbers
  1. h1.d {position:absolute; left:450px; top:0px; font-family:georgia; font-size:6pt}
  2.  
As it's working fine in Mozilla, I know the basic idea is sound, but I have no idea why IE5 is not allowing data to be entered into the input fields.

Many thanks if you decide to reply to me!

Cheers
Paul
Aug 9 '07 #1
16 1465
kestrel
1,071 Expert 1GB
Hey Paul, Welcome To the Scripts
Im going to move this thread to the PHP forum, you will find all the help you need there.

--
Kestrel
Aug 9 '07 #2
ak1dnar
1,584 Expert 1GB
Thread title changed to describe the problem in a well manner.
Ealiar : Hello & help please!
Aug 9 '07 #3
ak1dnar
1,584 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. echo "<form action='processform.php' method='post'>";
  2.         echo "<h1 class='d'>";
  3.         echo "<table border='0' cellspacing='0' cellpadding='0'>";
  4.         echo "<tr><td align='right'><B>First Name:</td>";
  5.         echo "<td><input type='text' name='firstname' value='$firstname' size='30' maxlength='30'></td>";     
  6.         echo "</tr>";
  7.         echo "<tr><td align='right'><B>Surname:</td>";
  8.         echo "<td><input type='text' name='surname' value='$surname' size='30' maxlength='30'></td>";     
  9.         echo "</tr>";
  10. </table>
  11. </form>
  12.  
If you are trying to print this form and table dynamically, why dont you not echoing </table> and </form> elements.

apart from that I couldn't figure out any problem with the form. And tested with IE7 and FF2.x.x (Sorry I dont have IE5)
Expand|Select|Wrap|Line Numbers
  1. echo  '</table>';
  2. echo '</form>' ;
and Give it a try, If failed post back.
Thanks and regards,
-ajaxrand
Aug 9 '07 #4
PaulT
7
Hi,

Thanks for taking a look at my code.

I have made the change but with no success. Here is the entire program:

Expand|Select|Wrap|Line Numbers
  1. <?php /* Created on: 03/08/2007 */ 
  2. /* Receive Variables from HTML Form */        
  3. ?>
  4. <html>
  5. <style type="text/css">                                                
  6. h1.c {position:absolute; left:10px; top:75px; font-family:georgia; text-align: left; color: black; font-size: 12pt}
  7. </style>
  8. </head>
  9. <body bgcolor="lightgoldenrodyellow">
  10.            <TABLE width=100%; align=center; border="2" cellpadding="5">
  11.         <tr>
  12.         <td BGCOLOR='#00ff00'; align=center><b><font face=georgia size=5>Birmingham Self-Catering Business Accommodation</td>
  13.         </tr>
  14.         </table>
  15.     <h1 class="c">
  16.     <TABLE clear=both; float=left; border="1" cellpadding="1">
  17.     <TD><B>2348 Coventry Road, Sheldon, Birmingham,B26 3LS.<p>info@birminghamstay.co.uk<p>
  18.     Phone/fax 0044(0)121 742 1626<br>Phone 0044(0)121 688 1720<br>Mobile 079739312917<p>        
  19.     Please <A href='index.html' title='Home'>click here</A> to return to the Home Page.<br></td></table></h1>
  20. <?php    
  21. /* Receive Variables from HTML Form */
  22.         $err = $_REQUEST['err'];
  23.         $firstname = $_REQUEST['firstname'];
  24.         $surname = $_REQUEST['surname'];
  25.         $email = $_REQUEST['email'];
  26.         $phone = $_REQUEST['phone'];
  27.         $address1 = $_REQUEST['address1'];
  28.         $address2 = $_REQUEST['address2'];
  29.         $address3 = $_REQUEST['address3'];
  30.         $postcode = $_REQUEST['postcode'];
  31.         $message = $_REQUEST['message'];            
  32. /* Display HTML Form */
  33.         echo "<form action='processform.php' method='post'>";
  34.         echo "<h1 class='d'>";
  35.         echo "<table border='0' cellspacing='0' cellpadding='0'>";
  36.         echo "<tr><td align='right'><B>First Name:</td>";
  37.         echo "<td><input type='text' name='firstname' value='$firstname' size='30' maxlength='30'></td>";     
  38.         echo "</tr>";
  39.         echo "<tr><td align='right'><B>Surname:</td>";
  40.         echo "<td><input type='text' name='surname' value='$surname' size='30' maxlength='30'></td>";     
  41.         echo "</tr>";
  42.         echo "<tr><td align='right'><B>Email:</td>";
  43.         echo "<td><input type='text' name='email' value='$email' size='50' maxlength='50'></td>";     
  44.         echo "</tr>";
  45.         echo "<tr><td align='right'><B>Telephone:</td>";
  46.         echo "<td><input type='text' name='phone' value='$phone' size='20' maxlength='20'></td>";     
  47.         echo "</tr>";
  48.         echo "<tr><td align='right'><B>Address:</td>";
  49.         echo "<td><input type='text' name='address1' value='$address1' size='40' maxlength='40'></td>";     
  50.         echo "</tr>";
  51.         echo "<tr><td align='right'></td>";
  52.         echo "<td><input type='text' name='address2' value='$address2' size='40' maxlength='40'></td>";     
  53.         echo "</tr>";
  54.         echo "<tr><td align='right'></td>";
  55.         echo "<td><input type='text' name='address3' value='$address3' size='40' maxlength='40'></td>";     
  56.         echo "</tr>";
  57.         echo "<tr><td align='right'><B>Postcode:</td>";
  58.         echo "<td><input type='text' name='postcode' value='$postcode' size='10' maxlength='10'></td>";     
  59.         echo "</tr>";
  60.         echo "<tr><td align='right'><B>Message:</td>";
  61.         echo "<td><TEXTAREA NAME='message' value='$message' ROWS=10 COLS=30></TEXTAREA></td>";
  62.         echo "</tr>";
  63.         if ($err=="Y")
  64.             {
  65.             echo "<tr>";
  66.             echo "<b><font face=georgia color=red size=3>Please make sure you enter your Name & Email - thank you.";
  67.             echo "</tr>";
  68.             }
  69.         echo "</table>";
  70.         echo "<p><input type='submit' value='Send Message'>";
  71.         echo "</form>";
  72. ?>               
  73. </body>
  74. </html>
  75.  
Aug 9 '07 #5
ak1dnar
1,584 Expert 1GB
The Problem is with your CSS.
<h1> area is working as layer and it has overlap with the form elements.
Try this Coding. I just changed the <h1> Position.

Expand|Select|Wrap|Line Numbers
  1. <?php /* Created on: 03/08/2007 */
  2. /* Receive Variables from HTML Form */        
  3. ?>
  4. <html>
  5. <style type="text/css">                                                
  6. h1.c {position:absolute; left:560px; top:75px; font-family:georgia; text-align: left; color: black; font-size: 12pt}
  7. </style>
  8. </head>
  9. <body bgcolor="lightgoldenrodyellow">
  10.         <TABLE width=100%; align=center; border="2" cellpadding="5">
  11.         <tr>
  12.         <td BGCOLOR='#00ff00'; align=center><b><font face=georgia size=5>Birmingham Self-Catering Business Accommodation</td>
  13.         </tr>
  14.         </table>
  15.     <h1 class="c">
  16.     <TABLE clear=both; float=left; border="1" cellpadding="1">
  17.     <TD><B>2348 Coventry Road, Sheldon, Birmingham,B26 3LS.<p>info@birminghamstay.co.uk<p>
  18.     Phone/fax 0044(0)121 742 1626<br>Phone 0044(0)121 688 1720<br>Mobile 079739312917<p>        
  19. Please <A href='index.html' title='Home'>click here</A> to return to the Home Page.<br></td></table></h1>
  20. <?php    
  21. /* Receive Variables from HTML Form */
  22.         $err = $_REQUEST['err'];
  23.         $firstname = $_REQUEST['firstname'];
  24.         $surname = $_REQUEST['surname'];
  25.         $email = $_REQUEST['email'];
  26.         $phone = $_REQUEST['phone'];
  27.         $address1 = $_REQUEST['address1'];
  28.         $address2 = $_REQUEST['address2'];
  29.         $address3 = $_REQUEST['address3'];
  30.         $postcode = $_REQUEST['postcode'];
  31.         $message = $_REQUEST['message'];            
  32. /* Display HTML Form */
  33.         echo "<form action='processform.php' method='post'>";
  34.         //echo "<h1 class='d'>";
  35.         echo "<table border='0' cellspacing='0' cellpadding='0'>";
  36.         echo "<tr><td align='right'><B>First Name:</td>";
  37.         echo "<td><input type='text' name='firstname' value='$firstname' size='30' maxlength='30'></td>";    
  38.         echo "</tr>";
  39.         echo "<tr><td align='right'><B>Surname:</td>";
  40.         echo "<td><input type='text' name='surname' value='$surname' size='30' maxlength='30'></td>";    
  41.         echo "</tr>";
  42.         echo "<tr><td align='right'><B>Email:</td>";
  43.         echo "<td><input type='text' name='email' value='$email' size='50' maxlength='50'></td>";    
  44.         echo "</tr>";
  45.         echo "<tr><td align='right'><B>Telephone:</td>";
  46.         echo "<td><input type='text' name='phone' value='$phone' size='20' maxlength='20'></td>";    
  47.         echo "</tr>";
  48.         echo "<tr><td align='right'><B>Address:</td>";
  49.         echo "<td><input type='text' name='address1' value='$address1' size='40' maxlength='40'></td>";    
  50.         echo "</tr>";
  51.         echo "<tr><td align='right'></td>";
  52.         echo "<td><input type='text' name='address2' value='$address2' size='40' maxlength='40'></td>";    
  53.         echo "</tr>";
  54.         echo "<tr><td align='right'></td>";
  55.         echo "<td><input type='text' name='address3' value='$address3' size='40' maxlength='40'></td>";    
  56.         echo "</tr>";
  57.         echo "<tr><td align='right'><B>Postcode:</td>";
  58.         echo "<td><input type='text' name='postcode' value='$postcode' size='10' maxlength='10'></td>";    
  59.         echo "</tr>";
  60.         echo "<tr><td align='right'><B>Message:</td>";
  61.         echo "<td><TEXTAREA NAME='message' value='$message' ROWS=10 COLS=30></TEXTAREA></td>";
  62.         echo "</tr>";
  63.         if ($err=="Y")
  64.             {
  65.             echo "<tr>";
  66.             echo "<b><font face=georgia color=red size=3>Please make sure you enter your Name & Email - thank you.";
  67.             echo "</tr>";
  68.             }
  69.         echo "</table>";
  70.         echo "<p><input type='submit' value='Send Message'>";
  71.         echo "</form>";
  72. ?>             
  73. </body>
  74. </html>
  75.  
  76.  
Aug 9 '07 #6
PaulT
7
Thanks for that!

When I run the revised code, my table containing the form is now on the left-hand-side, overlapping the table which is on the left. How do I get to position the form table on the right-hand side without using the <h1>, or is there something else I need to do?

Thanks in advance!

Paul
Aug 9 '07 #7
PaulT
7
Ok, i've stripped the PHP out and reduced the HTML to the bare minimum to test it.

Here's the code:

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. <form action="processform.php" method="post">
  4. <input type="text" name="firstname" size="30" maxlength="30">
  5. </form>
  6. </body>
  7. </html> 
  8.  
In Firefox this produces a single field that accepts characters entered into it. In IE5 it produces a single field that is input-inhibited - nothing can be typed into it.

Could any of you kind soles run this code in both Firefox and IE5 and see if i'm going mad?

I'm at a loss!

Cheers
Paul
Aug 9 '07 #8
Atli
5,058 Expert 4TB
Ok, i've stripped the PHP out and reduced the HTML to the bare minimum to test it.

Here's the code:

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. <form action="processform.php" method="post">
  4. <input type="text" name="firstname" size="30" maxlength="30">
  5. </form>
  6. </body>
  7. </html> 
  8.  
In Firefox this produces a single field that accepts characters entered into it. In IE5 it produces a single field that is input-inhibited - nothing can be typed into it.

Could any of you kind soles run this code in both Firefox and IE5 and see if i'm going mad?

I'm at a loss!

Cheers
Paul
Sorry, dont have IE5 :(

But try closing the <input> tag, like so:
Expand|Select|Wrap|Line Numbers
  1. <input type='text' value='...' />
  2. <!-- or -->
  3. <input type='text' value='...'></input>
  4.  
You may also want to remove the size and maxlength properties and see what happens.
Aug 9 '07 #9
PaulT
7
Thanks Atli, though it still does the same thing.

The code now looks like:

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. <form action="processform.php" method="post">
  4. <input type="text" name="firstname"></input>
  5. </form>
  6. </body>
  7. </html> 
  8.  
Could someone try it in IE6 and see what it does?

Cheers
Paul
Aug 9 '07 #10
drhowarddrfine
7,435 Expert 4TB
Personally, I see no reason to support IE5. Unless you have a specific reason for it.
Aug 9 '07 #11
PaulT
7
Hi drhowarddrfine,

Thanks for your note. I don;t particularly want to support IE5, I just want it to be available on the majority of browser versions. I personally don't have IE6 or IE7 installed - could you (or anyone else for that matter) just take a minute to see if it works with these browsers?

Thanks!

Paul
Aug 9 '07 #12
Atli
5,058 Expert 4TB
Hi drhowarddrfine,

Thanks for your note. I don;t particularly want to support IE5, I just want it to be available on the majority of browser versions. I personally don't have IE6 or IE7 installed - could you (or anyone else for that matter) just take a minute to see if it works with these browsers?

Thanks!

Paul
It works like it should on IE7.
Aug 9 '07 #13
PaulT
7
Thanks Atli, that's what I need to know!

Many thanks for everyone's help on this.

Regards
Paul
Aug 9 '07 #14
ak1dnar
1,584 Expert 1GB
hi Paul,
If you think you didn't get the answer yet just let us know. then we will be able to move this to HTML/CSS forum.
Thanks and regards,
-ajaxrand
Aug 10 '07 #15
munnaj
6
Thanks Atli, though it still does the same thing.

The code now looks like:

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. <form action="processform.php" method="post">
  4. <input type="text" name="firstname"></input>
  5. </form>
  6. </body>
  7. </html> 
  8.  
Could someone try it in IE6 and see what it does?

Cheers
Paul
=================


Its working fine in firefox and IE6
Aug 10 '07 #16
drhowarddrfine
7,435 Expert 4TB
I don;t particularly want to support IE5, I just want it to be available on the majority of browser versions.
Just to expand on this. IE5 is just a different animal, like NN4, compared to all other browsers. It requires more hacks to work in the modern world. I never bother to look at it anymore and don't know anyone who does. I don't think the two guys who still use IE5 care either :)
Aug 10 '07 #17

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

Similar topics

6
by: Miranda | last post by:
Hello, My employer is having a PHP application built (I'm in the process of studying PHP, and am an intermediate ASP programmer). Problem is, I've tested this application on the newest versions...
10
by: Don | last post by:
I want the server-side php script to return a browser page that is essentially a copy of the original client page that contained the <form> which referenced the php script in the first place....
11
by: James | last post by:
I wasn't sure where to post this so I'm sorry if this is the wrong place. But I would like to know what some of the differences are between client-side and server-side browser sniffing. I'm aware...
2
by: Doug Lind | last post by:
Hi all, I have seen a number of posts re: the BinaryFormatter version incompatibility but nothing on how to recover from it. In my case, I want the exception to trigger an alternate behaviour...
4
by: jwlum | last post by:
I have the following problem under Internet Explorer only: 1. User fills out form data (myform.php) and clicks a button that fires myFunction() 2. myFunction() spawns a "hello, world" popup page...
3
by: =?Utf-8?B?V2hpc2tleVJvbWVv?= | last post by:
I create web applications in VS 2003 and the .Net 1.1 framework (we haven't moved the application forward to .Net 2.0 yet). The application looks great In IE 5.x and greater. But even a simple...
7
kvijayhari
by: kvijayhari | last post by:
hi i'm having a form in which a text field has a js function which lists the name of the customer by searching the letters typed in the field.. (like the one on gmail mail to column) The js...
8
by: Christine Forber | last post by:
I have created a form that incorporates AJAX to provide suggestions from the database contents for the given field. The problem is that many browsers do their own "suggestions" based on previous...
2
by: ramanagosu | last post by:
HI everybody I am writing java script code it's working fine in IE browser and not working fine in Mozilla code: <SCRIPT LANGUAGE="JavaScript"> function verify() { var themessage =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...

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.