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 8599943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:30:23+00:00 2026-06-12T01:30:23+00:00

Am trying to call a function with this line find(\” + news_text + ‘\’)

  • 0

Am trying to call a function with this line find(\” + news_text + ‘\’) but it gives me

SyntaxError: unterminated string literal

the string might looks like this:”Barnes & Noble to launch video service for Nook\r http://t.co/NTnycGYD”

Here is the code which am tackling with the problem:

            function show(news_user, news_date, news_profile_img, news_text, news_url, user_tweets) {
                $('#news-tweets')
                    .css({
                    'overflow-y': 'scroll',
                    'overflow-x': 'hidden'
                });

                $('#news-tweets')
                    .append('<div class="tweets"><div class="user">' + news_user + '</div><div class="date">' + news_date + '</div>\
          <span class="clear">\
          </span><div class="img"><a href="' + news_profile_img + '" target="_blank"><img src="' + news_profile_img + '" width="55" height="50"/>\
          </a></div>\
          <div class="text">' + news_title + '<br /><a onclick="find(\'' + news_text + '\')">Show user tweets..</a></div></div>');
            }

            function find(news_text) {
                $('#user-news-tweets')
                    .html("");
                for (var x = 0; x < user_tweets.length; x++) {
                    var user = user_tweets[x].user;
                    var date = user_tweets[x].date;
                    var profile_img = user_tweets[x].user_profile_img;
                    var url = user_tweets[x].url;
                    var text = user_tweets[x].text;
                    var text3 = text.replace(/\r"\/:\.`'/g, "");
                    if (text3.indexOf(news_text.substr(0, 10)) > -1) {
                        $('#user-news-tweets')
                            .css({
                            'overflow-y': 'scroll',
                            'overflow-x': 'hidden'
                        });
                        $('#user-news-tweets')
                            .append('<div class="tweets"><div class="user">' + user + '</div><div class="date">' + date + '</div>\
                        <span class="clear"></span><div class="img"><a href="' + profile_img + '" target="_blank">\
                        <img src="' + profile_img + '" width="55" height="50"/></a></div>\
                        <div class="text">' + text + '<br /></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-06-12T01:30:25+00:00Added an answer on June 12, 2026 at 1:30 am

    Try terminating the string, like what the error said.

    find('\' + news_text + '\')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to troubleshoot this, but can't find a good function that will
I'm trying to call a function that contains jQuery code. I want this function
I am trying to call terminate function. [I think this function gets called when
I am trying to do the following: function main(callback) { $.ajax('server-side', function() { this.callback.call(hello);
Trying to interpret this error and why it is happening: Call to undefined function
I am trying to call a function, but am running into some struggles with
I have been trying to find the answer to this simple question - but
I'm trying to call a function present in one class from another class by
I am trying to call c# function from javascript the code i have tried
I'm trying to call a function called animateRight in a file called ScanAnimation.m from

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.