Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: need a mod to the sidepanel script

  1. #11
    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

    That's not what I meant. However, strict HTML rules state that spaces in a filename should be represented by %20 tokens when used as an href or src attribute. Ignoring this often will have no consequences, but when it does it can be hard to track down.

    It's not a problem with the mp3's apparently because they're quoted strings sent to a function, all in javascript, no HTML involved.

    What I meant though was that if the imported files's filename has a space in it, regardless if that space is represented by %20, my method will fail.

    Like if 'list1960.html' were 'list 1960.html', then there would be a problem.

    But yes, when using filenames in HTML for href and/or src attributes, and there are spaces in them, those should be represented in the HTML as %20 tokens.

    I avoided that problem in my scheme by adding them via javascript. But, as I say it would still be a problem if the fetched file filename itself has a space in it
    - John
    ________________________

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

  2. #12
    Join Date
    Feb 2011
    Posts
    55
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Just one more nitpickin item for you to work on.
    Numbers in the division ID name cause a 404.
    #itemA is ok.
    #item1 is not.

  3. #13
    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

    No, at least not in a way I can easily replicate.

    For instance, if I change the id on the under construction image from 'under' to 'item1' and change the URL to fetch it to "1960-list.htm #item1", it works fine once the file with the id="under" is cleared from cache.

    That may be the problem. To prevent that, one could add this code to the 'top' page after the external tag for jQuery:

    Code:
    <script type="text/javascript">
    jQuery.ajaxSetup({
    	cache: false
    });
    </script>
    But once you get your external content page(s) setup to your satisfaction and published, you should remove it because it forces the browser and the server to fetch the page each time. If the external page isn't changing, that's a waste of time and bandwidth.

    If you use a selector like #item1 and there's no element by that id in the imported content (either because it's just not there or because a previous version without that id is still in cache), you won't get a 404, but you won't get any content either.

    If you're actually seeing a 404 error page, then most likely the external page's base URL itself is a 404 Not Found.

    If there's some other problem with this that I've missed, and/or you want more help with it, please put up a demo of it so I can check it out.
    - John
    ________________________

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

  4. #14
    Join Date
    Feb 2011
    Posts
    55
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the tip. Works fine now with numbers in the ID.

    http://mroldies.net/Jan-4-1960.html

  5. #15
    Join Date
    Feb 2011
    Posts
    55
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Stranger and stranger it gets.
    I've made up an entire page with working links for all the items.
    Now when you click on a song, it eventually reports "file not found".
    Click on them again. The second one shows up fine.
    The first shows up with "file not found" and yet is playing?
    click the close button and the tune conitinues.
    This is driving me insane I tell ya doc. The question is, in which script is the problem?

    Oh, only the first four have the tunes. the others are not posted yet.

  6. #16
    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

    I'm not having that problem with that (Jan-4-1960.html) page. I do notice you're moving around and renaming the mp3 files. When you do that, you have to make sure that you update them in the external page. Even then there could be an old copy of the page in the browser's cache.

    I am noticing that it takes like forever to load in Opera. This seems to be related to the size of the external file and that it's loading all the instances of mroldies.net/audioplayer/player.swf before choosing the one you want and placing it in the slider.

    This looks like it's happening in other browsers too, but the delay isn't nearly as noticeable.

    I have a new version of the script that looks like it fixes that. It also uses a different method of passing the selector id, one which will be valid with any URL, is valid itself in HTML 5 and restores the link's ability to function as an ordinary link when javascript is not present - all things that had been lost in the last versions.

    Instead of:

    Code:
    <a href="http://mroldies.net/list1960.html #item1" rel="ajaxpanel" >
    You do it like:

    Code:
    <a href="http://mroldies.net/list1960.html" data-select="#item1" rel="ajaxpanel" >
    I also fixed some inefficiencies and potential errors in the script itself.

    The new script is:

    http://home.comcast.net/~jscheuer1/s...depanel_sel.js

    As you seem to be moving around the mp3 and perhaps other files, I'm not going to put up a live demo at this time. But I've tested it and it works.

    As always, if you want more help:

    Please include a link to the page on your site that contains the problematic code so we can check it out.
    Last edited by jscheuer1; 06-22-2012 at 02:17 PM. Reason: add detail
    - John
    ________________________

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

  7. #17
    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

    Another thing I noticed is that the external page is invalid - tons of closing </div> tags that have no corresponding opening <div> tags. This may be contributing to the load time problem and is causing some browsers to not render anything.
    - John
    ________________________

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

  8. #18
    Join Date
    Feb 2011
    Posts
    55
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I have now tested the page on IE9, opera 12 and seamonkey 2.
    All work just fine.
    Apparenty there is an issue with firefox 9 that is causing the havoc.


    http://mroldies.net/Jan-4-1960.html

  9. #19
    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

    I have Firefox 12 but I think I might know what you mean.

    Rather than guess though, could you just tell me?
    - John
    ________________________

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

  10. #20
    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

    Couldn't you just answer the question?

    What is the problem in Firefox 9? If I had that browser, and assuming this isn't specific to your system, what exactly would I have to do to duplicate what you're experiencing?
    - John
    ________________________

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

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
  •