Need help? Check out our Support site, then

dynamic drop down list in wordpress

  1. pls help me out,
    im trying add dynamic drop down list in wordpress, but failed
    its works fine when executed on browser normally.. but fails when i add it on wordpress pages
    thank you.....

    here is the code

    <script language="javascript">
    var arr = new Array();
    arr[0] = new Array("-select-");
    arr[1] = new Array("Maharashtra","Karnataka","Andhra Pradesh","Tamil Nadu");
    arr[2] = new Array("Carinthia"," Styria");
    arr[3] = new Array("Florida","New York","Maryland");
    arr[4] = new Array("Queensland","Victoria","Tasmania","New South Wales");

    function change(combo1){
    var comboValue = combo1.value;
    for (var i=0;i<arr[comboValue].length;i++){
    var option = document.createElement("option");
    option.innerHTML = arr[comboValue][i];
    <form name="form" method="post"><select name="combo1" onchange="change(this);">
    <option value="0">-Select-</option>
    <option value="1">India</option>
    <option value="2">Austria</option>
    <option value="3">USA</option>
    <option value="4">Australia</option>
    <select name="combo2">

    The blog I need help with is

  2. Users are not allowed to post JavaScript on blogs. The software strips it out for security reasons.

Topic Closed

This topic has been closed to new replies.

About this Topic