Home Ask Login Register

Developers Planet

Your answer is one click away!

dimitris lepipas February 2016

Ajax request Error 404

Hello again and thanks in advance. Let me first show you the code and the problem that I am trying to resolve:

<span class='dropdown' id='status'>
              <?php
                switch ($status) {
                  case "unassigned":
                  echo "<button type='button'  data-toggle='dropdown' id='edit' aria-haspopup='true' aria-expanded='true' class='btn btn-danger dropdown-toggle'> Status: " . $status . "<span class='caret'></span></button>";
                  echo "<ul class='dropdown-menu'   aria-labelledby='edit'>";
                  echo "<li><a class='editStatus' href='pending'>Pending</a></li>";
                  echo "</ul>";
                  break;

                  case "pending":
                  echo "<button type='button'  data-toggle='dropdown' id='edit' aria-haspopup='true' aria-expanded='true' class='btn btn-danger dropdown-toggle'> Status: " . $status . "<span class='caret'></span></button>";
                  echo "<ul class='dropdown-menu'   aria-labelledby='edit'>";
                  echo "<li><a class='editStatus' href='attending'>Attending</a></li>";
                  echo "<li><a class='editStatus' href='followup'>Follow Up</a></li>";
                  echo "<li><a class='editStatus' href='closed'>Closed</a></li>";
                  echo "</ul>";
                  break;

                  case "attending":
                  echo "<button type='button'  data-toggle='dropdown' id='edit' aria-haspopup='true' aria-expanded='true' class='btn btn-danger dropdown-toggle'> Status: " . $status . "<span class='caret'></span></button>";
                  echo "<ul class='dropdown-menu'   aria-labelledby='edit'>";
                  echo "<li><a class='editStatus' href='pending'>Pending</a></li&        

Answers


dimitris lepipas February 2016

Delegation is the solution

https://learn.jquery.com/events/event-delegation/

Thanks a lot

Post Status

Asked in February 2016
Viewed 2,175 times
Voted 8
Answered 1 times

Search




Leave an answer


Quote of the day: live life