Hello,
I have the following template that basically does the following:
User select Country, then a sub-list is generated with Regions and
then this returns the Counties
###############
Region
(Country)
(Region)
(County)
###############
I also have this simple javascript:
###############
function select_country(value) {
/* Hide */
var groups = document.getElementsByTagName('optgroup');
var group;
for (var i=0; i
group = groups[i];
group.style.display = 'none';
group.disabled = true;
}
/* Show */
var element = document.getElementById(value);
element.style.display = 'inherit';
element.disabled = false;
}
function select_region(value) {
/* Hide */
var groups = document.getElementsByTagName('optgroup');
var group;
for (var i=0; i
group = groups[i];
if (group.id.substr(0, 7) == "region_") {
group.style.display = 'none';
group.disabled = true;
}
}
/* Show */
var element = document.getElementById(value);
element.style.display = 'inherit';
element.disabled = false;
}
###############
Now everything works great on Firefox, not yet tested on IE, but I am
suppriesed that it does not work on Safari.
Searching on Google does reviel that Safari has a BUG with the
display:none
Anyone with a solution on how to best fix this problem.
Many thanks
Norman
Re: Safari display:none in a list
am 09.06.2007 23:35:33 von dorayme
In article
<1181414405.309919.197500@g4g2000hsf.googlegroups.com>,
khinester wrote:
> Hello,
> I have the following template that basically does the following:
>
> User select Country, then a sub-list is generated with Regions and
> then this returns the Counties
.....
>
> Now everything works great on Firefox, not yet tested on IE, but I am
> suppriesed that it does not work on Safari.
Supply a URL so we can see.
--
dorayme
Re: Safari display:none in a list
am 10.06.2007 10:14:07 von khinester
dorayme wrote:
> In article
> <1181414405.309919.197500@g4g2000hsf.googlegroups.com>,
> khinester wrote:
>
> > Hello,
> > I have the following template that basically does the following:
> >
> > User select Country, then a sub-list is generated with Regions and
> > then this returns the Counties
> ....
> >
> > Now everything works great on Firefox, not yet tested on IE, but I am
> > suppriesed that it does not work on Safari.
>
> Supply a URL so we can see.
>
> --
> dorayme
If you select United Kingdom for example, on FF only lists the regions
for the UK, but on Safari it lists all the regions for all the
Countries that have regions. currently only France, UK and USA.
Cheers
Norman
Re: Safari display:none in a list
am 10.06.2007 10:37:10 von dorayme
In article
<1181463247.757589.140520@h2g2000hsg.googlegroups.com>,
Norman wrote:
> dorayme wrote:
> > In article
> > <1181414405.309919.197500@g4g2000hsf.googlegroups.com>,
> > khinester wrote:
> >
> > > Hello,
> > > I have the following template that basically does the following:
> > >
> > > User select Country, then a sub-list is generated with Regions and
> > > then this returns the Counties
> > ....
> > >
> > > Now everything works great on Firefox, not yet tested on IE, but I am
> > > suppriesed that it does not work on Safari.
> >
> > Supply a URL so we can see.
> >
> > --
> > dorayme
>
> Hi here is the form
>
> http://uktravellist.info/information/data/address.html
>
> If you select United Kingdom for example, on FF only lists the regions
> for the UK, but on Safari it lists all the regions for all the
> Countries that have regions. currently only France, UK and USA.
>
Right. Well, the first thing to realise is that Safari has,
usefully in a way, poor error correction. iCab is stupidly happy
in its "face" (never mind this if you are not a Mac person) but
equally not doing what you would want.
And, looking closer at FF, it also plays up on repeated attempts.
I suggest you fix up the 556 failed validation errors that are on
that page. Fix up as many as you can and come back.
The css sheet cannot be found and that is a bit of a puzzle in
itself. You have a base url in your html, is it right?
--
dorayme
Re: Safari display:none in a list
am 10.06.2007 16:45:13 von khinester
On 10 juin, 10:37, dorayme wrote:
> In article
> <1181463247.757589.140...@h2g2000hsg.googlegroups.com>,
>
>
>
> Norman wrote:
> > dorayme wrote:
> > > In article
> > > <1181414405.309919.197...@g4g2000hsf.googlegroups.com>,
> > > khinester wrote:
>
> > > > Hello,
> > > > I have the following template that basically does the following:
>
> > > > User select Country, then a sub-list is generated with Regions and
> > > > then this returns the Counties
> > > ....
>
> > > > Now everything works great on Firefox, not yet tested on IE, but I am
> > > > suppriesed that it does not work on Safari.
>
> > > Supply a URL so we can see.
>
> > > --
> > > dorayme
>
> > Hi here is the form
>
> >http://uktravellist.info/information/data/address.html
>
> > If you select United Kingdom for example, on FF only lists the regions
> > for the UK, but on Safari it lists all the regions for all the
> > Countries that have regions. currently only France, UK and USA.
>
> Right. Well, the first thing to realise is that Safari has,
> usefully in a way, poor error correction. iCab is stupidly happy
> in its "face" (never mind this if you are not a Mac person) but
> equally not doing what you would want.
>
> And, looking closer at FF, it also plays up on repeated attempts.
>
> I suggest you fix up the 556 failed validation errors that are on
> that page. Fix up as many as you can and come back.
>
> The css sheet cannot be found and that is a bit of a puzzle in
> itself. You have a base url in your html, is it right?
>
> --
> dorayme
Hi dorayme,
The problem is that the actual code for this is on my local machine, I
just am using this web space to show the form and how it handles with
with different browsers.
Anyhow, I have uploaded the css as well.
Cheers
Norman
Re: Safari display:none in a list
am 11.06.2007 01:12:35 von dorayme
In article
<1181486713.568996.38910@n4g2000hsb.googlegroups.com>,
Norman wrote:
> On 10 juin, 10:37, dorayme wrote:
> > In article
> > <1181463247.757589.140...@h2g2000hsg.googlegroups.com>,
> >
> >
> >
> > Norman wrote:
> > > dorayme wrote:
> > >http://uktravellist.info/information/data/address.html
> >
> > > If you select United Kingdom for example, on FF only lists the regions
> > > for the UK, but on Safari it lists all the regions for all the
> > > Countries that have regions. currently only France, UK and USA.
> >
> > Right. Well, the first thing to realise is that Safari has,
> > usefully in a way, poor error correction. iCab is stupidly happy
> > in its "face" (never mind this if you are not a Mac person) but
> > equally not doing what you would want.
> >
> > And, looking closer at FF, it also plays up on repeated attempts.
> >
> > I suggest you fix up the 556 failed validation errors that are on
> > that page. Fix up as many as you can and come back.
> >
> > The css sheet cannot be found and that is a bit of a puzzle in
> > itself. You have a base url in your html, is it right?
> >
> > --
> > dorayme
>
> Hi dorayme,
> The problem is that the actual code for this is on my local machine, I
> just am using this web space to show the form and how it handles with
> with different browsers.
>
> Anyhow, I have uploaded the css as well.
>
But the errors are still there, there are 553 today. Anyway, I
will mention that in my FF (latest) when picking UK, it lists
regions of France. But then so does Turkmenistan and others.
Basically, it does not work, nothing particularly to do with
Safari. Follow the suggestion to fix up all errors.
Actually it is not clear what the whole context is? If it is
going to give you a big headache maybe do it simpler. Have at
least the regions and counties text boxes filled in by the user,
and perhaps use more general names for the categories. We don't
have counties here in Australia, there are states, cities, towns,
suburbs. Why not leave all at one simple box, "Full postal
address" and be done?
--
dorayme
Re: Safari display:none in a list
am 11.06.2007 13:11:23 von khinester
On Jun 11, 1:12 am, dorayme wrote:
> In article
> <1181486713.568996.38...@n4g2000hsb.googlegroups.com>,
>
>
>
> Norman wrote:
> > On 10 juin, 10:37, dorayme wrote:
> > > In article
> > > <1181463247.757589.140...@h2g2000hsg.googlegroups.com>,
>
> > > Norman wrote:
> > > > dorayme wrote:
> > > >http://uktravellist.info/information/data/address.html
>
> > > > If you select United Kingdom for example, on FF only lists the regions
> > > > for the UK, but on Safari it lists all the regions for all the
> > > > Countries that have regions. currently only France, UK and USA.
>
> > > Right. Well, the first thing to realise is that Safari has,
> > > usefully in a way, poor error correction. iCab is stupidly happy
> > > in its "face" (never mind this if you are not a Mac person) but
> > > equally not doing what you would want.
>
> > > And, looking closer at FF, it also plays up on repeated attempts.
>
> > > I suggest you fix up the 556 failed validation errors that are on
> > > that page. Fix up as many as you can and come back.
>
> > > The css sheet cannot be found and that is a bit of a puzzle in
> > > itself. You have a base url in your html, is it right?
>
> > > --
> > > dorayme
>
> > Hi dorayme,
> > The problem is that the actual code for this is on my local machine, I
> > just am using this web space to show the form and how it handles with
> > with different browsers.
>
> > Anyhow, I have uploaded the css as well.
>
> But the errors are still there, there are 553 today. Anyway, I
> will mention that in my FF (latest) when picking UK, it lists
> regions of France. But then so does Turkmenistan and others.
> Basically, it does not work, nothing particularly to do with
> Safari. Follow the suggestion to fix up all errors.
>
> Actually it is not clear what the whole context is? If it is
> going to give you a big headache maybe do it simpler. Have at
> least the regions and counties text boxes filled in by the user,
> and perhaps use more general names for the categories. We don't
> have counties here in Australia, there are states, cities, towns,
> suburbs. Why not leave all at one simple box, "Full postal
> address" and be done?
>
> --
> dorayme
OK thanks for the suggestions, I will try to fix the errors.
Cheers
Norman
Re: Safari display:none in a list
am 12.06.2007 14:29:18 von RobG
On Jun 10, 4:40 am, khinester wrote:
> Hello,
> I have the following template that basically does the following:
>
> User select Country, then a sub-list is generated with Regions and
> then this returns the Counties
[...HTML with select and optgroup elements ...]
>
> Now everything works great on Firefox, not yet tested on IE, but I am
> suppriesed that it does not work on Safari.
Not for me. In Firefox, select an item in an optgroup, then hide the
optgroup and the selected option is still selected and visible. I
don't think you should try to limit the availability of options by
using the stlye.display attribute.
> Searching on Google does reviel that Safari has a BUG with the
> display:none
Testing shows that Safari doesn't hide optgroups using style.display.
> Anyone with a solution on how to best fix this problem.
Instead of hiding the elements, move them to a hidden option element
or remove them from the DOM completely:
Note that an empty select element will cause an HTML validation error.