Skip to content
Snippets Groups Projects
Commit e1406706 authored by Matthew Juhl's avatar Matthew Juhl
Browse files

Solve IE issues with profile editor.

parent c4613405
Branches
No related tags found
No related merge requests found
...@@ -167,7 +167,7 @@ if ($vars['title'] == "Edit profile") { ...@@ -167,7 +167,7 @@ if ($vars['title'] == "Edit profile") {
html += '>' + x + '</option>'; html += '>' + x + '</option>';
} }
selYear.innerHTML = html; $(selYear).html(html);
var selFrom = document.createElement("select"); var selFrom = document.createElement("select");
...@@ -182,7 +182,7 @@ if ($vars['title'] == "Edit profile") { ...@@ -182,7 +182,7 @@ if ($vars['title'] == "Edit profile") {
html += '>' + x + '</option>'; html += '>' + x + '</option>';
} }
selFrom.innerHTML = html; $(selFrom).html(html);
from_parent.append(selFrom); from_parent.append(selFrom);
var selTo = document.createElement("select"); var selTo = document.createElement("select");
...@@ -197,12 +197,12 @@ if ($vars['title'] == "Edit profile") { ...@@ -197,12 +197,12 @@ if ($vars['title'] == "Edit profile") {
html += '>' + x + '</option>'; html += '>' + x + '</option>';
} }
selTo.innerHTML = html; $(selTo).html(html);
from_parent.append(" to "); from_parent.append(" to ");
from_parent.append(selTo); from_parent.append(selTo);
to_parent.parent().remove(); 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", var countries = ["USA",
"Afghanistan", "Afghanistan",
...@@ -412,11 +412,11 @@ if ($vars['title'] == "Edit profile") { ...@@ -412,11 +412,11 @@ if ($vars['title'] == "Edit profile") {
/*if (current_country == "") { /*if (current_country == "") {
html += '<option selected="selected" value="">-Select your country-</option>'; html += '<option selected="selected" value="">-Select your country-</option>';
}*/ }*/
selCountry.innerHTML = html; $(selCountry).html(html);
var selState = document.createElement("select"); var selState = document.createElement("select");
selState.name = "form_data_profile_state"; selState.name = "form_data_profile_state";
html = ""; html = '<option value="">&nbsp;</option>';
for (var i = 0, l = states.length; i < l; i++){ for (var i = 0, l = states.length; i < l; i++){
html+= '<option'; html+= '<option';
if (states[i] == current_state) { if (states[i] == current_state) {
...@@ -427,7 +427,7 @@ if ($vars['title'] == "Edit profile") { ...@@ -427,7 +427,7 @@ if ($vars['title'] == "Edit profile") {
/*if (current_state == "") { /*if (current_state == "") {
html += '<option selected="selected" value="">&nbsp;</option>'; html += '<option selected="selected" value="">&nbsp;</option>';
}*/ }*/
selState.innerHTML = html; $(selState).html(html);
var selhomeCountry = document.createElement("select"); var selhomeCountry = document.createElement("select");
selhomeCountry.name = "form_data_profile_homecountry"; selhomeCountry.name = "form_data_profile_homecountry";
...@@ -442,11 +442,11 @@ if ($vars['title'] == "Edit profile") { ...@@ -442,11 +442,11 @@ if ($vars['title'] == "Edit profile") {
/*if (home_country == "") { /*if (home_country == "") {
html += '<option selected="selected" value="">-Select your country-</option>'; html += '<option selected="selected" value="">-Select your country-</option>';
}*/ }*/
selhomeCountry.innerHTML = html; $(selhomeCountry).html(html);
var selhomeState = document.createElement("select"); var selhomeState = document.createElement("select");
selhomeState.name = "form_data_profile_homestate"; selhomeState.name = "form_data_profile_homestate";
html = ""; html = '<option value="">&nbsp;</option>';
for (var i = 0, l = states.length; i < l; i++){ for (var i = 0, l = states.length; i < l; i++){
html+= '<option'; html+= '<option';
if (states[i] == home_state) { if (states[i] == home_state) {
...@@ -457,7 +457,8 @@ if ($vars['title'] == "Edit profile") { ...@@ -457,7 +457,8 @@ if ($vars['title'] == "Edit profile") {
/*if (home_state == "") { /*if (home_state == "") {
html += '<option selected="selected" value="">&nbsp;</option>'; html += '<option selected="selected" value="">&nbsp;</option>';
}*/ }*/
selhomeState.innerHTML = html; console.log('html ====== ' + html);
$(selhomeState).html(html);
$("input[name=form_data_profile_dob_month]").parent().append(selYear); $("input[name=form_data_profile_dob_month]").parent().append(selYear);
country_parent.append(selCountry); country_parent.append(selCountry);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment