JavaScript question related to the use of ' and "
- by vatismarty
my_window.document.write('
<script type="text/javascript">
function redirect(linkid) {
opener.location.href=linkid;
window.close();
}
</script>
<h1>Hello</h1>
<p>Thank you.If you accidentally closed our website click
<a href="javascript:redirect('http://google.com')">here</font></a>
to go back to our website</p>
');
This is my piece of code to close a already opened pop up window by redirecting it to google.com. I think there is some problem with matching the apostrophes ' and "... how to code with (' (" (' ') ") ')... is this correct? please help me with this.
Please help me with the necessary changes wherever required.