开发者

Help with Submit form. Loading results into content div

I'm using this tab script from Dynamic Drive. Here's the URL...

http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm

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="shadewidt开发者_JS百科h">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}

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 :)


What you try to do is out of scope of the ajaxtabscontent, you should probably have a look for ajax call which would on finish fill the countrydivcontainer.

For a start I would sugest using jQuery.post().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜