Hey guys!! been a while since I posted here, but thought I'd post this question here cause it is driving me insane!!

if the condition returns true, then that part works.
but if it's false, neither part works.

If I put the content from the else after the <script> (so out of the condition) it runs.
but if i place it before the </script> it doesn't. ???

Any ideas?

Thank you in advance :D

<script type='text/javascript'>
var results = document.cookie.match ( '(^|;) ?sevisitor=([^;]*)(;|$)' );
if (sevisitor == true || results[2] == 1) {
	document.write('<script type="text/javascript"><!--\n\
	google_ad_client = "ca-pub-4654700332384357";\n\
	/* ad_content */\n\
	google_ad_slot = "4239136481";\n\
	google_ad_width = 336;\n\
	google_ad_height = 280;\n\
	<script type="text/javascript"\n\
} else {
	document.write('<style type="text/css">\n\

Nevermind problem solved, it was the cookie causing errors cause it didn't exist yet!! :D


That's all you have to do sometimes.

Post your problem on Daniweb and it sorts itself :icon_idea: