Results 1 to 4 of 4

Thread: Ajax tabs - form actions targeting specific tab

  1. #1
    Join Date
    Sep 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ajax tabs - form actions targeting specific tab

    1) Script Title: Ajax Tabs

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

    3) Describe problem: My Form action (already within a tab) just opens the page in a new window instead of targeting the tab... how do I make forms within the tab reload the tab and not the whole page?

  2. #2
    Join Date
    Sep 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have tried these things:

    <form action="javascript: countries.loadajaxpage('mypage.php')" method="post">
    Result: Reloads tab but without posting variables

    <form action="mypage.php" target="_self" method="post">
    Result: Reloads entire page

    <INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=SUBMIT onclick="javascript: countries.loadajaxpage('mypage.php')" />
    Result: Reloads tab but without posting variables

  3. #3
    Join Date
    Sep 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    oh and I tried this and it didnt pass the variables either... now I will let someone else advise me from here .. I really need help with this. Thanks

    <form action="content.php?countrytabs=0" method="post">

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    One easy way is just to use the IFRAME mode of displaying the tab contents. When a form inside one of these contents is submitted, the result naturally stays inside the IFRAME.

    Without using the IFRAME mode, the other method requires that you modify your form so its results are returned as Ajax content, and shown inside the desired DIV content container.
    DD Admin

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •