Getting buttons to work on Firefox
April 28, 2009 5:55 AM   RSS feed for this thread Subscribe

Javascript (and other protocols) do not always work on Firefox/Mac.

I am running a Mac with Firefox 3.0.10. All too often I find that clicking on buttons on certain sites, where the button uses Javascript (but also asf and php), nothing happens. Usually I find a work-around but I am curious as to why it doesn't work. Here is a case in point - http://www.cityinn.com/london/reservations.htm. Clicking on the Check Availability button (after filling in the details) does nothing. Things I have tried:

1) Using other browsers (Safari, Camino). Sometimes this helps but not here.
2) Disabling and even uninstalling all my add-ons. Rarely helps.

So, is this some Mac setting, some dumb thing I am or I am not doing or just lousy design by various websites?
posted by TheRaven to computers & internet (4 comments total)
Works for me using Firefox 3.0.9 on a Mac.
posted by odinsdream at 6:00 AM on April 28


Down't work for me, either, though I'm running a much older version of FF/Mac.
FWIW, I see this sort of behavior from time-to-time on other sites, too. They all seem to involve form or data submission, like the above example, or when filling-out online job applications or ordering goods.

And, like you, using alternative browsers is hit-or-miss.
posted by Thorzdad at 6:23 AM on April 28


OS-X/Safari 3.2.1: worked
OS-X/FF3.5b4: No response to the button
XP/FF3.0.9.: No response to the button
XP/IE7: Failed to populate the city drop-down and the button complained it wasn't filled in.

My money is on non-universal javascript. It wasn't that long ago that that IE-only sites were common. That we've been able to (mostly) forget that just points out how far things have come since then.
posted by TruncatedTiller at 6:59 AM on April 28


Here's the relevant section of JavaScript used when the button gets clicked:
function checkSubmit()
{
    var ok = true;
    var arrive = document.getElementById("startDate");
    var end = document.getElementById("endDate");
    var hotel = document.getElementById("propertyCode");
    if(arrive.value=="") ok = false;
    if(end.value=="") ok = false;
    if(hotel.value=="") ok = false;

    if(ok)
    {
        daysBetweenDates();
        assignFeel();
        document.form1.onsubmit();
        document.form1.submit();
    }
    else
    {
        alert("Please fill in all the details in the form");
    }
}

function assignFeel()
{
    cities=new Array("LONCI", "BHXCI", "BRSCI", "GLACI","MANCI");
    looks =new Array(4189, 4201, 4202, 4203, 4204);
    var hotel = document.getElementById("propertyCode");
    var lookandfeel = document.getElementById("lookAndFeelId");
    
    for(var i=0; i<>
    {
		if(cities[i]==hotel.value)
		{
		    lookandfeel.value = looks[i];
		}
	}		
}
I don't see anything browser-specific. In fact it looks pretty ordinary to me. IANAJSE.
posted by odinsdream at 8:54 AM on April 28


« Older Can anyone think of an example...   |   I'd like my daughter to grow u... Newer »

You are not logged in, either login or create an account to post comments