Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-29-2008, 03:46 PM   PM User | #1
crazyman
New Coder

 
Join Date: Jan 2008
Posts: 31
Thanks: 6
Thanked 0 Times in 0 Posts
crazyman is an unknown quantity at this point
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!!!
crazyman is offline   Reply With Quote
Old 07-29-2008, 04:22 PM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,680
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
If it's plain text, then you could use innerHTML property
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 07-29-2008, 05:06 PM   PM User | #3
crazyman
New Coder

 
Join Date: Jan 2008
Posts: 31
Thanks: 6
Thanked 0 Times in 0 Posts
crazyman is an unknown quantity at this point
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..
crazyman is offline   Reply With Quote
Old 07-29-2008, 06:10 PM   PM User | #4
ohgod
Regular Coder

 
ohgod's Avatar
 
Join Date: Jun 2008
Location: Ohio
Posts: 579
Thanks: 6
Thanked 69 Times in 69 Posts
ohgod is on a distinguished road
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
ohgod is offline   Reply With Quote
Old 07-29-2008, 07:28 PM   PM User | #5
crazyman
New Coder

 
Join Date: Jan 2008
Posts: 31
Thanks: 6
Thanked 0 Times in 0 Posts
crazyman is an unknown quantity at this point
Oh thank everybody very much and a special thank to ohgod.
So i will try with xml.But im a new to it .
crazyman is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:29 PM.


Advertisement
Log in to turn off these ads.