0


I am facing issue in chrome.
I have one placeholder in aspx page.In that placeholder I am adding :

<div><img src="/Images/SocialIcon/facebook48.png" id="facebooklink" alt="F" class="socialmedia" onclick="javascript:FacebookShareClick(\'https://www.facebook.com/dialog/feed?app_id=147229178787815&amp;link=http://youtu.be/KadDNFXn6kQ&amp;name=April Sweeps&amp;caption=April Sweeps by H.H.Gregg&amp;description=sdfs dsf&amp;redirect_uri=http://localhost:50314/FacebookResponse.aspx\');"></div>

It works perfect in firefox but giving error Refused to execute a JavaScript script. Source code of script found within request. in Chrome and in safari. Moreover I am finding the html broken. The onclick attribute is not being set.

Can any one help for this?

Thanks,
Priya

1 Answer 1

1

You are escaping single quotes when it's not needed, which creates a syntax error.

Sign up to request clarification or add additional context in comments.

3 Comments

Doesn't matter, it's wrong. Do things properly and it will reduce the number of errors you do.
I removed escapes. Still the same issue in chrome.
Then check the documentation of the function you're using, and remove the javacript:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.