473,569 Members | 2,793 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Firefox option indentation

Hi

Can anybody tell me why this doesn't work in Firefox?

sel.options[sel.options.len gth] = new Option("\u0020\ u0020-
\u0020\u0020Opt ion 1", 1);

Basically I'm trying to indent some options but Firefox refuses to
show those spaces!

Thanks for any help.

Jun 27 '07 #1
4 1693
On Jun 27, 11:03 am, nick <wass...@gmail. comwrote:
Hi

Can anybody tell me why this doesn't work in Firefox?

sel.options[sel.options.len gth] = new Option("\u0020\ u0020-
\u0020\u0020Opt ion 1", 1);

Basically I'm trying to indent some options but Firefox refuses to
show those spaces!
Nothing to do with javascript, but anyway... use &nbsp; or an optgroup
element.

<URL: http://www.w3.org/TR/html4/interact/...#edef-OPTGROUP >
--
Rob
Jun 27 '07 #2
On Jun 27, 2:31 pm, RobG <r...@iinet.net .auwrote:
On Jun 27, 11:03 am, nick <wass...@gmail. comwrote:
Hi
Can anybody tell me why this doesn't work in Firefox?
sel.options[sel.options.len gth] = new Option("\u0020\ u0020-
\u0020\u0020Opt ion 1", 1);
Basically I'm trying to indent some options but Firefox refuses to
show those spaces!

Nothing to do with javascript, but anyway... use &nbsp; or an optgroup
element.
&nbsp; doesn't get interpreted at all with dynamic option.text
assignment (I know it works for static html), and optgroup is not
practical for what I intend to do.

Jun 27 '07 #3
nick a écrit :
Can anybody tell me why this doesn't work in Firefox?

sel.options[sel.options.len gth] = new Option("\u0020\ u0020-
\u0020\u0020Opt ion 1", 1);
Give a try to : \u00a0

--
laurent
Jun 27 '07 #4
On Jun 27, 10:01 pm, Laurent vilday <mok...@mokhet. comwrote:
nick a écrit :
Can anybody tell me why this doesn't work in Firefox?
sel.options[sel.options.len gth] = new Option("\u0020\ u0020-
\u0020\u0020Opt ion 1", 1);

Give a try to : \u00a0
You are a f**king genius!! Thanks heaps man!

Jun 27 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
8413
by: McKirahan | last post by:
Firefox does not reflect selected option via innerHTML How do I get Firefox to reflect selected option values? <html> <head> <title>FFinner.htm</title> <script type="text/javascript"> function clicks() { document.getElementById("t1").value =
7
7739
by: CFonville | last post by:
I have a script that is working fine in the latest version of Firefox with no errors or warnings, but does not work in IE. I have several select boxes that, when changed, update some text (a price) on the page. I'm checking what value is selected with an if statement, setting a variable, then later updating the page. Here's the code that...
5
3949
by: VK | last post by:
On the demo at <http://www.geocities.com/schools_ring/tmp/demo01/index.xml> the table caption has 1px(?) indentation from the left in Firefox 1.5 and I'm running out of ideas how to kill it - if it's possible at all. (Opera 9 shows a bigger indentation (2px?) but from the right side, but this fun is for later :-) IE displays the expected (at...
2
17072
by: cbjewelz | last post by:
Hey all. So I'm having problems with cross browser alignments. I'm looking at Safari and Mozilla Firefox. I develop in Safari and so it looks perfect there however in Firefox my vertical alignments and div widths are off. It's as if firefox has a different definition of a pixel than safari. Here is the url:...
11
2795
by: davecph | last post by:
I'm constructing a website with a layout created with div-tags. They have a fixed width, float left, and display inline. When one of the div's contain a select-element the right-most div floats down for no apparent reason, but when the select-elements are gone they all align as expected. No css apply to the select-elements. image of prob.:...
4
1922
by: Sjef Janssen | last post by:
Hallo, I'm trying to create boxes that have nicely spaced paragraphs, but a title that is in a colored line full-width. Here is my styles: In the div content I create the framed boxes and give then a padding at the left of 20px. Problem is that hte title gets the same padding, whereas it should align at the left frameline of the box.
5
2557
by: Richard Maher | last post by:
Hi, Can someone please show me how to tell Firefox to preseve white-space when returning the selectList.option.value attribute? I have change the style so that the white-space is preserved on the screen, but for some bizarre reason when I try to substring out a series of bytes (aka a fixed-length string or field) from a given option it...
2
2392
by: firstexact | last post by:
Hi guys, First post, hope you can help, I have done two sites www.trisant.co.uk and my own www.firstexact.co.uk. The 2 x 2 grid I originally envisaged goes haywire in Firefox as I get a 4 high by 1 wide grid. think it's something to do with my floats and clear both with a <br> in CSS..I have tried everything I can think of, the sites are fine...
3
2417
by: SAL | last post by:
Hello, I did google this issue and found some stuff related to BrowserCaps section of either web.config or machine.config but it didn't work. It seems that most pages in my webapp are okay but a couple of the Firefox is munging up. So, on my information page there is a gridview in the content section of the page. The masterpage contains...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6281
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5218
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.