SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Jquery to get external html

    Hi all,

    I'm trying to use Jquery to get the latest id from my mysql database by loading a php file that prints the correct id.

    $(document).ready(function(){
    $('#submitbutton').click(function(){
    var foo = load("get.last.content.inc.php"); // this is a sql select last query
    top.location.href = '?page=content&action=edit&id=foo;
    });
    });

    Pls can anyone suggest the correct way to do it?

    Thanks in advance.

  2. #2
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Better use AJAX with jQuery
    http://docs.jquery.com/Ajax
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •