shamsuljewel Posted November 14, 2007 Share Posted November 14, 2007 Hello everybody, I am trying to do this... I hava a page with different tab.... 1. Myfriend list 2. My pictures 3. My Top 10 Friends...etc I do this by useing AJAX.....its simple <LI id=navFrndlist><A title="Friend List" onClick="makeRequest('frnd_list.php');">Friend List</A></LI> <!-- use class="active" --> <LI id=navTop10><A title="Top 10 Friends" onClick="makeRequest('top_10.php');">Top 10</A></LI> <LI id=navPic><A title="Pictures" onClick="makeRequest('gallery.php');">Pictures</A></LI> <DIV id="content" align="center"><?php require_once "frnd_list.php"; ?></DIV> in my friendlist there are many friends in database..so I need to show first 1-10 of 25 like this. and a next>> to show next 11-20. so I use this line in friend_list.php for($i=0; $i*$limit < $total_frnd; $i++) { if($s != $i) echo " <a href='index.php?action=friends_main&s=$i'>".($i+1)."</a>"; //echo " <a onClick=\"makeRequest1('gallery.php','$i');\" href='#'>".($i+1)."</a>"; else echo " ".($i+1); } this works fine but I use that way when I don't use AJAX..this is a normal way this refresh all the page......so I need the way to do this by using AJAX. this friend_list.php page is now shown in content <div>...so I now need when I click on 2 (page) the next friend list will display in same content <div> thats why I actuall need to pass the value of $i and it will GET from this friends file... so how can I do it? Any sugestions ..... :) Quote Link to comment Share on other sites More sharing options...
shamsuljewel Posted November 14, 2007 Author Share Posted November 14, 2007 how to pass the $i variable to AJAX function and then the variable again sent from to the php file by GET method. Quote Link to comment Share on other sites More sharing options...
shamsuljewel Posted November 15, 2007 Author Share Posted November 15, 2007 Ohhhh I m mistaken in the ajaxfunction to handle the paramentes... Just changed to currect I soved it...:) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.