Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jan 2008
    Posts
    31
    Thanks
    6
    Thanked 0 Times in 0 Posts

    ajax and print data in the div,help me.

    At first sorry about my bad English.
    So now i have 3 files : quey_db.php, jaxFunction.js and index.php.

    My question is how do i can print my data which retrieved from file query_db.php by ajaxFunction.js in my div tags.I'm a new to ajax and i just know to print into a div.If i do that, i have to code again many querys to my database for each my div tags ?

    Someone can help me? Thanks in advance!!!

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,849
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    If it's plain text, then you could use innerHTML property
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    Jan 2008
    Posts
    31
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Yes i know about innerHTML property but how do i do ?data retrieved from my database is a big string and i dont know how to arrange my data into div tags ? i have too many div and dont know how to divide my data ?
    Last edited by crazyman; 07-29-2008 at 05:09 PM.

  • #4
    Regular Coder ohgod's Avatar
    Join Date
    Jun 2008
    Location
    Ohio
    Posts
    579
    Thanks
    6
    Thanked 69 Times in 69 Posts
    if you're looking to break it up and drop it into different div's you're probably going to need to do it with xml. if you're just trying to drop the big string all into one then just use innerhtml and tell it which div by id

  • #5
    New Coder
    Join Date
    Jan 2008
    Posts
    31
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Oh thank everybody very much and a special thank to ohgod.
    So i will try with xml.But im a new to it .


  •  

    Posting Permissions

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