Click here to Skip to main content
13,050,242 members (100,227 online)
Rate this:
Please Sign up or sign in to vote.
See more:
echo '<head>
			<script type="text/javascript">
			function Application'.$col1.'() {
					url: "?page=acp_apps_check",
					type: "post",
					data: {capp:'.$col1.'},
					success: function(){

When its called, it says in alert 'a' but dosen't forward or when checked the 'capp' is not defined.
Posted 10-May-13 1:25am
ryanb31 10-May-13 8:02am
Can you be more clear? So, it IS hitting your success function? However, I have never used a url the way you are, relative, so I don't know if that works. Have you tried the full URL?
Oso Oluwafemi Ebenezer 10-May-13 8:32am
It might not be from the AJAX part. It might be from the way you are handling the sent data at the server-side!
NextGenDeveloper 10-May-13 9:28am
It is hitting the success function, and I tried the full URL thingy, dosen't work.
NextGenDeveloper 10-May-13 9:28am
I didn't understand what you were trying to say ..
You own words just tells us that it does send the POST. :-)
ryanb31 10-May-13 9:35am
So, it is hitting your page. It sounds like you need to debug that.
NextGenDeveloper 10-May-13 9:44am
Yeah, but why.
type: "post", ~ meaning it should send post. But its not ...
Oso Oluwafemi Ebenezer 10-May-13 10:10am
First ensure you are actually sending the right data. Second, ensure you are sending it to the right URL, that "?page=acp_apps_check" looks suspicious to me (am not saying it is wrong) why not use "xxx.php?page=acp_apps_check" so as to know exactly where you are sending to
Oso Oluwafemi Ebenezer 10-May-13 10:12am
Are you saying you are getting it as a GET instead of a POST?
Sergey Alexandrovich Kryukov 10-May-13 11:08am
Apparently, it does, it can be seen from your own words. Let's say, it does, but by some reason you fail to recognize it. Let's start from this point.
NextGenDeveloper 11-May-13 3:36am
How can it seen by my own words that it works? When it dosent.
Its not sending POST, Its not redirecting the only thing that works is the message.
I tried to GET, POST with my own redirect towards the next page, dosen't work. Returns that its not setted.
Sergey Alexandrovich Kryukov 11-May-13 23:06pm
If says "alert" on success, according to your words. It means the POST was successful.
Killzone DeathMan 17-May-13 12:08pm
My post works very good:

type: "POST",
dataType: "json",
url: 'ws.php',
data: {'action': 'myaction', 'some': 'blablabla'}
alert('post ok');
alert('Error: ' + err);

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 10 May 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100