Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Popup Window only when a specified site was not ! visited

Status
Not open for further replies.

CarloD

Technical User
Dec 6, 2001
2
0
0
CH
Hello need your javascript help.

I got a Frame based Homepage.

Page 1 is the index.htm site with the frameset.

My frame homepage has 3 frames

Navigation on the top = top.htm
Navigation on the left = left.htm
Content on the right = content.htm

+ additional info.htm page which is only reachable via a klick from the content.htm page.

Now im searching a javascript, which will open a new popup .htm page,
when a user leaves my homepage,
but dont has visited the info.htm page!

Whats the goal of this javascript ?

I got a very simple homepage.
Over 70 % of the users of my homepage will only look my homepage.
And then leave it but not looking for further informations which are on the info.htm page which it be reachable only with a click.

With the new popup Javascript .htm page i want to ask the visitor,
whats "Bad" on my page ?

The new popup window will ony open when the user hasnt visited the info.htm
page.
If the user visit the info.htm page,
then the the javascript new popup window will stay closed.

Thanks a lot for your help

Bye
Carlo
 
<!-- :) ;-) :) -->
<html>
<head>
<script language=&quot;JavaScript&quot;>
var ViewedInfo = false;
function CheckIfViewed(){
if (!(ViewedInfo)) {
alert('BAD PERSON, you didnt go where I wanted you to go ... So I will take you there');
window.open('Info.html');
}
}
function ShowInfo(){
ViewedInfo = true;
window.open('Info.html');
}
</script>
</head>
<body onUnload=&quot;CheckIfViewed();&quot;>
<form>
<font color=blue>
<a onmouseover=&quot;this.style.cursor='hand';&quot; onclick=&quot;ShowInfo();&quot;><h1>INFO</h1></a>
</font>
</form>
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top