Overcomming IEs 2083 byte URL restriction

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Skrynesaver
    New Member
    • Apr 2008
    • 4

    Overcomming IEs 2083 byte URL restriction

    Hi all,

    I'm trying to generate an M3U playlist file (series of line separated music resources) from a generated link, this works fine until the number of "characters " in the URL exceeds 2083 at which point IE refuses to play.

    I thought I could code around this by adding a form which javascript fills and submits when the user asks for the playlist.

    Code:
    function submitPlaylistRequest{
       var pListForm=documet.getElementByID('playlistForm');
       pListForm.urls.value=urls;
       pListForm.submit();
    }
    ...
    <form name=doesOtherStuff>
    ...
    <a href="#" onClick="submitPlaylistRequest">Get this List</a>
    ...
    </form>
    <form id="playlistForm" method="post"  action="/Playlist" target="_self">
       <input name=urls value="noneYet">
    </form>
    Unfortunately IE won't auto-prompt for download for this request unless the site is specifically whitelisted in the security settings, though it did when the data altered the href of the link.

    So to the question, (at last), has anyone else encountered this and if so is there an established way of coding around it?

    Thanks in advance, Skrynesaver.
  • Skrynesaver
    New Member
    • Apr 2008
    • 4

    #2
    Hi all,

    Sussed it, ahh that wonderful feeling of outwitting my incompetence ;)

    By setting the link href to the action of the form IE co-operates, (this was set dynamically in the actual code, (not quite that incompetent).



    Code:
    function submitPlaylistRequest{
       var pListForm=documet.getElementByID('playlistForm');
       pListForm.urls.value=urls;
       pListForm.submit();
    }
    ...
    <form name=doesOtherStuff>
    ...
    <a[B] href="/Playlist[/B]" onClick="submitPlaylistRequest">Get this List</a>
    ...
    </form>
    <form id="playlistForm" method="post"  action="/Playlist" target="_self">
       <input name=urls value="noneYet">
    </form>
    Hope this solves someone elses problem @ some stage.

    Cheers, Skrynesaver

    Comment

    Working...