View Full Version : Superscript characters in Ext.Combobox
Hi,
If I create an 'old school' SELECT in HTML I can populate its OPTION items with strings that contain superscript characters, e.g., mm
tryanDLS
3 May 2007, 2:29 PM
Take a look at what's being rendered in Firebug. I have a feeling you need to use the &xxxx equivalent of the special characters.
Thank you very much Tim,
That's exactly what it was.
If anyone else is interested http://www.intuitive.com/coolweb/entities.html provides a list of HTML Character Entities (e.g., ² for
Guess I should have tested it properly Tim!
Although the drop-down in the Ext.ComboBox renders the Character Entities, e.g., ², correctly, the edit itself doesn't.
http://localhost/superscript-error.JPG
Thanks for getting me half-way there, any other ideas?
Fay
tryanDLS
3 May 2007, 3:49 PM
Not sure what you mean. I added a select handler which alerts me the id and the value.
cbViscosityUnits.on('select', function() {
Ext.MessageBox.alert(this.getValue(), this.getRawValue());
});
Hi Tim,
Sorry, I meant that in the drop-down list itself the entries where being displayed correctly:
...
mm
tryanDLS
3 May 2007, 4:37 PM
I copied your code and put it on a page with an input tag - it appears correctly in the dropdown and in the box after select. Are you using the latest 1.0.1a code?
Hi Tim,
Yes I'm using the latest (1.0.1a). And sorry my last post must have looked like I was losing the plot - it was 1am and I didn't realise that the forum would use the html characters! It should have said (spaces intentional):
[QUOTE]But when I selected "mm
Same problem, but i try to add image to combobox. In list it is displayed correctly, but in the field there is html. so it looks as <img src="...blablabla
Any solution?
tryanDLS
4 May 2007, 12:20 PM
Well, now I'm confused. I cut and pasted the code from the forum page, so it's in my code without the ampersand coding - e.g just the way it appears on the page here. It works correctly on IE and FF - no squares. I thought this was what you did originally - now I don't know. The other possibility is that it's an encoding issue in the html. I have this in my page.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
Thank you Tim, that's exactly what it was: the content-type!!!! Believe me, I will be buying HTML for Dummies tomorrow morning.
I'd tried it every different way with superscripts, then ampersand coding, then ASP pages instead of HTML... never thinking of the meta tags :">
I really appreciate your help - above and beyond =D>
Fay
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.