Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Support
  • Code University
  • Ajax Errors
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
Ajax Errors
Tweet Topic Started: Jun 23 2009, 11:48 PM (309 Views)
Reid Jun 23 2009, 11:48 PM Post #1
Member Avatar
What? The land of the free? Whoever told you that was your enemy.

Posts:
1,790
Group:
Distinguished Coder
Member
#148
Joined:
Jul 20, 2008
Figured I'd start this topic so we don't hijack the points per post (any further...)

Can I see a snippet of code? :P
The Resource Board
Offline Profile Goto Top
 
Viral Jun 26 2009, 07:04 PM Post #2


Posts:
342
Group:
Dedicated
Member
#48
Joined:
Jul 17, 2008
Coding language
PHP
What code are you looking for? :unsure:

Posted Image
Offline Profile Goto Top
 
slayer766 Jun 26 2009, 08:46 PM Post #3
Member Avatar
Hello all

Posts:
1,653
Group:
Distinguished Coder
Member
#12
Joined:
Jul 9, 2008
Coding language
PHP
I think the code that Garath wrote for a code request.
Offline Profile Goto Top
 
Garath531. Jun 26 2009, 10:20 PM Post #4


Posts:
156
Group:
Dedicated
Member
#3,232
Joined:
Jun 17, 2009
Oh right, I forgot about this. Here is the code that I originally used (to make sure AJAX was possible):
Code:
 

<script type="text/javascript">
$(function() {
$.post(main_url + "home/?c=32&send=1", {post: "Test"}, function(d) {
alert($(d).find(".generic").html());
});
});
</script>

and got this:
Quote:
 

<td>Security Error<br><small>Error Code: 6:7125</small></td>
Edited by Garath531., Jun 26 2009, 10:21 PM.
I'm back after an unexpected hiatus. If I've forgotten about a code I was working on for you, just drop me a PM and let me know. :)
Offline Profile Goto Top
 
Reid Jun 26 2009, 11:11 PM Post #5
Member Avatar
What? The land of the free? Whoever told you that was your enemy.

Posts:
1,790
Group:
Distinguished Coder
Member
#148
Joined:
Jul 20, 2008
Gotta get the xc value if you're submitting signatures.
Code:
 
$.get(main_url + 'home/?c=32', function(WAIHALLOTHAR) {
var GOODEVENINGMYGOODSIR = $("input[name=xc]",WAIHALLOTHAR).val();
$.post(main_url + 'home/?c=32&send=1',{xc:GOODEVENINGMYGOODSIR,post:"SHALL WE HAVE A CUP OF TEA?"}, function(INDEED) {
if ($('.generic',INDEED).html().indexOf("error") == -1) {
alert('JOLLY GOOD, GOOD CHAP!');
}})})
:D
Edited by Reid, Jun 26 2009, 11:11 PM.
The Resource Board
Offline Profile Goto Top
 
slayer766 Jun 26 2009, 11:51 PM Post #6
Member Avatar
Hello all

Posts:
1,653
Group:
Distinguished Coder
Member
#12
Joined:
Jul 9, 2008
Coding language
PHP
What is the xc data?
Offline Profile Goto Top
 
Garath531. Jun 26 2009, 11:53 PM Post #7


Posts:
156
Group:
Dedicated
Member
#3,232
Joined:
Jun 17, 2009
Looking at the source, it's a hidden input. Thanks for the tip, Reid! :)
I'm back after an unexpected hiatus. If I've forgotten about a code I was working on for you, just drop me a PM and let me know. :)
Offline Profile Goto Top
 
Reid Jun 27 2009, 11:32 AM Post #8
Member Avatar
What? The land of the free? Whoever told you that was your enemy.

Posts:
1,790
Group:
Distinguished Coder
Member
#148
Joined:
Jul 20, 2008
Indeed, there are a lot of hidden inputs in forms. Just remember, everything that has a 'name' inside of a form will be sent via POST to the server (or, rarely, GET.)

Like topics for example... when you edit posts, there are lots of inputs that have to be sent along with it, else it will mess up.
The Resource Board
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Code University · Next Topic »
Locked Topic

Track Topic · E-mail Topic Time: 7:46 PM Jul 10
Hosted for free by ZetaBoards · Privacy Policy