guyfromfl Posted October 3, 2008 Share Posted October 3, 2008 It has 2 forms, and is PHP driven, but it only works in Firefox, not IE. http://bli.servehttp.com/test/body.php Quote Link to comment https://forums.phpfreaks.com/topic/126889-why-does-this-work-in-firefox-and-not-ie/ Share on other sites More sharing options...
PFMaBiSmAd Posted October 3, 2008 Share Posted October 3, 2008 Because the HTML is invalid. You have one opening <form> tag and two closing </form> tags. There is no second form because after the first </form> tag the HTML is invalid. FF ignores the error but IE does not. Quote Link to comment https://forums.phpfreaks.com/topic/126889-why-does-this-work-in-firefox-and-not-ie/#findComment-656306 Share on other sites More sharing options...
guyfromfl Posted October 3, 2008 Author Share Posted October 3, 2008 it checks out in w3's validator... how could you do the same thing in legit code? its for an online store, and we are trying to add a google search to our site? Thanks mark Quote Link to comment https://forums.phpfreaks.com/topic/126889-why-does-this-work-in-firefox-and-not-ie/#findComment-656310 Share on other sites More sharing options...
PFMaBiSmAd Posted October 3, 2008 Share Posted October 3, 2008 It does not check out in w3.org's validator - http://validator.w3.org/check?uri=http%3A%2F%2Fbli.servehttp.com%2Ftest%2Fbody.php&charset=%28detect+automatically%29&doctype=Inline&group=0 how could you do the same thing in legit code?Before you can use php to output HTML, you need to learn HTML. Quote Link to comment https://forums.phpfreaks.com/topic/126889-why-does-this-work-in-firefox-and-not-ie/#findComment-656313 Share on other sites More sharing options...
guyfromfl Posted October 3, 2008 Author Share Posted October 3, 2008 It does check out. You must have tried it while i was editing it. http://bli.servehttp.com/test/body.php Quote Link to comment https://forums.phpfreaks.com/topic/126889-why-does-this-work-in-firefox-and-not-ie/#findComment-656320 Share on other sites More sharing options...
PFMaBiSmAd Posted October 3, 2008 Share Posted October 3, 2008 If you are actively changing code on a page, don't post links to it and expect someone to try and solve a moving target problem. At the time of my two posts, the statements and errors were correct. Now you have nested forms. That might validate as valid XHTML, it is not valid HTML and won't work in browsers. Quote Link to comment https://forums.phpfreaks.com/topic/126889-why-does-this-work-in-firefox-and-not-ie/#findComment-656327 Share on other sites More sharing options...
guyfromfl Posted October 3, 2008 Author Share Posted October 3, 2008 So there is no way around this? Quote Link to comment https://forums.phpfreaks.com/topic/126889-why-does-this-work-in-firefox-and-not-ie/#findComment-656332 Share on other sites More sharing options...
PFMaBiSmAd Posted October 3, 2008 Share Posted October 3, 2008 Now you have nested forms. So there is no way around this? Output valid HTML. Nested forms are not valid. Each form must start with its' own opening <form> tag and end with its' own closing </form> tag. If you want two forms, start and end the first one, then start and end the second one. Quote Link to comment https://forums.phpfreaks.com/topic/126889-why-does-this-work-in-firefox-and-not-ie/#findComment-656335 Share on other sites More sharing options...
guyfromfl Posted October 3, 2008 Author Share Posted October 3, 2008 Yea sorry, im posting in 2 forums right now, forgot to tell you guys this: we are trying to add a google search to our website, but the code is computer generated code and the opening form is directly after the opening body and closes the same way. according to the boss you have to use a CMS to add code. sorry Im working on this and doing 3 other jobs at the same time.. http://www.factorydirecttrains.com is the page. so you can see the actual code (no google search tho) Quote Link to comment https://forums.phpfreaks.com/topic/126889-why-does-this-work-in-firefox-and-not-ie/#findComment-656341 Share on other sites More sharing options...
dropfaith Posted October 4, 2008 Share Posted October 4, 2008 your boss is horribly incorrect you dont have to use a cms to add code in fact ive never used a cms to add code i used those to update content your code shows that your entire page is a single form. WHY? http://validator.w3.org/check?uri=http%3A%2F%2Ffactorydirecttrains.com%2F&charset=(detect+automatically)&doctype=Inline&group=0 has over 100 errors what do you expect from a site coded with so many errors but i think to fix your actual issue you need to just stop nesting forms Quote Link to comment https://forums.phpfreaks.com/topic/126889-why-does-this-work-in-firefox-and-not-ie/#findComment-657031 Share on other sites More sharing options...
haku Posted October 6, 2008 Share Posted October 6, 2008 I think you misunderstood him (his English was a little unclear). I think that he doesn't need a CMS to be able to update the code, rather the system he is on is using a CMS, and if he wants to add code, it has to be done through that CMS> Quote Link to comment https://forums.phpfreaks.com/topic/126889-why-does-this-work-in-firefox-and-not-ie/#findComment-657969 Share on other sites More sharing options...
guyfromfl Posted October 7, 2008 Author Share Posted October 7, 2008 let me try a different way of putting it... The website is built off networksolution's template. Their template opens a body then a form immediately after. Then, there are certain dynamic objects you can alter. My form for google search has to go between the body and form tags. (we want it in the header on the right). once the server has generated the automatic body tag and the automatic opening form, it is too late to add a form that is not nested. (which would end up in the dynamic objects part thus, invalid HTML). my boss doesn't want to ask netsol to change their code and javascript doesn't work well with -1 when referring to adding a new form.. unless I am doing something wrong. ps as far as i know the closing body and form tags perform the same way. Thanks. mark Quote Link to comment https://forums.phpfreaks.com/topic/126889-why-does-this-work-in-firefox-and-not-ie/#findComment-658723 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.