By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 2,059 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

Overcomming IEs 2083 byte URL restriction

P: 4
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.

Expand|Select|Wrap|Line Numbers
  1. function submitPlaylistRequest{
  2.    var pListForm=documet.getElementByID('playlistForm');
  3.    pListForm.urls.value=urls;
  4.    pListForm.submit();
  5. }
  6. ...
  7. <form name=doesOtherStuff>
  8. ...
  9. <a href="#" onClick="submitPlaylistRequest">Get this List</a>
  10. ...
  11. </form>
  12. <form id="playlistForm" method="post"  action="/Playlist" target="_self">
  13.    <input name=urls value="noneYet">
  14. </form>
  15.  
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.
Apr 4 '08 #1
Share this Question
Share on Google+
1 Reply


P: 4
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).



Expand|Select|Wrap|Line Numbers
  1. function submitPlaylistRequest{
  2.    var pListForm=documet.getElementByID('playlistForm');
  3.    pListForm.urls.value=urls;
  4.    pListForm.submit();
  5. }
  6. ...
  7. <form name=doesOtherStuff>
  8. ...
  9. <a href="/Playlist" onClick="submitPlaylistRequest">Get this List</a>
  10. ...
  11. </form>
  12. <form id="playlistForm" method="post"  action="/Playlist" target="_self">
  13.    <input name=urls value="noneYet">
  14. </form>
  15.  
Hope this solves someone elses problem @ some stage.

Cheers, Skrynesaver
Apr 4 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.