PDA

View Full Version : HTML headache


Stationery-Direct
20th January 2006, 14:10
Hi guys

Hope somebody can help as I have a problem that I cannot get my head around.

Visit ukaccommodationsearch.co.uk and scroll down to Airport Accommdoation, pick an airport and click, the corresponding page opens.

Now visit ukaccommodationpages.co.uk and do the same, the links will not work even though the code is an exact replica (cut & paste) of the working version.

Any ideas what the problem is, I know the rest of the code probably isnt perfect but I aint no web designer.

Thanks for any help.

Damon

autolycus
20th January 2006, 14:16
Only had a very quick look, but I suspect it is because, on the page that fails, the MM_jumpMenu function is not defined anywhere.

You need to add the following into the header section of the page, just like you have got on the working site:

function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}

That may not be all that is req'd to fix it, but it is certainly a step in the right direction.

Dave.

Coding Monkey
20th January 2006, 14:17
It's cos that HTML involves JavaScript.

The below, to be precise. It's a very tacky way of doing it.

function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}

Change the "onchange=mm_Jump" to this instead:

onchange="document.location.href=this.options[this.selectedIndex].value;"

Hope that helps

Stationery-Direct
20th January 2006, 14:31
Thanks guys, got it working now, dunno how I missed that, I use dreaweaver and for some reason it didn't add that bit in the header.

Anyways its working now, thanks again and have a great weekend.

Damon