Go Back   Trackpads Community > General Discussions > Computer and Technology > Web Design

Web Design Forums and discussions on webdesign

Web Design

Reply
 
LinkBack Thread Tools
Old 06-24-2005, 04:00   #1 (permalink)
Steve Horrillo
Civilians

 
Default Java Popup on Leave Problem

I'm also having trouble with a popup on leave javascript. It seems that it
pops up when I browse to another page instead of waiting till I completely
leave my site. What am I doing wrong. Mind you, I'm using Front Page. I have
it installed at www.over100percent.com. Here's the script I'm putting into
the head section. Does this need to be on every page?

I HAVE THIS IN THE HEAD...

<script language="JavaScript">

<!-- Begin
function leave() {
window.open('http://over100percent.com/popup_on_leave.htm','','toolbar=no,menubar=no,loca tion=no,height=385,width=300');
}
// End -->
</script>


THEN IN THE BODY I HAVE...


<BODY onUnload="leave()" style="text-align: left"><div align="left"><font
size="2" face="Arial" color="black"><SCRIPT LANGUAGE="JavaScript">




--
Warmest regards,

Steve Horrillo, Realtor / CEO / C.Ht.
http://brokeragenttraining.com (Advanced training for real estate
professionals)
http://over100percent.com (Realtors earn over 100 percent)
http::/hipfsbo.com (A helpful place for the serious home seller or buyer who
is open to new ideas)
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Trackpads Information
Click to Visit
Old 06-24-2005, 04:00   #2 (permalink)
microchip
Civilians

 
Default Re: Java Popup on Leave Problem

1.Yet again, you forgot the <!---------begin slashes

2.That is how the script is supposed to work.

3.You could put a "Exit Site" button on your site that leads to a page
that says "Thanks for visiting" or something like that, and you can put
the script on that page. Other than that, I see no other way using only
JS.

 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-24-2005, 04:00   #3 (permalink)
Mark Parnell
Civilians

 
Default Re: Java Popup on Leave Problem

Previously in alt.html,comp.lang.javascript,alt.www.webmaster, Steve
Horrillo <usenet@stephenhorrillo.com> said:

http://www.dannyg.com/ref/javavsjavascript.html

> I'm also having trouble with a popup on leave javascript.


They don't trouble me. Doesn't your browser block popups? :-P

> What am I doing wrong.


Where do I start? :-)

> Mind you, I'm using Front Page.


Well, there's the first answer to your previous question, though not
necessarily relevant to this post as such.

> It seems that it
> pops up when I browse to another page instead of waiting till I completely
> leave my site.


Correct.
"The onunload event occurs when the user agent removes a *document* from
a window or frame." (emphasis mine)
http://www.w3.org/TR/html401/interac...#adef-onunload

How are you supposed to know whether they are leaving the current page
to go to another page on your site, or to a different site? More to the
point, why do you think you have a right to know?

--
Mark Parnell
http://www.clarkecomputers.com.au
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-24-2005, 04:00   #4 (permalink)
Mark Parnell
Civilians

 
Default Re: Java Popup on Leave Problem

Previously in alt.html,comp.lang.javascript,alt.www.webmaster, microchip
<verymicrochip@gmail.com> said:

> 1.Yet again, you forgot the <!---------begin slashes


Just get rid of the HTML comment altogether. It's not necessary.

--
Mark Parnell
http://www.clarkecomputers.com.au
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-24-2005, 04:00   #5 (permalink)
Noozer
Civilians

 
Default Re: Java Popup on Leave Problem


"Steve Horrillo" <usenet@stephenhorrillo.com> wrote in message
news:hIKue.825$wm.508@bignews4.bellsouth.net...
> I'm also having trouble with a popup on leave javascript. It seems that it
> pops up when I browse to another page instead of waiting till I completely
> leave my site. What am I doing wrong. Mind you, I'm using Front Page. I

have
> it installed at www.over100percent.com. Here's the script I'm putting into
> the head section. Does this need to be on every page?


A) Popup's are evil... Why do you feel the need to bother your user?

B) The script is working as it should... You leave that page (regardless of
what else is in the browser) so it fires the event.

C) If you using Frames (also evil) why the need for a popup?

Thx!


 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-24-2005, 08:00   #6 (permalink)
mark | r
Civilians

 
Default Re: Java Popup on Leave Problem

thats just EVIL

if someone wants to leaved your site, why annoy them with advertising

mark
www.iosilver.co.uk
Sterling Silver Jewellery
"Steve Horrillo" <usenet@stephenhorrillo.com> wrote in message
news:hIKue.825$wm.508@bignews4.bellsouth.net...
> I'm also having trouble with a popup on leave javascript. It seems that it
> pops up when I browse to another page instead of waiting till I completely
> leave my site. What am I doing wrong. Mind you, I'm using Front Page. I

have
> it installed at www.over100percent.com. Here's the script I'm putting into
> the head section. Does this need to be on every page?
>
> I HAVE THIS IN THE HEAD...
>
> <script language="JavaScript">
>
> <!-- Begin
> function leave() {
>

window.open('http://over100percent.com/popup_on_leave.htm','','toolbar=no,me
nubar=no,location=no,height=385,width=300');
> }
> // End -->
> </script>
>
>
> THEN IN THE BODY I HAVE...
>
>
> <BODY onUnload="leave()" style="text-align: left"><div align="left"><font
> size="2" face="Arial" color="black"><SCRIPT LANGUAGE="JavaScript">
>
>
>
>
> --
> Warmest regards,
>
> Steve Horrillo, Realtor / CEO / C.Ht.
> http://brokeragenttraining.com (Advanced training for real estate
> professionals)
> http://over100percent.com (Realtors earn over 100 percent)
> http::/hipfsbo.com (A helpful place for the serious home seller or buyer

who
> is open to new ideas)



 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-24-2005, 12:00   #7 (permalink)
Hywel Jenkins
Civilians

 
Default Re: Java Popup on Leave Problem

In article <1119582776.939861.309600@g43g2000cwa.googlegroups .com>,
verymicrochip@gmail.com says...
> 1.Yet again, you forgot the <!---------begin slashes


Yet again you forgot to quote the message to which you're replying.

--
Hywel

Kill the Crazy Frog
http://www.petitiononline.com/crzyfrg/
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Preview and Java Ppplet Problem artlab Web Design 0 08-09-2005 00:00
Re: Send to A Friend And Java Problem VK Web Design 1 07-12-2005 20:00
Re: Send to A Friend And Java Problem Stewart Gordon Web Design 0 06-24-2005 16:00
Re: Send to A Friend And Java Problem microchip Web Design 0 06-24-2005 04:00
POPUP BOX Arnie Microsoft Applications 1 06-16-2004 10:24


Community Information
Options
Quick Options
Trackpads Non-Commercial Ad
Copyright Information Click to Visit
Time
Server Time
All times are GMT -4. The time now is 20:49.
Copyright
Copyright Information
The header is based off of work by Vipixel.com and modified by this site. Trackpads and the Trackpads Logo are both Registered Trademarks of Jason Edwards and cannot be used without prior written permission.  The only exception is as a link back to this site. Trackpads is a private website run by a small legion of volunteers, 3 dogs, 12.5 cats and an army of small, super smart, bio-engineered mice with pointy hats and tutu's. Search Engine Friendly URLs by vBSEO 3.2.0 RC7
Archive Links
Archive Links
Page generated in 0.97135 seconds with 19 queries