Jump to content

Davidammit

Members
  • Posts

    31
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Davidammit's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thats an interesting program you've got set up. You could have the AJAX re-evaluate the entire form when the user changes one box, that way the list would be correct and you could have the submit button send the data to a different PHP file that stores the form contents to a database.
  2. No problem. I hope you solve the problems.
  3. How were you planning to approve the team? Would a person be doing it or would it be based off player stats? If it was based off player stats I would do it PHP side and make a code to the effect of if ( APPROVED ) { echo '<input type="submit">'; } else { echo '<input type="button" onclick="notApproved($reason)">'; } and then have a button on the main form that has the effect of sending all the players to the PHP file for checking and display. If they mess up the first button would still be there so they could try again. And if they didn't they could click on the submit button. If it wasn't approved they would have a button to check why. You could store the non-approval reasons on the JavaScript side or have it retrieve them somehow.
  4. Couldn't you make one button for checking the team and another button for the final submit though?
  5. oh I think I get it. You could change it so the PHP code does all the queries at once and the fields keep their values. That way if they screw up, they can change it easily. Then maybe have the PHP part generate a confirm button in with its response.
  6. I'm not sure I entirely understand what it is you are trying to do. Do you have a semi-working model hosted yet?
  7. If they need to update a field there is a MySQL Query for updating fields. I believe it is: UPDATE tablename SET columnname=newvalue WHERE condition
  8. Are you having the user fill out a form and then write it to the database?
  9. Oh...it would do that wouldn't it..LOL. Don't include the <table> tags in the java Put them around the <div>
  10. No Problem. If you need to do an adding thing you could send another variable back to the PHP file along with the $q. and have it add that somehow. But I don't have much of an idea of how to get the result from it in number form so you could resend it for the next one.
  11. I just left the enters so it was easier to read fullResponse="<tr> <th>Code</th> <th>Name</th> <th>Club</th> <th>Price</th> </tr>"; function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { fullResponse=fullResponse + xmlHttp.responseText fullResponse=fullResponse + "</table"; document.getElementById("txtHint").innerHTML=fullResponse } }
  12. If the Header is going to be the same every time, make it so the PHP side doesn't return that as part of the response. Put it in with the fullResponse variable fullResponse="<tr> <th>Code</th> <th>Name</th> <th>Club</th> <th>Price</th> </tr>"; function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { fullResponse=fullResponse + xmlHttp.responseText document.getElementById("txtHint").innerHTML=fullResponse } }
  13. No problem. I just wish I knew what was going wrong with my script
  14. So when you search the first time, it displays the results, but when you search it again, it replaces the results from the first one? When you use the document.getElementByID('id').innerHTML= command, it replaces what is inside the tag you referenced, so I'd make sure that the replacement includes the info from the first search, if you are indeed trying to display all the searches for the session. If you are trying to get it to continue showing the first and second results, I'd add the responseText onto a variable that stores the response. fullResponse=""; function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { fullResponse=fullResponse + xmlHttp.responseText document.getElementById("txtHint").innerHTML=fullResponse } }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.