Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Either jScript, PHP or CSS 1

Status
Not open for further replies.

lagc

Programmer
Jan 21, 2009
79
GB
I am workin gon a website that is having trouble with Mozilla, ok in IE and I'm struggling to identify the problem.

So to help me get to the root quicker, can somebody tell me if there is an issue where something works in IE and not in Mozilla, can it be a PHP or JScript issue, or in these cases is it always CSS.

Cheers
 
Hi

Yes, there are differences in interpreting JavaScript and CSS between standard compliant browsers and Explorer.

PHP has nothing to do with this.

Could you show as the mentioned page ? An URL would be the best.

Feherke.
 
Ye sure,


Whats happening is that in Mozilla when you choose your country the region drop down should populate automatically with the regions.

In IE this is fine, no probs, but in Mozilla it doesnt show the regions but the values are there, so you can select them but the region word doesnt come through.

I have validated the page, and all seems to be ok, but for a few little issues, so thats why I posted to narrow it down.

Cheers
 
Hi

Code:
function fillregion(countryid)
{
  var i=0;   [red]// unconditionally set[/red]
  document.search.selectRegion.options.length=0;
  if(countryid==0 || i==0 ){   [red]// always true[/red]
    document.search.selectRegion.options[0] = new Option()
    document.search.selectRegion.options[0].value=0;
[gray]//    [s]document.search.selectRegion.options[0].innerText="anywhere";[/s][/gray]
    document.search.selectRegion.options[0].text="anywhere";
    i++;   [red]// unconditionally set[/red]
  }
  if(countryid!=0 && i!=0 ){   [red]// always true[/red]
    for(j=0;j<=countryregion.length;j++)
    {			
      if(countryregion[j]==countryid)
      {
        document.search.selectRegion.options[i] = new Option()
        document.search.selectRegion.options[i].value=j;
[gray]//        [s]document.search.selectRegion.options[i].innerText=region[j];[/s][/gray]
        document.search.selectRegion.options[i].text=region[j];
        i++;
      }
    }
  }
  swap();
}

Feherke.
 
Oh fair play Feherke,

Thanks very much.

I love this forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top