Jump to content

php7Q

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Everything posted by php7Q

  1. I would need to know what you wanted it to do; so I can give you the right advice about that.
  2. php7Q

    Help?

    I would go with phpQ6's example; seems like a better choice, then bronzemonkey's idea.
  3. <script language="javascript"> function doStuff(DIVID) { document.getElementById(DIVID).style.display="block"; } </script> <div id="myDIV"> Content Here </div> <img src="whatever.jpg" onclick="doStuff('myDIV')">
  4. You see where the function is being triggered; with the onchange() event, in the input text field? All you need to do is remove the onchange event from the input text field and add the "ajaxFunction()" to a button (that has an onclick event). Example: <input type="button" onclick="ajaxFunction()" value="Submit">
  5. Check out this tutorial; it should get you on the right track: http://www.tizag.com/ajaxTutorial/ajaxform.php - Good Luck
  6. Yeah, Your Probably Right - Don't Let It Drive You Mad In The Process - LOL Coding Can Become An Addiction - LOL
  7. Yeah man, I know what you mean. That's how I learned allot of stuff - "Googled It". Bought a book or two and hung-out on forums; kind of like this one (lol). Guess that is the price we pay to play the game.
  8. You would then do a little something like this: <script language="javascript"> function valsub() { var field = document.getElementById('msg').value; var field2 = document.getElementById('msg2').value; var field3 = document.getElementById('msg3').value; if (field.length == 0 || field == null && field == "") { document.getElementById('btn').disabled = true; } else if (field2.length == 0 || field2 == null && field2 == "") { document.getElementById('btn').disabled = true; } else if (field3.length == 0 || field3 == null && field3 == "") { document.getElementById('btn').disabled = true; } else { document.getElementById('btn').disabled = false; } } </script> <form action="test.php"> <input id="msg" name="message" type="text" onkeyup="valsub()" /> <input id="msg2" name="message2" type="text" onkeyup="valsub()" /> <input id="msg3" name="message3" type="text" onkeyup="valsub()" /> <input id="btn" type="submit" name="Submit" value="Submit" disabled /> </form> I mean, there are other ways to go about do that; but using my original example above - you would do something like this.
  9. I assume your doing this with AJAX or that jQuery is doing this with AJAX. I would set the pagination up where it would display some where else; instead of in your "main" div. Otherwise you will have to create another AJAX function for the pagination too load the php page back into your div; instead of reloading the page. Even if your pagination is outside your "main" div; your probably going to need to have a AJAX function for your pagination anyway (that's my guess).
  10. I don't know; the moderators of this forum aren't to bright (but I have a personal beef with them - so others may few that differently)! But I am glad I could help you out.
  11. Here you go Tom; try this out and see how it works out for you. <script language="javascript"> function valsub() { var field = document.getElementById('msg').value; if (field.length >= 1 && field != null && field != "") { document.getElementById('btn').disabled = false; } else { document.getElementById('btn').disabled = true; } } </script> <form action="test.php"> <input id="msg" name="message" type="text" onkeyup="valsub()" /> <input id="btn" type="submit" name="Submit" value="Submit" disabled /> </form>
×
×
  • 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.