Jump to content

voodoodan

Members
  • Posts

    4
  • Joined

  • Last visited

voodoodan's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Thanks very much for this Ingolme, I'll give that structure a go.
  2. Hello, I'm trying to make some kind of leaderboard, such as the example below: var game = ["Dominoes",95,"Cards",22,"Chess",65]; The idea is to try to group all of the numbers together in the array so that I can return a position on them. For example: 95 - would return 1st place (for the most points) 65 - 2nd place 22 - 3rd place But the numbers in the "game" variable would also need to be linked in with the games so that if they were sorted numerically then the games would follow suit as well. Would anyone be able to help with this, please? I'd be grateful for any assistance. Many thanks,Dan.
  3. Thanks very much for your detailed info, I will look into this. I forgot to include the form tags, which lie just outside the table tags in the full code.Thanks, Dan.
  4. Hello, Is there any way in Javascript of returning the table row ID that a user has clicked on, and then returning the data in that row to be sent in a direct email (ie not through local email system)? I have the following row of data, which is repeated a number of times for each line but with different data. <! -- This info is shown as a single line until clicked --> <tr class="booked" onclick='document.getElementById("bookCaravan0").style.display="table-row"'> <td>Sat 8th August 2015</td> <td>Sat 15th August 2015</td> <td>7</td> <td>£575</td> <td>Booked</td> <td>Booked</td> </tr> <!-- This info is hidden under the above data by CSS until the above is clicked. It is hidden again once you mouse out --> <tr id="bookCaravan0" onmouseout="document.getElementById('bookCaravan0').style.display='none';"> <td colspan="6" onmouseover='document.getElementById("bookCaravan0").style.display="table-row"' id="tdText">Please enter your phone number and we will call to arrange a booking: <br> <label for="fone"></label> <input type="text" name="book" id="book" value="Enter phone number" onclick="removeText(this)" onblur="addText(this)"><br /><br /> <input type="button" name="bookButton" value="Submit" id="priceSubmit" onclick="openBooking(this)"> <label for="bookingPeriod"></label> <!-- Hidden Text --> <input type="hidden" id="hiddenData" name="hidden" value="8th-15th August"> </td> </tr> I figured instead maybe another way of doing it would be to just put some cut-down info in as hidden text (as above) and try to send it on from that. For the email side of things I have created a PHP file, but something isn't working. Actually nothing is working - when I click on the submit button absolutely nothing happens at all. <?php $fone = $_POST['book']; $bookingPeriod = $_POST['hiddenData']; $email_message = " Phone Number: ".$fone." Dates: ".$bookingPeriod." "; mail("somewhere@googlemail.com","Contact request", $email_message); ?> Hoping someone can give me some pointers, please? Many thanks,Dan.
×
×
  • Create New...