views:

31

answers:

2

This is a kind of difficult one to explain but basically I have a page which has some property info on and it is database driven.

In firefox however it loads the page and then re-directs to a white page with some weird chinese writing on it or it's saying 1.17

http://www.hpb.co.uk/tenancy/location/PR2CT/default.aspx

That's the link of my page not sure if anyone knows whats wrong with as it works in all other browser.

I'm using firefox 3.6.1

Any ideas?

Thanks

Jamie

+2  A: 

You are calling document.write, which rewrites the entire page contents. Remove the call to document.write and it will work. (There is a 302 redirect, but that is unrelated to why you see a white page. You also have a syntax error)

mikerobi
+2  A: 

The syntax error that mikerobi mentioned is at line 732 of default.aspx:

$(document).ready(function(){

    if($('#ctl00_lblNoResults').text() == ' Sorry there is no availability.'){
    $('.otherprop').text('Accommodation at this location')
    $('.topbook').hide();
    $('.sidelink').hide();
    }) // <---- remove this
    }
    else {
    $('.otherprop').text('Accommodation at this location')
    $('.accomavail').text('Accommodation at this location');
    $('.otherprop').hide();
    $('.topbook').show();
    $('.sidelink').show();
    }
    })

This error is easier to see with better indentation:

$(document).ready(function() {

    if ($('#ctl00_lblNoResults').text() == ' Sorry there is no availability.') {
        $('.otherprop').text('Accommodation at this location')
        $('.topbook').hide();
        $('.sidelink').hide();
    }) // <---- see, it makes no sense!
}
else {
    $('.otherprop').text('Accommodation at this location')
    $('.accomavail').text('Accommodation at this location');
    $('.otherprop').hide();
    $('.topbook').show();
    $('.sidelink').show();
}
})​

You're also missing a semicolon at the end.

Matt Ball
Sorted the syntax error on my local file thanks
Jamie Taylor
@Jamie: no problem. This kind of stuff is easy to see if you use Firefox's Error Console, or use Firebug's console (hit the "persist" button so that page refreshes don't clear the error).
Matt Ball