Jump to content

Recommended Posts

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.

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.

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.

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.

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)

 

 

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

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.