The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> encType, IE adding a encType to form method post
JGreene
post Jun 4 2018, 12:52 PM
Post #1





Group: Members
Posts: 4
Joined: 4-June 18
Member No.: 26,653



Fairly new to all of this and this problem has got me baffled. I have a test and a production system that are not acting the same. I have a web page that is using a simple send_mail.php program. I have the normal three boxes for entering text. NAME, Email address, Comments. And I have coded placeholder with those labels so they show in the boxes. With my test system these labels show up and the php works and I get my email.

With my production system, these labels don’t show up in Internet Explore. In Chrome and Firefox the do.
In IE when I go to the Developer Tools. I see a encType added to my form code. This is in the production system. It doesn’t show up in the test system.

Here is that code from my production system

<form action=”send_mail.php” encType=”application/x-www-form-urlencoded” method=”post”>

I guess I don’t understand where the encType came from and why it shows only in the production system with IE.
I first thought it was my http.conf file but I believe test and production are the same.
I thought it was the mime file but I believe these are the same.
The php.ini is the same and the html and css is the same along with the PHP program.
I would be grateful for any insight to this.


User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
JGreene
post Jun 4 2018, 02:16 PM
Post #2





Group: Members
Posts: 4
Joined: 4-June 18
Member No.: 26,653




So I’ve been playing around a bit. In IE I pulled up both pages, one for test and one for prod. I went into the Developer Tools on both. Under the DOM Explore on the right hand side is a pull down menu with the browser options. Edge, 10 – 5, minus 6. On the prod side the default is 7 and on the test the default is Edge. If I change the numbers (not the default) both work with Edge and 10 and not work with 9 and below. So if I think everything is the same for prod and test why is the default different and how to fix it?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jun 4 2018, 02:25 PM
Post #3


.
********

Group: WDG Moderators
Posts: 7,837
Joined: 10-August 06
Member No.: 7



QUOTE(JGreene @ Jun 4 2018, 07:52 PM) *

I have coded placeholder with those labels so they show in the boxes. With my test system these labels show up and the php works and I get my email.

With my production system, these labels don’t show up in Internet Explore. In Chrome and Firefox the do.

With labels, do you mean the LABEL element? Please post sample code showing the HTML form.

QUOTE
In IE when I go to the Developer Tools. I see a encType added to my form code. This is in the production system. It doesn’t show up in the test system.

IE browsers include every HTML attribute and javascript property (with default values) that they support in their internal rendering engine. This can be seen with e.g. the javascript innerHTML property, but I don't know if the IE developer tools show it too. But then you should see it on your test system as well, and also all the other properties. unsure.gif

QUOTE
Here is that code from my production system

<form action=”send_mail.php” encType=”application/x-www-form-urlencoded” method=”post”>

You should never use fancy/curly quotes in HTML (or text editors that use them), only use the normal ones:

CODE
<form action="send_mail.php" encType="application/x-www-form-urlencoded" method="post">


QUOTE
I guess I don’t understand where the encType came from and why it shows only in the production system with IE.

Do they should up if you use traditional View Source on the production page, and view it in a text editor instead of the developer tools? Are you using any javascript with the form? I can't see how PHP could add it.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
JGreene
post Jun 4 2018, 02:30 PM
Post #4





Group: Members
Posts: 4
Joined: 4-June 18
Member No.: 26,653



Maybe I’m answering my own question here. That’s a good thing.
So for the production systems I use a dsn but for test I use ip to navigate to with the browser. For production I had the site url in compatibility mode. Took it out and now my page works as I want it to.
I’m not experienced enough to know what to do if users to the site have IE and have this site’s url in their Compatibility View Settings.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jun 4 2018, 02:39 PM
Post #5


.
********

Group: WDG Moderators
Posts: 7,837
Joined: 10-August 06
Member No.: 7



QUOTE(JGreene @ Jun 4 2018, 09:16 PM) *

On the prod side the default is 7 and on the test the default is Edge.

Could it be that the production site server sends a X-UA-Compatibility directive to force IE7 rendering? This can be done both with META tags and a HTTP header, see https://msdn.microsoft.com/en-us/library/ff...5(v=vs.85).aspx

EDIT: Posted the above before I saw you last reply...

QUOTE
For production I had the site url in compatibility mode.

Never heard of doing that through the URL, but it should indeed explain it.

QUOTE
I’m not experienced enough to know what to do if users to the site have IE and have this site’s url in their Compatibility View Settings.

That sounds like a power user intentionally manipulating the site, then it's their own responsability. cool.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
JGreene
post Jun 4 2018, 03:20 PM
Post #6





Group: Members
Posts: 4
Joined: 4-June 18
Member No.: 26,653



[quote name='Christian J' date='Jun 4 2018, 12:39 PM' post='135861']
[quote name='JGreene' post='135858' date='Jun 4 2018, 09:16 PM']
On the prod side the default is 7 and on the test the default is Edge.
[/quote]
Could it be that the production site server sends a X-UA-Compatibility directive to force IE7 rendering? This can be done both with META tags and a HTTP header, see https://msdn.microsoft.com/en-us/library/ff...5(v=vs.85).aspx


Glad you did post this because I added a meta tag for IE=EDGE to the html, put the url in the Compatibility list and my page works like a charm along with the underneath php.

Thank you so much.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd June 2018 - 01:12 AM