diff --git a/unl_theme/views/default/page_elements/header.php b/unl_theme/views/default/page_elements/header.php index 64662cf87e0dfc6ae70819fffea9c5bbf04df39a..6967e0d46cbd72e5fa066621987c6b3c3b96d978 100644 --- a/unl_theme/views/default/page_elements/header.php +++ b/unl_theme/views/default/page_elements/header.php @@ -167,7 +167,7 @@ if ($vars['title'] == "Edit profile") { html += '>' + x + '</option>'; } - selYear.innerHTML = html; + $(selYear).html(html); var selFrom = document.createElement("select"); @@ -182,7 +182,7 @@ if ($vars['title'] == "Edit profile") { html += '>' + x + '</option>'; } - selFrom.innerHTML = html; + $(selFrom).html(html); from_parent.append(selFrom); var selTo = document.createElement("select"); @@ -197,13 +197,13 @@ if ($vars['title'] == "Edit profile") { html += '>' + x + '</option>'; } - selTo.innerHTML = html; + $(selTo).html(html); from_parent.append(" to "); from_parent.append(selTo); to_parent.parent().remove(); - var states = ["", "AL", "AK", "AS", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MH", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VI", "VA", "WA", "WV", "WI", "WY"]; - + var states = ["AL", "AK", "AS", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MH", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VI", "VA", "WA", "WV", "WI", "WY"]; + var countries = ["USA", "Afghanistan", "Albania", @@ -412,11 +412,11 @@ if ($vars['title'] == "Edit profile") { /*if (current_country == "") { html += '<option selected="selected" value="">-Select your country-</option>'; }*/ - selCountry.innerHTML = html; + $(selCountry).html(html); var selState = document.createElement("select"); selState.name = "form_data_profile_state"; - html = ""; + html = '<option value=""> </option>'; for (var i = 0, l = states.length; i < l; i++){ html+= '<option'; if (states[i] == current_state) { @@ -427,7 +427,7 @@ if ($vars['title'] == "Edit profile") { /*if (current_state == "") { html += '<option selected="selected" value=""> </option>'; }*/ - selState.innerHTML = html; + $(selState).html(html); var selhomeCountry = document.createElement("select"); selhomeCountry.name = "form_data_profile_homecountry"; @@ -442,11 +442,11 @@ if ($vars['title'] == "Edit profile") { /*if (home_country == "") { html += '<option selected="selected" value="">-Select your country-</option>'; }*/ - selhomeCountry.innerHTML = html; + $(selhomeCountry).html(html); var selhomeState = document.createElement("select"); selhomeState.name = "form_data_profile_homestate"; - html = ""; + html = '<option value=""> </option>'; for (var i = 0, l = states.length; i < l; i++){ html+= '<option'; if (states[i] == home_state) { @@ -457,7 +457,8 @@ if ($vars['title'] == "Edit profile") { /*if (home_state == "") { html += '<option selected="selected" value=""> </option>'; }*/ - selhomeState.innerHTML = html; + console.log('html ====== ' + html); + $(selhomeState).html(html); $("input[name=form_data_profile_dob_month]").parent().append(selYear); country_parent.append(selCountry);