salonauto
01-10-2010, 07:30 AM
Hello! I'm trying to make a custom bbcode. Everything works great except one small problem. Bellow is the replacement.
<script type="text/javascript">
<!--
function dirtypop()
{
var generator=window.open('','name','height=800,width= 600,status=1');
generator.document.write('<html><head><title>popup</title>');
generator.document.write('</head><body>');
generator.document.write('<h1>popoup</h1>');
generator.document.write('<p>{param}</p>');
generator.document.write('<p><a href="javascript:alert(self.location.href)">View the URL of this window</a>.</p>');
generator.document.write('<p><a href="javascript:self.close()">Close</a> the popup.</p>');
generator.document.write('</body></html>');
generator.document.close();
}
//-->
</script>
<a href="javascript:dirtypop();">Generate!</a>
Let's say that the bbcode name is popup. Everything between that bbcode will be opened in a new window.
I don't know why but the link on generate button should look like this javascript:dirtypop() , instead he looks like javascript<b></b>:dirtypop()
Anyone has any idea from where that <b></b> comes from?
Thank you!
<script type="text/javascript">
<!--
function dirtypop()
{
var generator=window.open('','name','height=800,width= 600,status=1');
generator.document.write('<html><head><title>popup</title>');
generator.document.write('</head><body>');
generator.document.write('<h1>popoup</h1>');
generator.document.write('<p>{param}</p>');
generator.document.write('<p><a href="javascript:alert(self.location.href)">View the URL of this window</a>.</p>');
generator.document.write('<p><a href="javascript:self.close()">Close</a> the popup.</p>');
generator.document.write('</body></html>');
generator.document.close();
}
//-->
</script>
<a href="javascript:dirtypop();">Generate!</a>
Let's say that the bbcode name is popup. Everything between that bbcode will be opened in a new window.
I don't know why but the link on generate button should look like this javascript:dirtypop() , instead he looks like javascript<b></b>:dirtypop()
Anyone has any idea from where that <b></b> comes from?
Thank you!