Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
what popup under code without firefiox block?
Old 04-23-2009, 11:21 AM what popup under code without firefiox block?
Experienced Talker

Posts: 32
Trades: 0
I have searched for many it is the firefox blocked. Who can help me? Thanks
Quote:
<script>

//Pop-under window- By JavaScript Kit
//Credit notice must stay intact for use
//Visit http://javascriptkit.com for this script

//specify page to pop-under
var popunder="http://yahoo.com"

//specify popunder window features
//set 1 to enable a particular feature, 0 to disable
var winfeatures="width=800,height=510,scrollbars=1,res izable=1,toolbar=1,location=1,menubar=1,status=1,d irectories=0"

//Pop-under only once per browser session? (0=no, 1=yes)
//Specifying 0 will cause popunder to load every time page is loaded
var once_per_session=0

///No editing beyond here required/////

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(off set, end))
}
}
return returnvalue;
}

function loadornot(){
if (get_cookie('popunder')==''){
loadpopunder()
document.cookie="popunder=yes"
}
}

function loadpopunder(){
win2=window.open(popunder,"",winfeatures)
win2.blur()
window.focus()
}

if (once_per_session==0)
loadpopunder()
else
loadornot()

</script>
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
nguaden is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-23-2009, 11:23 AM Re: what popup under code without firefiox block?
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Firefox won't allow a popup/popunder unless it has been activated by a click. Nothing else you can do.

Some developers have been attaching click events to the BODY, when they want to advertise something. I find this annoying.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 04-23-2009, 01:27 PM Re: what popup under code without firefiox block?
nayes84's Avatar
Extreme Talker

Latest Blog Post:
Difference between ASP And JSP
Posts: 232
Name: John
Location: Tokyo
Trades: 0
you can make it show insider window instead of popup
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

if(I'm("Helpful")) Add_Talkupation("nayes84");
nayes84 is offline
Reply With Quote
View Public Profile
 
Old 04-23-2009, 03:21 PM Re: what popup under code without firefiox block?
Novice Talker

Posts: 8
Trades: 0
Yeah, I recommend doing an internal popup. Lightwindow is a good one.
XGhozt is offline
Reply With Quote
View Public Profile
 
Old 04-23-2009, 11:06 PM Re: what popup under code without firefiox block?
Experienced Talker

Posts: 32
Trades: 0
Quote:
Some developers have been attaching click events to the BODY, when they want to advertise something. I find this annoying
i like popup under in BODY, can you share for me?
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
nguaden is offline
Reply With Quote
View Public Profile
 
Old 04-24-2009, 08:44 AM Re: what popup under code without firefiox block?
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Code:
window.onload = function() {
   document.body.onclick = loadornot;
}
Replacing your code-block
Code:
if (once_per_session==0)
loadpopunder()
else
loadornot()
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 04-24-2009, 10:59 AM Re: what popup under code without firefiox block?
Experienced Talker

Posts: 32
Trades: 0
Quote:
<script>


var popunder="http://yahoo.com"

//specify popunder window features
//set 1 to enable a particular feature, 0 to disable
var winfeatures="width=800,height=510,scrollbars=1,res izable=1,toolbar=1,location=1,menubar=1,status=1,d irectories=0"

//Pop-under only once per browser session? (0=no, 1=yes)
//Specifying 0 will cause popunder to load every time page is loaded
var once_per_session=0

///No editing beyond here required/////

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(off set, end))
}
}
return returnvalue;
}

function loadornot(){
if (get_cookie('popunder')==''){
loadpopunder()
document.cookie="popunder=yes"
}
}

function loadpopunder(){
win2=window.open(popunder,"",winfeatures)
win2.blur()
window.focus()
}

window.onload = function() {
document.body.onclick = loadornot;
}

</script>
i had change, but it's not ok
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
nguaden is offline
Reply With Quote
View Public Profile
 
Old 04-24-2009, 01:31 PM Re: what popup under code without firefiox block?
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
I misunderstood the code a bit.

Instead of:
Code:
window.onload = function() {
   document.body.onclick = loadornot;
}
Do:
Code:
window.onload = function() {
   document.body.onclick = function() {
      if (once_per_session==0)
         loadpopunder();
      else
         loadornot();
   }
}
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 04-26-2009, 12:50 AM Re: what popup under code without firefiox block?
Experienced Talker

Posts: 32
Trades: 0
sorry, I too stupid to do this
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
nguaden is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to what popup under code without firefiox block?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.12779 seconds with 12 queries