0

I am throughly confused....why does this seemingly simple deal not work?

<script type="text/javascript">
<!--
window.onbeforeunload = function (){
	var checkboxImg = new Image();
	var checkboxImgUrl = "checkbox.php%3Flonger%3D" + reviews-chk-longer.checked +
                    "%26discrete%3D" + reviews-chk-discrete.checked + 
                    "%26natural%3D" + reviews-chk-natural.checked +
                    "%26thicker%3D" + reviews-chk-thicker.checked +
					"%26permanent%3D" + reviews-chk-permanent.checked +
					"%26stamina%3D" + reviews-chk-stamina.checked +
					"%26harder%3D" + reviews-chk-harder.checked +
					"%26vascularity%3D" + reviews-chk-vascularity.checked +
					"%26drive%3D" + reviews-chk-drive.checked +
					"%26guarantee%3D" + reviews-chk-guarantee.checked +
					"%26trials%3D" + reviews-chk-trials.checked +
					"%26affordable%3D" + reviews-chk-affordable.checked;
	alert(checkboxImgUrl);
	checkboxImg.src = checkboxImgUrl;
}
// -->	
</script>

I get no alert when I do this....the same thing without all of the added strings works fine, ie:

<script type="text/javascript">
<!--
window.onbeforeunload = function (){
	var checkboxImg = new Image();
	var checkboxImgUrl = "checkbox.php";
	alert(checkboxImgUrl);
	checkboxImg.src = checkboxImgUrl;
}
// -->	
</script>

The alert pops just fine....what is up??? What am I missing?

I tried .concat the strings too...still same thing is happening...why?

Edited by SerjSagan: n/a

2
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by SerjSagan
0

Man what is up with DaniWeb???? 25 views and not even 1 reply....comeon!!!!

-1

Wow...so far...DaniWeb has been totally useless to me...almost 30 posts...and no help AT ALL!!! Even for something that is as simple as this!!!! Soooo frustrating!!!

0

I didn't bother to read this thread until now because it already already had 3 replies when I first saw it.

You shot yourself in the foot.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.