Search the Community
Showing results for tags 'loading'.
-
For eg, say I am retreiving 3 records from database and they look like this. <div class="record"> <h1>Record title 1</h1> <p>Record description</p> <button class="button">send message</button> </div> <div class="record"> <h1>Record title 2</h1> <p>Record description</p> <button class="button">send message</button> </div> <div class="record"> <h1>Record title 3</h1> <p>Record description</p> <button class="button">send message</button> </div> and this is my ajax to load the form. <script> $(document).ready(function(){ $(".button").click(function(){ $(".record").load("form.php .new-form"); }); }); </script> the form looks like this. <form class="new-form"> <textarea name="message" class="message"></textarea> <input type="button" name="submit" class="form-submit" value="Send Message"> </form> That all works. The only problem with that is, it loads the form in EACH record. How can I make it so that the form only loads to the div record from which I am calling from?
-
Okey, my script is working mostly as I want. I need a line that picks top 50, and only choose those who submitted with name, if the name plate is blank.. the score should not come up. Here is the line I guess you have to change: $result = mysql_query("SELECT name, score FROM high_scores_avoidthecars ORDER BY score DESC "); Things that should work: 1. Sort out who got the highest score BUT also who submitted it first (checks highest/lowest id) (The lowest id number is also the one that sumbitted first*) 2. Top 50 scores only 3. Only show scores that have a Name submitted as well. Extra note: I have already a thread that is a bit the same, but will keep both open a little then close the other one. Here is the second thread that will be closed in a few days