-
Mar 14th, 2012, 12:37 AM
#1
Thread Starter
Hyperactive Member
$.post()
im using $.post() which returns html script into a dialog, it works on my dev machine local host server, but hangs on the remote server!! i dont understand why, since its the same js library source, any ideas ??
1 more thing, i noticed that window.location.href doesnt work on IE, any equivalent function to navigate which work on all browsers
-
Mar 14th, 2012, 05:40 AM
#2
Re: $.post()
Is it the same browser ?
Did you tried debugging it ? Using Google Chrome's "Javascript Console" or using "Firebug" for Firefox.
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Mar 15th, 2012, 12:30 AM
#3
Thread Starter
Hyperactive Member
Re: $.post()
yes,same browser and the debugger doesn't show any errors, plus would not fall over on the dev environment if there was any errors
-
Mar 17th, 2012, 05:13 AM
#4
Re: $.post()
Originally Posted by wiss.dev
yes,same browser and the debugger doesn't show any errors, plus would not fall over on the dev environment if there was any errors
Not sure if this has anything to do with it but following on what akhileshbc said is it the same version of the browser?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Mar 15th, 2012, 12:54 AM
#5
-
Mar 15th, 2012, 05:11 PM
#6
Thread Starter
Hyperactive Member
Re: $.post()
Code:
<script type="text/javascript">
$.post('admin/checkMultipleAccounts.php',{},
function(data){sCompanies=jQuery.trim(data); // returns a table containing companies
$('#dialog').attr('title','Select a company.').html(sCompanies)
.dialog(
{
buttons:{ 'Cancel':function(){ $(this).dialog('close');window.location.href="logout.php";}} ,
draggable:false,resizable:false,modal:true,
}
);
}
);
</script>
i did a direct url to checkMultipleAccounts.php and had no issues, and just for testing i put an alert() in the call back function,did not pop up what tells me it is hanging on the server side, i also tried .error() method, but this caused in error in js consol : error() is not a method
im lost
-
Mar 15th, 2012, 07:04 PM
#7
Re: $.post()
Although it doesn't appear so in your code, are you trying to post to a page on a different domain?
-
Mar 15th, 2012, 07:07 PM
#8
Thread Starter
Hyperactive Member
-
Mar 17th, 2012, 02:52 AM
#9
Re: $.post()
Have you tried checking the access/error logs for the web server on the remote server?
-
Mar 17th, 2012, 12:13 PM
#10
Re: $.post()
If this error means that surely there is some error in getting data from the checkMultipleAccounts.php page.
Did the Request hit the checkMultipleAccounts.php ,if you attach the debugger for the PHP ?
Try this one check if you get any error
Code:
<script type="text/javascript">
$(document).ajaxError(function(e, xhr, settings, exception) {
alert('error in: ' + settings.url + ' \n'+'error:\n' + xhr.responseText );
});
$.post('admin/checkMultipleAccounts.php',{},
function(data){sCompanies=jQuery.trim(data); // returns a table containing companies
$('#dialog').attr('title','Select a company.').html(sCompanies)
.dialog(
{
buttons:{ 'Cancel':function(){ $(this).dialog('close');window.location.href="logout.php";}} ,
draggable:false,resizable:false,modal:true,
}
);
}
);
</script>
Please mark you thread resolved using the Thread Tools as shown
-
Mar 18th, 2012, 05:09 PM
#11
Thread Starter
Hyperactive Member
Re: $.post()
popped a message box
error in: admin/checkMultiplrCompanies.php
error :
so no error returned, and as i mentioned in previous post,if i url checkMultipleCompanies.php it displays the desired html with no errors, also it works like treat on the dev localHost using the same browser(google chrome)
-
Mar 22nd, 2012, 05:44 PM
#12
Thread Starter
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|