Homerun04
January 6th, 2003, 02:06 PM
I'll admit it up front --- I am a major rookie when it comes to programming, including JS. I have been playing around with HTML and JavaScripting, and needed some assistance.
I have created a confirm box to load in the <body> of my page. I want to limit the "opening" of this box to only happen the first time a visitor opens our page per browser session. In other words, the confrm box is on our home page, and we do not want this conform box to open up everytime someone returns back to our homepage during their current session.
My suspicions tell me this is a cookie management issue, but I have yet to play with cookies. The confirm box is tied to an IF...THEN...ELSE statement to redirect our visitors to (2) different url's should they choose.
I was hoping a "guru" could show me how to accomlish this? Or perhaps, if easy, even send me an example of coding to accomplish this. Thanks so much.......:-)
Here is the code I currently have...
--------------------------------------------------------------------
<head>
<script language="JavaScript">
function wish1() {var decision = confirm("Do you want to Create a Wish List?"); if (decision == true){document.location="http://www.our-cause.com/development/wishlist_explaination.htm";} else {var decision2 = confirm("Do you want to Search for a Wish List?"); if (decision2 == true){document.location="http://our-cause.com/Merchant2/merchant.mv?Store_Code=Main&Screen=SRCHWISH&Category_Code="};}}
</script>
</head>
<body>
<body onLoad="boxes()">
<script language="JavaScript"> function boxes() {var decision = confirm("Hello, and welcome to Our-Cause. Do you want to head directly to Our-Store?"); if (decision == true){document.location = "http://www.our-cause.com/Merchant2/merchant.mv?Screen=SFNT&Store_Code=Main";} else {document.location = "#";}}</script>
</body?
-------------------------------------------------------------------------
[Goodz13:Moved From Java Section]
I have created a confirm box to load in the <body> of my page. I want to limit the "opening" of this box to only happen the first time a visitor opens our page per browser session. In other words, the confrm box is on our home page, and we do not want this conform box to open up everytime someone returns back to our homepage during their current session.
My suspicions tell me this is a cookie management issue, but I have yet to play with cookies. The confirm box is tied to an IF...THEN...ELSE statement to redirect our visitors to (2) different url's should they choose.
I was hoping a "guru" could show me how to accomlish this? Or perhaps, if easy, even send me an example of coding to accomplish this. Thanks so much.......:-)
Here is the code I currently have...
--------------------------------------------------------------------
<head>
<script language="JavaScript">
function wish1() {var decision = confirm("Do you want to Create a Wish List?"); if (decision == true){document.location="http://www.our-cause.com/development/wishlist_explaination.htm";} else {var decision2 = confirm("Do you want to Search for a Wish List?"); if (decision2 == true){document.location="http://our-cause.com/Merchant2/merchant.mv?Store_Code=Main&Screen=SRCHWISH&Category_Code="};}}
</script>
</head>
<body>
<body onLoad="boxes()">
<script language="JavaScript"> function boxes() {var decision = confirm("Hello, and welcome to Our-Cause. Do you want to head directly to Our-Store?"); if (decision == true){document.location = "http://www.our-cause.com/Merchant2/merchant.mv?Screen=SFNT&Store_Code=Main";} else {document.location = "#";}}</script>
</body?
-------------------------------------------------------------------------
[Goodz13:Moved From Java Section]