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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:22:55+00:00 2026-06-03T12:22:55+00:00

I Am using the jquery below and witht he addition of .replace(,, ) to

  • 0

I Am using the jquery below and witht he addition of .replace(“,”, ” “) to the var video_tags=data.tags doesn’t return a value. how can i replace the commas with spaces.

http://jsfiddle.net/hJGe4/1/

$(document).ready(function () {
    $(".search_input").focus();
    $(".search_input").keyup(function () {
        $("#video").html('');
        var search_input = $(this).val();
        var keyword = encodeURIComponent(search_input);
        var yt_url = 'http://gdata.youtube.com/feeds/api/videos?q=' + keyword + '&format=5&max-results=6&v=2&alt=jsonc';
        $.ajax({
            type : "GET",
            url : yt_url,
            dataType : "jsonp",
            success : function (response) {
                if (response.data.items) {
                    $.each(response.data.items, function (i, data) {
                        var video_title = data.title;
                        var video_tags = data.tags.replace(",", " ");
                        var final = video_title + '<br/>' + video_tags + '<br/><br/><br/>';
                        $("#video").append(final);
                    });
                } else {
                    $("#video").html("<div id='no'>No Video</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-03T12:22:57+00:00Added an answer on June 3, 2026 at 12:22 pm

    var video_tags=data.tags.replace(",", " ");

    should be

    var video_tags=data.tags.join(" ");

    DEMO

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

Sidebar

Related Questions

Using JQuery or Javascript how would I return 'Mary Boone' from the xml below
I am using JQuery 1.4.2, below code was working before with JQuery 1.3, can
Using jQuery autocomplete.. Want to replace hello in script below with javascript to identify
I using jQuery Ajax like below: $.ajax({ url: 'servlet/*****Servlet', dataType: text, success: function(data) {
I am using jquery to create a custom dropdown with the code below. I
i am adding collection of radio buttons to my page using jQuery below $(document).ready(function()
I'm using the jQuery code below to launch an overlay div and it works
I am using the below jquery code to call a ajax function in my
I am using jquery datepicker, please see below code $(document).ready(function() { $(.txtDate).datepicker({ showOn: 'button',
I would like to do below validations for single file uploaded using jQuery Uploadify

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.