Results 1 to 2 of 2

Thread: Tabbed Div script problems when using mod-rewrite

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

    Default Tabbed Div script problems when using mod-rewrite

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

    Hiya,

    I've implemented this on a site I've been writing (www.financial-gurus.com) and it has been working fine. I've decided to use a mod-rewrite rule to format the URL in a nicer fashion when going to a specific guru's profile. This seems to have screwed up the tabber script causing it to display none of the content.

    By viewing source, I can see the content is all there (so the re-write rule is working and the content is being fetched from the DB), but it remains hidden.

    If I remove the entry

    Code:
    .tabcontent{
      display: none;
    }
    ...then all content is displayed (as you might expect) and if I call the page straight with the $_GET variable, it works fine. If anyone can shed any light on how the rewrite could be affecting this script, i'd be very grateful.

    http://www.financial-gurus.com/profile.php?guru=2124 - standard page, no rewrite, working fine.

    http://www.financial-gurus.com/gurus...an_Davis/2124/ - with the SE friendly re-write, no showing content, but if you view source the content is there.

    Thanks in advance.

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

    Default

    Firstly, please note that your page is currently in violation of our usage terms, since the credit notice doesn't appear inline on the page. Please reinstate the credit notice.

    Regarding your question, make sure the reference to tabcontent.js within your page is an absolute URL:

    Code:
    <script type="text/javascript" src="http://mysite.com/subdir/tabcontent.js">
    </script>
    URL rewritting modifies the URL virtually, but references to .js files must still be to their original, true locations.

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
  •