RSS Forums RSS
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

Right Align Option Element Text

Join Date: Jul 2005
Posts: 177
Reputation: aparnesh is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 10
aparnesh's Avatar
aparnesh aparnesh is offline Offline
Junior Poster

Re: Right Align Option Element Text

  #3  
Apr 23rd, 2007
I tried your solution, but it is not working. Here's the code snippet

Declaring the Class

<STYLE type="text/css">
.GoRight {
	text-align: right ;
	}
</STYLE>

And Here's the code for adding the option and specifying the class name.

newOpt = document.createElement("option");
newOpt.text = <%=mValue%> ;
newOpt.CLASS = 'GoRight';
document.Form2.lstAllowance.options.add(newOpt);

Am I doing something wrong ?
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 10:21 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC