Note that there are some explanatory texts on larger screens.

plurals
  1. POSelect Options Do Not Update Using jQuery on iPad
    primarykey
    data
    text
    <p>I made a site that updates select options when a race is loaded. When the user selects a race it brings up a series of select boxes. If a runner was previously assigned to a place then they will be loaded after the race loads. This works fine in every web browser I've tried (Firefox, Chrome, Safari), but not on the iPad, which is where it will mainly be used.</p> <p>This is the Javascript code I have for the section that updates the places:</p> <pre><code> $.post('getRunnerPlacements.php', {gender: race}, function(data) { var runners = data.split('*RUNNER*'); var savedRunners = runners.length-1; for (var i=0;i&lt;savedRunners;i++) { var tempRunner = runners[i].split('*INFO*'); var place = tempRunner[2]-1; var dd = $('#school'+place); dd.val(tempRunner[3]); loadRunners(place,race,tempRunner[0]); } }); </code></pre> <p>...</p> <pre><code>function loadRunners(i,gender,place) { var school = $('#school'+i+' option:selected').val(); $.post('getRunners.php', {school:school,gender:gender}, function(data) { var runners = data.split('*RUNNER*'); runners.pop(); $.each(runners, function(key, value) { var temp = value.split('*INFO*'); $('#runner'+i) .append($('&lt;option&gt;', { value : temp[0] }) .text(temp[1])); }); if (place != 'false') $('#runner'+(i)).val(place); }); } </code></pre> <p>I've tried non-jQuery approaches, but everything I've done leads to the same problem on the iPad. The school for placed runners will not load in the first select list, which causes the runner select list to show up blank. I have gotten it to work on occasion when I've put in an alert to test values, but this does not work every time. I also tried to delay execution of the loadRunners function using setTimeout, but that didn't help either. Any ideas would be much appreciated. You can see the live site at: invite.ymsrunning.com/results.php. Click on "Enter Results" and then select a race to see or set results.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload