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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:11:13+00:00 2026-06-01T08:11:13+00:00

I am unable to set json value to scr attribute of embed tag from

  • 0

I am unable to set json value to scr attribute of embed tag from javascript file.

$.getJSON(“url”,function(data){

 jsonMovies = data.Movies;
 $.each(data.Movies, function(index,value){
     numofMovs[i]= index;
     if (numofMovs[i] == 'Movie6')
     {
        var parent = $('embed#video1').parent();            
        $('embed#video1').remove();             
        parent.append('<embed type="video/mp4" width="200px" height="200px" id = "video1"           
        src=value.Video />');   
     }
}

}
Please let me know the correct syntax for including the json value in src attribute (src=value.Video).

Thanks,
Surabhi

  • 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-01T08:11:14+00:00Added an answer on June 1, 2026 at 8:11 am

    You need to concatenate the value into the string:

    parent.append('<embed type="video/mp4"
          width="200px"
          height="200px"
          id="video1"
          src=' + value.Video + '/>');
              ^^^^^^^^^^^^^^^^^^^
    

    There’s a considerable difference between:

    x = 'hello';
    alert(x);   // shows hello
    alert('x'); // shows x
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Error: Unable to read data from the transport connection: A blocking operation was interrupted
I am unable to set default value for a dropdown while loading forms. Here
I am unable to set my custom php session saving path from inside an
I am unable to set the value for the textfield which is inside fieldcontainer.
I am trying to parse a dictionary from a json file as follows {
I have to return data fetched from MySQL table into a php file as
My function returns a bunch of attribute ids and it's corresponding names in json
I am unable to set my inbuilt database to update . It is always
I am using Apache Hadoop (hadoop-0.20.203.0) and unable to set sticky bit for /tmp
I have created a divider in JSplitPane . I am unable to set the

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.