Results 1 to 5 of 5

Thread: Dynamic content in Ajax Tab Content

  1. #1
    Join Date
    May 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Dynamic content in Ajax Tab Content

    1) Script Title:
    Dynamic Ajax Content

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...axtabscontent/

    3) Describe problem:
    I have loaded the dynamic form inside tab that has and select -dropdown in top of the page. Depending on the selected value I wan't to refresh the forms content. Is it even possible to handle dynamic content with ajaxtabcontent?

    Code:
    <form action="?action=update" method="post" name="myForm">
    Filter by Site:
    <select name="condition" onchange=myForm.submit(); >
    <option Value="0">Main site</option>
    <option Value="1">CodeBase</option>
    <option Value="2">Subsite 1</option>
    </select>
    </form>
    Render the Value of option here

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

    Default

    I don't see how this is directly related to the Ajax Tabs content though? In general you can use Ajax to make a POST request, such as for a form, though you're certainly looking at custom coding it based on how your form is coded and what you wish to accomplish.

    You can take a look at Basic Ajax Routine, near the bottom of the page on POST requests.

  3. #3
    Join Date
    May 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default No need to ajax

    Quote Originally Posted by ddadmin View Post
    I don't see how this is directly related to the Ajax Tabs content though? In general you can use Ajax to make a POST request, such as for a form, though you're certainly looking at custom coding it based on how your form is coded and what you wish to accomplish.
    The problem is that everytime I change the dropdown to another the page posts the form back to server and returns the same default value.. not the selected one.

    So I can't actually change the rendered output by selecting it from the dropdown. The AjaxContentTab renders everytime the firstone (default) - and gives no possibility to change its output..
    Last edited by wroxbox; 11-22-2006 at 11:16 AM. Reason: added image

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

    Default

    The issue here is that Ajax Tab Content returns the source of an external page, which is static, not any changes made to it dynamically on the client side (by JavaScript) for example. You'll need to get a little creative to have your main page somehow recognize that a change has been made to the drop down menu, and update the menu per the change.

  5. #5
    Join Date
    May 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok.

    I managed to create it with javascript. Added a condition parameter to form and inserted onchange function that redirects user back to itself with another parametervalue.

    The maqic was added to the tabbuilder page: It can now insert the parameter to the href="external.asp?condition=whatever" ..

    Thanks!!!

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
  •