Results 1 to 5 of 5

Thread: Tab Content Script using it with form tag

  1. #1
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Tab Content Script using it with form tag

    Tab Content Script

    http://www.dynamicdrive.com/dynamici...tabcontent.htm

    i use that script with asp.net but there is a problem. i cant call a page contain <form id="form1" runat="server">. if i delete that row then it success but aspx page crash down. (gridview must be placed inside a form tag with runat=server). js error row is "document.getElementById(containerid).innerHTML=page_request.responseText" and says undefined error.

    how i can fix the problem?
    thanks

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You might get more help in an asp.net forum. I can tell you that the runat="server", as far as I know only works as an asp page is loading. When using Ajax or any dynamically added content, it would be meaningless at best. If you want your content parsed by the server, it would need to be loaded into a window, a frame or an iframe, not a division as is the case with this script. But, as I say, check with an asp.net forum somewhere as there may be a workaround.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    it's not asp.net problem. if i use htm page contain <form> tag, i see same error.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Then I misunderstood your question. Validate your markup. Especially with the form tag and with tables (but also with all types of markup), if the imported content is invalid and/or the page's markup that you are importing to is invalid, some (if not all, depending upon how bad the errors are) browsers just can't parse the resulting HTML.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i fixed the problem like that;

    function loadpage(page_request, containerid){
    if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
    document.getElementById(containerid).innerHTML=page_request.responseText.replace(/<form/, "<orm")
    }

    form is not important for me only asp.net wants it, so i replaced it.

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
  •