Link to home
Start Free TrialLog in
Avatar of gabbs1
gabbs1

asked on

Select div not working in safari for Mac.


I have the following:

<select name="country" onChange="javascript:if(this.options[this.selectedIndex].value != 'United Kingdom'){ document.all.warning7.style.display = 'block';}else{document.all.warning7.style.display = 'none';}">
                                          <option>Please select</option>
                          <option value="United Kingdom">United Kingdom</option>
...
</select>

<div id="warning7" style=" display:none;">
my text.
</div>

Which works fine in IE and Firefox etc.. but in Safari for Mac the div tag doesn't apear.
Avatar of hongjun
hongjun
Flag of Singapore image

try

<select name="country" onChange="javascript:if(this.options[this.selectedIndex].value != 'United Kingdom'){ document.all.warning7.style.display = '';}else{document.all.warning7.style.display = 'none';}">
ASKER CERTIFIED SOLUTION
Avatar of smaccari
smaccari

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
smaccari is correct. I miss it