Open pop-up window, UNDERNEATH the active window

  • az0000000
  • Beginner
  • Beginner
  • User avatar
  • Posts: 57
  • Loc: Moldova, Chisinau

Post 3+ Months Ago

Hello,
I have a cross-browser on click pop-up window that i wont to have opened underneath the active window.
Here is my code:
Code: [ Select ]
var popWin = "";
function openwin(url, strWidth, strHeight) {
if (popWin != "") {popWin.close()}
leftStr = 5000;
topStr = 5000;
windowProperties = "toolbar=no,menubar=no,scrollbars=no,statusbar=no,height="+strHeight+",width="+strWidth+",left="+leftStr+",top="+topStr+"";
popWin = window.open(url,'newWin',windowProperties);
}
  1. var popWin = "";
  2. function openwin(url, strWidth, strHeight) {
  3. if (popWin != "") {popWin.close()}
  4. leftStr = 5000;
  5. topStr = 5000;
  6. windowProperties = "toolbar=no,menubar=no,scrollbars=no,statusbar=no,height="+strHeight+",width="+strWidth+",left="+leftStr+",top="+topStr+"";
  7. popWin = window.open(url,'newWin',windowProperties);
  8. }

Code: [ Select ]
<a href=javascript:openwin('site url',430,60)>

What changes do i need to make to this code to achieve my goal.
Thank you.
Regards
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

evil, evil, evil. I love ABP for putting a stop to this sort of activity.
  • az0000000
  • Beginner
  • Beginner
  • User avatar
  • Posts: 57
  • Loc: Moldova, Chisinau

Post 3+ Months Ago

UPSGuy wrote:
evil, evil, evil. I love ABP for putting a stop to this sort of activity.


:hmm:
Could you be more specific please?
  • tastysite
  • Proficient
  • Proficient
  • User avatar
  • Posts: 349
  • Loc: Brighouse, West Yorkshire, England

Post 3+ Months Ago

az0000000 wrote:
UPSGuy wrote:
evil, evil, evil. I love ABP for putting a stop to this sort of activity.


:hmm:
Could you be more specific please?

He means that people don't like having things happen behind the active window because its out of there control and you can see there point! Why do you you want to do this?
  • az0000000
  • Beginner
  • Beginner
  • User avatar
  • Posts: 57
  • Loc: Moldova, Chisinau

Post 3+ Months Ago

I am offering high quality bitrate radio to my visitors using a free service which will require every listener to visit a banner page first, and then their ip can get music stream.
Well, i want to help listeners avoid steering at those banners all the time and let banners page load in background in a small popup window. For that i need that popup window to move under the first window which visitors accessed using radio link on my website.

Now, if you preachers finished your preaching about modern Internet etiquette and don't mind, I'd like to get back to MY issue.

Could anyone help me pointing where exactly do i include any of these variables?
Code: [ Select ]
1) opener.focus()
2) this.document.focus()
  1. 1) opener.focus()
  2. 2) this.document.focus()

I am trying to use it with this script:
Code: [ Select ]
var popWin = "";
function openwin(url, strWidth, strHeight) {
if (popWin != "") {popWin.close()}
leftStr = 5000;
topStr = 5000;
windowProperties = "toolbar=no,menubar=no,scrollbars=no,statusbar=no,height="+strHeight+",width="+strWidth+",left="+leftStr+",top="+topStr+"";
popWin = window.open(url,'newWin',windowProperties);
}


<a href=javascript:openwin('h t t p : / / site . com',430,60)>
  1. var popWin = "";
  2. function openwin(url, strWidth, strHeight) {
  3. if (popWin != "") {popWin.close()}
  4. leftStr = 5000;
  5. topStr = 5000;
  6. windowProperties = "toolbar=no,menubar=no,scrollbars=no,statusbar=no,height="+strHeight+",width="+strWidth+",left="+leftStr+",top="+topStr+"";
  7. popWin = window.open(url,'newWin',windowProperties);
  8. }
  9. <a href=javascript:openwin('h t t p : / / site . com',430,60)>


Thank you.
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

Quote:
Now, if you preachers finished your preaching about modern Internet etiquette and don't mind, I'd like to get back to MY issue.


I'll save some breath and sum up my sentiments by saying we're big on that "etiquette" thing that you so hastily want to toss aside. Spammer practices like these are frowned upon for good reason. Large numbers of developers make a living by legitimately place ads and spend a LOT of time calculating proper ways to integrate them into content - without hijacking a user's browser. It could do you some good to invest some time in searching Ozzu and learning from those members whom are very successful at reaching said balance.

Opinions aside, please note that by posting a request here, you are in no shape, form, or fashion guaranteed a response or solution. We politely tried to point out that the activity you're trying to accomplish is generally reflected on as poor practice. Take a hint.

Finally, respect for your fellow community members is a must. I ask that you consider this with any further replies.
  • az0000000
  • Beginner
  • Beginner
  • User avatar
  • Posts: 57
  • Loc: Moldova, Chisinau

Post 3+ Months Ago

Thank you for you time.

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 60 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.