rockwood Posted June 10, 2013 Share Posted June 10, 2013 somebody can help me in jquery problem ? Quote Link to comment Share on other sites More sharing options...
Dominion Posted June 10, 2013 Share Posted June 10, 2013 How can we do that without knowing the problem? Quote Link to comment Share on other sites More sharing options...
Guest Posted June 10, 2013 Share Posted June 10, 2013 Posting it might help... Quote Link to comment Share on other sites More sharing options...
rockwood Posted June 10, 2013 Author Share Posted June 10, 2013 (edited) ill try myself Edited June 10, 2013 by rockwood Quote Link to comment Share on other sites More sharing options...
Guest Posted June 10, 2013 Share 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 Link to comment Share on other sites More sharing options...
rockwood Posted June 10, 2013 Author Share Posted June 10, 2013 (edited) thanks guyz Edited June 10, 2013 by rockwood Quote Link to comment Share on other sites More sharing options...
rockwood Posted June 10, 2013 Author Share Posted June 10, 2013 (edited) sorry by mistake Edited June 10, 2013 by rockwood Quote Link to comment Share on other sites More sharing options...
Guest Posted June 10, 2013 Share Posted June 10, 2013 Without the * in [*code] Quote Link to comment Share on other sites More sharing options...
rockwood Posted June 10, 2013 Author Share Posted June 10, 2013 (edited) you can see now Edited June 10, 2013 by rockwood Quote Link to comment Share on other sites More sharing options...
Guest Posted June 10, 2013 Share Posted June 10, 2013 First your not closing the <script> tags, read up on the API http://api.jquery.com/submit/ Quote Link to comment Share on other sites More sharing options...
rockwood Posted June 10, 2013 Author Share Posted June 10, 2013 okay thanks Quote Link to comment Share on other sites More sharing options...
Djkanna Posted June 10, 2013 Share 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 Link to comment Share on other sites More sharing options...
rockwood Posted June 10, 2013 Author Share Posted June 10, 2013 .on and .ready both are same ? Quote Link to comment Share on other sites More sharing options...
Djkanna Posted June 10, 2013 Share Posted June 10, 2013 .on and .ready both are same ? No... Both are completely different. $(function () { } ); is equiv to $().ready ( function () { } ); Quote Link to comment Share on other sites More sharing options...
rockwood Posted June 10, 2013 Author Share Posted June 10, 2013 but problem still the same Quote Link to comment Share on other sites More sharing options...
Dominion Posted June 10, 2013 Share 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 Link to comment Share on other sites More sharing options...
rockwood Posted June 10, 2013 Author Share Posted June 10, 2013 still the same problem Quote Link to comment Share on other sites More sharing options...
Dominion Posted June 10, 2013 Share Posted June 10, 2013 still the same problem and the problem is what? What error is your browser giving you? Quote Link to comment Share on other sites More sharing options...
Guest Posted June 10, 2013 Share 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 Link to comment Share on other sites More sharing options...
rockwood Posted June 10, 2013 Author Share Posted June 10, 2013 (edited) console having no error that why i am stuck Edited June 10, 2013 by rockwood Quote Link to comment Share on other sites More sharing options...
rockwood Posted June 10, 2013 Author Share 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 Link to comment Share on other sites More sharing options...
Script47 Posted June 10, 2013 Share 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 Link to comment Share on other sites More sharing options...
rockwood Posted June 10, 2013 Author Share 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 Link to comment Share on other sites More sharing options...
Guest Posted June 10, 2013 Share 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 Link to comment Share on other sites More sharing options...
rockwood Posted June 10, 2013 Author Share Posted June 10, 2013 but i am inactive just few days back i started here Decent way for asking help Quote Link to comment Share on other sites More sharing options...
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.