Go to Anchor after Form Submit not working IE

This is to tell you, Paul, that I have resolved my problem and to thank you for:

1.The time you spent helping me
2.The way you pushed me to trouble-shoot systematically - I learned something important from that.
3.The tip you gave me about the ie problem with sizzle.js. It wasn’t part of this problem but I found that it stopped IE8 rendering cufón - IE7 was fine.

I didn’t in fact pinpoint the IE return to anchor from form problem but I found IE performed better when I put the right-float right column ahead of the left-float left column in the markup, and moved the php processing code before the doc declaration.

BUT that didn’t fully resolve the issue. So, I have put a goToAnchor script in the head, a $fmposting variable at the end of my php processing code, and a php conditional onload statement in the body tag. That now works very nicely, and if javascript is disabled, the return to anchor still works very well in the other browsers and at least not as badly in IE.

Here’s the stuff, in case it’s useful to anyone else, and in case you might see a way of improving it!

Script in Head:
<script type=“text/javascript”>
function goToAnchor() {
window.location.hash=“#contactfm”;
}
</script>

Conditional code in Body Tag:
<body id=“top” <?php if ($fmposted==true) {echo ‘onload=“goToAnchor()”;’;} ?> >

And, of course, $fmposted is set right to true at the end of my php posting code above the doc declaration, regardless of whether the message was sent or there was an error.

With best wishes,

Peter

Well, I’m glad you got it sorted by the time I got a chance to look at the attached file. The only thing I could see that might be doing it is

<a name="bookfm"></a>
<h2 id="bookfm">Booking Form</h2>

where one browser might go to the anchor and another might go to the heading. But that shouldn’t make that much of a noticeable difference.

Thanks! Yes, actually the “<a name” tag shouldn’t have been in there in the file I put up - I forgot to take it out. It was something I did at someone’s suggestion and then removed when I found (of course) that it didn’t help. My file only had the id in the h2 tag - which should have worked, and did work in all the browsers I tested except IE 7 and IE 8.

Incidentally, I have been finding that IE 8 isn’t as standards-compliant as I thought it would be and still has some formatting quirks - such that I have had to provide a conditional IE 8 css file!

Many thanks for your interest