PDA

View Full Version : Submit form results loaded into content container



davec
10-24-2010, 06:31 PM
1) Script Title: Ajax Tabs Content Script (v 2.2)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm

3) Describe problem: Hi everyone, I have a page which has a search form for friends. When submitted I'd like the results to load into the content container.."countrydivcontainer" Basically here's my layout...


<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='friends_left'>

<div id="countrydivcontainer" style="border:1px solid gray; width:450px; margin-bottom: 1em; padding: 10px">
<!-- ajaxContent -->
</div>

</td>

<td class='friends_right' valign="top">

<form action='user_friends.php' method='post' name='searchform'>
<input type='text' maxlength='100' style="width: 148px;" class='text' id="search" name='search' value='Search Friends' autocomplete="off">
</form>

<div id="countrytabs" class="shadetabs2">
<div><a href="friendsall.php" rel="countrycontainer"><div class="shadewidth">All Friends</div></a></div>
<div><a href="user_friends_requests.php" rel="countrycontainer"><div class="shadewidth">Friend Requests</div></a></div>
<div><a href="user_friends_requests_outgoing.php" rel="countrycontainer"><div class="shadewidth">Outgoing Requests</div></a></div>
<div><a href="phonebook.php" rel="countrycontainer"><div class="shadewidth">Phonebook</div></a></div>
<div><a href="invite.php" rel="countrycontainer"><div class="shadewidth">Find Friends</div></a></div>
</div>

</td>
</tr>
</table>


{literal}
<script type="text/javascript">
<!--
var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()
//-->
</script>
{/literal}

I've read a few posts regarding the same thing but I'm having a hard time understanding this..do we have to edit the actual form page? In this case "user_friends.php" Tried a few different things but can't get it to work, any help is much appreciated! Thanks :)