using <div> tag dynamically in html

1 reply [Last post]
Last seen: 7 years 8 weeks ago
Joined: 2009-09-18
bOt Points: 126

actually i wanted that suppose i have three links on my page....clicking on each of them a division becomes visible on the same page.....

however on clicking each of the link a different query(a php code) has to be executed....

how do i make them appear on the same div .............. 


i can make three different divisions but that wont solve the problem........

i want everythg to come on the same position in the page.........

Last seen: 1 year 31 weeks ago
Joined: 2009-02-18
bOt Points: 1160
Hello apeksha0701, Yes

Hello apeksha0701,

Yes different PHP codes can be run and result can be displayed inside same div. Since you want to execute PHP code in real time you need to use AJAX. There is a tutorial which explains how to do all this - AJAX Search Tutorial. In this tutorial values inside a span element change dynamically (in real time) depending upon the input of the user inside a textbox. Same concept can be implemented in your problem too. Depending upon the different links clicked different data can be shown (after executing a PHP query) inside the div element. Check out the tutorial!  

Founder and Admin