Dominion Posted June 10, 2013 Posted June 10, 2013 How can we do that without knowing the problem? Quote
rockwood Posted June 10, 2013 Author Posted June 10, 2013 (edited) ill try myself Edited June 10, 2013 by rockwood Quote
Guest Posted June 10, 2013 Posted June 10, 2013 i am doing on attac.php <script type="text/javascript"> $(function () { $('#content').load('attack.jquery.php?ID=<?php echo $_GET['ID']?>'); }); </script> // this part is not working <script type="text/javascript"> $("#submit_b").click(function(){ $("#usefists").submit(); $(function () { $('#content').load('attack.jquery.php?ID=<?php echo $_GET['ID']?>'); }); }); //-------------------------------from attack.jquery.php--- <form id="usefists" name="usefists" method="post"> <input type="hidden" name="fist" id="fist" value="fist"> <input type="button" name="submit" id="submit_b" style="color:#A1A1A1;font-weight:700;width:200px; height:40px; border:2px; cursor:pointer; background: url(images/attack/hand.jpg) no-repeat center top;" value="Fists" </form> i am unable to submit form Any chance you can use [*code] tags and indentation for ease of viewing? Quote
rockwood Posted June 10, 2013 Author Posted June 10, 2013 (edited) thanks guyz Edited June 10, 2013 by rockwood Quote
rockwood Posted June 10, 2013 Author Posted June 10, 2013 (edited) sorry by mistake Edited June 10, 2013 by rockwood Quote
rockwood Posted June 10, 2013 Author Posted June 10, 2013 (edited) you can see now Edited June 10, 2013 by rockwood Quote
Guest Posted June 10, 2013 Posted June 10, 2013 First your not closing the <script> tags, read up on the API http://api.jquery.com/submit/ Quote
Djkanna Posted June 10, 2013 Posted June 10, 2013 (edited) Try: <div id="content"></div> <script> ( function ( $ ) { $(function () { var content = $('#content'), url = 'attack.jquery.php?ID=<?php echo $_GET["ID"]; ?>'; content.load ( url ); $('#submit_b').on ( 'click', function ( e ) { e.preventDefault(); $('#usefists').submit(); content.load ( url ); }); }); })(jQuery); </script> <form id="usefists" name="usefists" method="post"> <input type="hidden" name="fist" id="fist" value="fist"> <input type="button" name="submit" id="submit_b" style="color:#A1A1A1;font-weight:700;width:200px; height:40px; border:2px; cursorointer; background: url(images/attack/hand.jpg) no-repeat center top; "value="Fists" /> </form> Pastie Or: <div id="content"></div> <script> ( function ( $ ) { $(function () { var content = $('#content'), url = 'attack.jquery.php?ID=<?php echo $_GET["ID"]; ?>'; content.load ( url ); $('#usefists').submit ( function ( e ) { content.load ( url ); e.preventDefault(); }); }); })(jQuery); </script> <form id="usefists" name="usefists" method="post"> <input type="hidden" name="fist" id="fist" value="fist"> <input type="button" name="submit" id="submit_b" style="color:#A1A1A1;font-weight:700;width:200px; height:40px; border:2px; cursorointer; background: url(images/attack/hand.jpg) no-repeat center top; "value="Fists" /> </form> Pastie Edited June 10, 2013 by Djkanna Quote
Djkanna Posted June 10, 2013 Posted June 10, 2013 .on and .ready both are same ? No... Both are completely different. $(function () { } ); is equiv to $().ready ( function () { } ); Quote
Dominion Posted June 10, 2013 Posted June 10, 2013 .on and .ready both are same ? Jquery has an amazing site... http://api.jquery.com/on/ http://api.jquery.com/ready/ Quote
Dominion Posted June 10, 2013 Posted June 10, 2013 still the same problem and the problem is what? What error is your browser giving you? Quote
Guest Posted June 10, 2013 Posted June 10, 2013 still the same problem Not being rude or anything but instead of posting meaningless replies actually read up on the API, instead of jumping in and constantly asking for help, start at the beginning then work your way up. Of course you still have the same problem Dominion didn't post a solution then. Quote
rockwood Posted June 10, 2013 Author Posted June 10, 2013 (edited) console having no error that why i am stuck Edited June 10, 2013 by rockwood Quote
rockwood Posted June 10, 2013 Author Posted June 10, 2013 (edited) and the problem is what? What error is your browser giving you? anyway when i am trying to click for submit than nothing happen with submit Edited June 10, 2013 by rockwood Quote
Script47 Posted June 10, 2013 Posted June 10, 2013 (edited) console having no error dat way i am stuck that's* why* No offence and not being obnoxious either, just saying please try and spell correctly mate. :) Edited June 10, 2013 by Script47 Quote
rockwood Posted June 10, 2013 Author Posted June 10, 2013 lol i am new so dont know decent way but now i got it thanks Script47 and ill keep in mind your words Quote
Guest Posted June 10, 2013 Posted June 10, 2013 lol i am new so dont know decent way but now i got it thanks Script47 and ill keep in mind your words You joined 2 years ago?, decent way of what? Quote
rockwood Posted June 10, 2013 Author Posted June 10, 2013 but i am inactive just few days back i started here Decent way for asking help Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.