I am working on a project in which i give a code
to user he will embed that link in his site and some content
of my site will show on his site .Following is the code
<div id="survey">
<div>
<script type="text/javascript" src="www.example.com/exampleaction"> </script>
</div>
</div>
In c#
public ActionResult exampleaction(){
// Some thing to do which returns javascript as a source
}
and following is the javascript code that written in my file which i want to
send
if(document.getElementById('survey'))
{document.getElementById('survey').style.border='1px solid #ccc';
document.getElementById('survey').style.padding='4px';
document.getElementById('survey').style.width='500px';
document.getElementById('survey').style.fontSize='10px';
document.getElementById('survey').style.color='#666';
}