473,473 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to change button value to special characters (dynamically) ?

xEM
I have something like that:

var button = document.getElementById("mybutton");

if(flag) {
button.value = '»';
} else {
button.value = '«';
}

This code set my button value to text: '»' but not to symbol '>>'.
How to do that ?

Thanks in advance.

--
pozdr.;)
~xEM
Aug 8 '06 #1
3 3405
xEM wrote:
I have something like that:

var button = document.getElementById("mybutton");

if(flag) {
button.value = '»';
} else {
button.value = '«';
}

This code set my button value to text: '»' but not to symbol '>>'.
How to do that ?
button.value = '\u00BB';

--
Bart

Aug 8 '06 #2
xEM
In article <11*********************@h48g2000cwc.googlegroups. com>,
Bart Van der Donck wrote:
>
button.value = '\u00BB';
Thanks very much! :)

--
pozdr.;)
~xEM
Aug 8 '06 #3
JRS: In article <sl***************@zeto.intranet>, dated Tue, 8 Aug
2006 08:38:33 remote, seen in news:comp.lang.javascript, xEM <me@o2.pl>
posted :
>I have something like that:

var button = document.getElementById("mybutton");

if(flag) {
button.value = '&raquo;';
} else {
button.value = '&laquo;';
}
Consider

button.value = flag ? "\u00BB" : "\u00BF"

in which finding the right value for BF is left as an exercise.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Aug 8 '06 #4

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

Similar topics

6
by: Dario Di Bella | last post by:
Hi all, I hope someone can help me on this. I need to parse the following XML: .... <area name="promotore"> <item id="004" code="003" description="attivita promotore"> <!]> </item> </area>...
8
by: Matt Herson | last post by:
I have been trying to find a way to use JavaScript to change the value of a hidden field on submit. I am already invoking a JavaScript to handle the validation on submit. The reason I need to...
7
by: nathaniel.k.lee | last post by:
Is it not possible, in IE, to dynamically click a radio button? I'm grabbing some values from a database and using them to populate radio buttons on a page. I have alternate code for Firefox...
11
by: bill | last post by:
I dynamically create buttons and associate them with an event using AddHandler. I want all the button events to fire at one time, when the page is posted, instead of when each button is clicked....
13
by: sonald | last post by:
Hi, Can anybody tell me how to change the text delimiter in FastCSV Parser ? By default the text delimiter is double quotes(") I want to change it to anything else... say a pipe (|).. can anyone...
1
by: jeffejohnson | last post by:
I'm looking to see if anyone has experienced this... I've got a dropdown that I'm populating dynamically and the items include HTML special characters (like &Ocirc;). If I load them from an...
2
by: Mudcat | last post by:
I am trying to change the width of a widget based on pixel size and not on characters. I can't figure out how to do this. Normally to change to the size of a widget it looks like: ...
4
by: Dan Andrews | last post by:
Hello, I was wondering what is the correct way to handle special characters via javascript and the DOM. I would like to avoid document.write and innerHTML. What I am doing is dynamically...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
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.