开发者

Send formdata through jQueryUI Tabs?

开发者 https://www.devze.com 2023-04-12 13:15 出处:网络
In the page ?p=u I have the following tabs: <div id=\'tabs\' class=\'ui-tabs\'> <ul class=\'u开发者_C百科i-tabs-nav\'>

In the page ?p=u I have the following tabs:

<div id='tabs' class='ui-tabs'>
  <ul class='u开发者_C百科i-tabs-nav'>
    <li><a href='/?p=clt'>Item<span>&nbsp;</span></a></li>
    <li><a href='/?p=clt&a=mail'>Item<span>&nbsp;</span></a></li>
    <li><a href='/?p=clt&a=admin'>Item<span>&nbsp;</span></a></li>
    <li><a href='/?p=clt&a=add&n=<%=n%>'>Item<span>&nbsp;</span></a></li>
  </ul>
</div>

In the page ?p=clt&a=add I have a pretty simple scenario:

if n = "added" then
  "post to database"
else
  "show formular":
  <form method='post' action='/?p=u&amp;n=added'>
    "inputs and such"
  </form>
end if

My problem is, that I dont get ANY of the inputs data through the tab when the form is submitted. What goes wrong?


Well, it might be cause you are trying to use both POST and Get variables in request?

Try to replace variables from the form's action with hidden inputs instead.

<form method='post' action='/?p=u&amp;n=added'>
   <input type="hidden" name="p" value="u" />
   <input type="hidden" name="n" value="added" />
   "inputs and such"
</form>
0

精彩评论

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

关注公众号