Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6225893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:55:40+00:00 2026-05-24T08:55:40+00:00

I have a php-script, which uploads mp3-files on my server. I use ‘uploadify’ for

  • 0

I have a php-script, which uploads mp3-files on my server. I use ‘uploadify’ for it. There is an event ‘onSelect'(documentation), which called when file has been uploaded. Using it I want to refresh playlist dynamically after each file’s uploading.

But my function from ‘onselect’ field throws an error ‘unterminated string literal’. After long searching I make my one-line function instead multi-line(breaklines have been added here for the convenience) and add slashes before double quotes.

function() {$('#response').append("
<script type=\"text/javascript\">
    var flashvars = {url:'./media/audio/users/126/md6xs4cv8ks0.mp3',artist:'Undef', track:'Undef', duration:''};
    var Params = {};
    var attributes = {};
    swfobject.embedSWF(\"min.swf\", \"myAlternativeContent1\", \"320\", \"40\", \"9.0.0\", false, flashvars, params, attributes);
</script>
<div id="myAlternativeContent1">
    <a href="http://www.adobe.com/go/getflashplayer">
    <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
    </a>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:55:43+00:00Added an answer on May 24, 2026 at 8:55 am

    Contrary to the other answers, string literals can contain line breaks, they just need to be escaped with a backslash like so:

    var string = "hello\
    world!";
    

    However, this does not create a line break in the string, as it must be an explicit \n escape sequence. This would technically become helloworld. Doing

    var string = "hello"
    + "world"
    

    would be much cleaner

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a script which uploads data to my web server running Apache/PHP 5.3,
I have a very large script which contains a lot of php files, so
I have a php script which uploads images to a temporary folder on the
the procedure: i have a script which uploads images (via hmtl-form and php) for
I have index.php which uploads a file to server and sets several PHP variables
I have created a custom PHP script which uploads information submitted by a form
I have a php script which uses this below when a user uploads a
I have a php script which accesses a MSSQL2005 database, reads some data from
I have a PHP script which executes a shell command: $handle = popen('python last',
I have this PHP script which i'm grabbing images from a directory and displaying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.