Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Font size tag in javascript

    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

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    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?
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •