...

View Full Version : Font size tag in javascript



jr7138
03-09-2005, 05:29 PM
I have the following script and would like for the font to be small within the drop down window. Can't figure out the code to make this happen. Any help would be appricated:

function formHandler(){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}


document.write('<form name="form">');
document.write('<select name="site" size=1 onChange="javascript:formHandler()">');
document.write('<option value="">Sales Tools');
document.write('<option value="http://global.sbc.com/lat/">Account Assignment');
document.write('<option value="http://global.sbc.com/gmcc/billing/adjustments_reference/">Adjustment Process');
document.write('<option value="http://global.sbc.com/channel_marketing/">Channel Marketing');
document.write('<option value="http://ebiz.sbc.com/globalaccts/">Contact Management System');
document.write('<option value="http://global.sbc.com/gmcc/ops_support/cpni_loa.html">CPNI Tools');
document.write('<option value="http://salesone.sbc.com/salesone/SiteMap/hosting_calendar/index.cfm">Customer Hosting Calendar');
document.write('<option value="http://global.sbc.com/enterprise_transition/">Enterprise Transition');
document.write('<option value="http://global.sbc.com/executive_partners/">Executive Partners Program');
document.write('<option value="http://horizonsfa.sbc.com/eCommunications/start.swe?SWECmd=Start">Horizon');
document.write('<option value="http://salesone.sbc.com/dbsite/Product_Profiles/index.cfm?dna=gm_s1pco&fuseaction=DisplayList&mode=all">Product Profiles');
document.write('<option value="https://globalcomp.sbc.com/webReports/GlobalMarkets/login.jsp">Sales Compensation');
document.write('<option value="http://salesone.sbc.com">SalesOne');
document.write('<option value="http://sam.sbc.com/">Strategic Account Marking');
document.write('<option value="http://global.sbc.com/sales_tools/yahoo_sales_tools.html">Yahoo Customer Profile Tool');
document.write('</select>');
document.write('</form>');


Thanks,
jr7138

Kor
03-09-2005, 05:37 PM
document.getElementsByName('site')[0].style.fontSize='11px';
or whichever size in px you want should to the trick... But... do u really need that document.write long suasage to create elements? Wht is your final purpose with that code?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum