Results 1 to 2 of 2

Thread: Tab Content problem with MVC site

  1. #1
    Join Date
    Apr 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Tab Content problem with MVC site

    I have written a site using Model View Controller methods. What this means is that there may be many different pages all accessed through the same window.location.pathname (ex. /customer.php).

    Unfortunately, I have found the persistence plugin for the Tab Content script ( http://www.dynamicdrive.com/dynamici...tabcontent.htm) does not work properly for me in this environment.

    What should be happening is that the script should pay attention to the args in the URL for the cookiename. For example:

    /customer.php?cmd=list should be one cookie
    and
    /customer.php?cmd=edit should be another

    What is happening now is that both pages "appear" to be the same page to the script.

    Any ideas?

  2. #2
    Join Date
    Apr 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok, I think I found a couple of bugs that are causing my problem. Below are my fixes:

    Issue #1
    ----------------------------
    This line in do_onload fails if there is only one tab:
    initTabcolor=cascadedstyle(tabobjlinks[1], "backgroundColor", "background-color")

    Changing it to this fixed one of my problems:
    initTabcolor=cascadedstyle(tabobjlinks[0], "backgroundColor", "background-color")
    ---------------------------

    Issue #2 - cookie should be built using pathname + search
    ---------------------------
    The line in do_onload() and savetabstate() that reads:
    var cookiename=(persisttype=="sitewide")? "tabcontent" :window.location.pathname

    needed to be changed to:
    var cookiename=(persisttype=="sitewide")? "tabcontent" : escape(window.location.pathname+window.location.search)
    ---------------------------

    I am not sure if this is the proper place for bug reporting of this script. If not, please forward this on to the author.

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
  •