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

  • Home
  • SEARCH
  • 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 4321796
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T08:47:31+00:00 2026-05-21T08:47:31+00:00

Hi and thanks for looking into this. I have a code I’ve been working

  • 0

Hi and thanks for looking into this.

I have a code I’ve been working on to add videos to my site. All videos are from youtube. Once a user has clicked on submit, a link becomes visible. When clicking on it the user can preview the video.

One week ago I used the following to achieve this:

$("#result").html('<a href="javascript:initPlayer(\'http://www.youtube.com/watch?v=kXhy7ZsiR50\')>Preview video</a><br>');

Everything worked fine. But today I was trying the script and the link doesn’t appear anymore. The link works however fine if I do something like:

<a href="javascript:initPlayer('http://www.youtube.com/watch?v=kXhy7ZsiR50')">Preview video</a>

Somewhere on the page.

I don’t know why the call with jQuery doesn’t work anymore. It worked fine when I was developing the website. I tried it on different browsers, but with the same result in the end.

Anyone any idea how to solve this? I’m starting to pull out my hair. 🙂

Thanks in advance.

  • 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-21T08:47:32+00:00Added an answer on May 21, 2026 at 8:47 am

    This seems to work fine:

    $("#result").html("<a href='javascript:initPlayer(\"http://www.youtube.com/watch?v=kXhy7ZsiR50\")'>Preview video</a><br>");
    

    I think it’s a double/single quotes problem. Everything is back to normal.

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

Sidebar

Related Questions

I have been looking at the Windows API Code Pack 1.1 and have seen
thanks for looking. I have a very long list of items, users click on
I'm looking for some guidance/code-snippets/tutorial on passing some simple data into my app. I
I have a question. Recently I was looking into ways to implement hardware rendering
Recently I've begun looking into developing a simple CA/SCEP server. While the CA wasn't
I have read all the blog posts on digital signing and checked out GoDaddy
I'm attempting to move a web app we have (written in Perl) from an
I currently am trying to add tags around certain words in a webpage. This
I'm working on a state based game engine and have something I'm happy with
I'm looking for best practices for sophisticated UI logic implementation. I'm working on a

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.