View Single Post
Old 01-05-2012, 04:44 AM   PM User | #4
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,307
Thanks: 12
Thanked 204 Times in 204 Posts
DanInMa is on a distinguished road
Quote:
Originally Posted by q1h View Post
Thanks for your reply. I'm trying to display the contents of a PHP file in a div (#results) without submitting a form. The above code uses a form submission.
how do you want to trigger it? on page load? on a click event? on a timer? also without the form your not submitting any query. if you just want to load a simple php file then:

Code:
$('#php_results').load("somefile.php");

//or on document ready when the dom loads it will happen
$(document).ready(function(){
$('#php_results').load("somefile.php");
});
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users

Last edited by DanInMa; 01-05-2012 at 04:58 AM..
DanInMa is online now   Reply With Quote