Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-12-2004, 10:51 PM   PM User | #1
Argon
New to the CF scene

 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Argon is an unknown quantity at this point
Resize present window, and open new child

I want a JavaScript to do the following thing:

Via a hyperlink call an action that

1. centres and resizes the present window to 200x150 px, and

2. opens a new frameless window on top at 780x500 px.
I have looked high and low for something close, without any success
Argon is offline   Reply With Quote
Old 08-13-2004, 09:56 PM   PM User | #2
Willy Duitt
Banned

 
Join Date: Sep 2003
Posts: 3,620
Thanks: 0
Thanked 0 Times in 0 Posts
Willy Duitt is an unknown quantity at this point
This was getting ready to fall to the next page so I will give you a bump TTT to give you another shot at exposure but do not be surprised if noone answers this because it all seems at worse devious, at best intrusive....

Good luck;
.....Willy
Willy Duitt is offline   Reply With Quote
Old 08-13-2004, 10:54 PM   PM User | #3
Argon
New to the CF scene

 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Argon is an unknown quantity at this point
I am sorry you feel this way. There is nothing intrusive in my mind about inviting someone to see your page, and wanting your page with your work to look and feel the way you intended. If that means hiding their previous window (not closing it, which is considered “dangerous”) and placing it behind the main gallery window for the duration of the presentation, should not be a cause for presumptuous judgements.

Anyway, I appreciate your bumping me up. Thanks
Argon is offline   Reply With Quote
Old 08-13-2004, 11:14 PM   PM User | #4
Willy Duitt
Banned

 
Join Date: Sep 2003
Posts: 3,620
Thanks: 0
Thanked 0 Times in 0 Posts
Willy Duitt is an unknown quantity at this point
FWIW: This is exactly how the recent spat of Bank Phishing scams work...

They hide the window by moving it 10,000 pixel off screen loading a windows help file into it in order to grab the local machine security policy and then copy the information from the visible window to the overwritten hidden window....

Besides, your job as a webmaster should be to capture a users attention and entice him to return. My browser belongs to me and a sure way to have me leave your site never to return is for you to try to control my browsers inherent behavior which I am accostomed to....

Besides, all this trickery and open full size, chromeless windows has been addressed with the release of SP2 so anyone using such tactics better get on the stick and start repairing their pages because shortly, they will no longer work....

.....Willy
Willy Duitt is offline   Reply With Quote
Old 08-13-2004, 11:14 PM   PM User | #5
Mr J
Senior Coder

 
Join Date: Aug 2002
Location: UK
Posts: 2,789
Thanks: 2
Thanked 14 Times in 14 Posts
Mr J is on a distinguished road
This may be close.

I would suggest not making your visitors previous window as small as 200x150 unless you are not bothered wether they come back or not

<script language="JavaScript" type="text/javascript">
<!--

main_width=200
main_height=150
main_posX = (screen.availWidth - main_width) / 2
main_posY = (screen.availHeight - main_height) / 2

pop_width = 750
pop_height = 500
pop_posX = (screen.availWidth - pop_width) / 2
pop_posY = (screen.availHeight - pop_height) / 2

function popWin(url){
window.resizeTo(main_width,main_height)
window.moveTo(main_posX,main_posY)

var popUp = window.open(url,'pop','width='+pop_width+',height='+pop_height+',left='+pop_posX+',top='+pop_posY+', scrollbars=yes,resizable=yes')
popUp.focus()
}

// -->
</script>

<a href="#null" onClick="popWin('pop1.htm')">Pop 1</a>
Mr J is offline   Reply With Quote
Old 08-13-2004, 11:16 PM   PM User | #6
Willy Duitt
Banned

 
Join Date: Sep 2003
Posts: 3,620
Thanks: 0
Thanked 0 Times in 0 Posts
Willy Duitt is an unknown quantity at this point
FWIW: This is exactly how the recent spat of Bank Phishing scams work...

They hide the window by moving it 10,000 pixel off screen loading a windows help file into it in order to grab the local machine security policy and then copy the information from the visible window to the overwritten hidden window....

Besides, your job as a webmaster should be to capture a users attention and entice him to return. My browser belongs to me and a sure way to have me leave your site never to return is for you to try to control my browsers inherent behavior which I am accustomed to....

Besides, all this trickery and open full size, chromeless windows has been addressed with the release of SP2 so anyone using such tactics better get on the stick and start repairing their pages because shortly, they will no longer work as intended....

.....Willy
Willy Duitt is offline   Reply With Quote
Old 08-14-2004, 01:05 AM   PM User | #7
Argon
New to the CF scene

 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Argon is an unknown quantity at this point
Mr J,

I appreciate your helping me. I will give it a try, and hopefully, it will work.
Argon is offline   Reply With Quote
Old 08-14-2004, 01:10 AM   PM User | #8
Argon
New to the CF scene

 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Argon is an unknown quantity at this point
Willy,

I appreciate your concern over Internet ethics. I was not in the least aware of how phishing scams work, nor did I have an interest in it. Neither was my intention to move a page 10000 pixels away - where one can never get to it - but right behind the main window, so that there is no visual interference with the image presentation. Simply put, I want as clean, uncluttered a screen as possible.

What my job as a webmaster should be is highly debatable. My site is targeted to clients whom I have already met, meeting in their office (or my office), or have already talked to. So I am not so concerned with whom stubbles on my website accidentally, although that too is welcome.

Most of all, though, I am offended with your unsolicited advice of how I should design my website, and whether this is “trickery” or not. Yes, your browser belongs to you, but my website, and its design belongs to me; that’s a given. You may never come back, but that’s my choice to make, thank you.

Last edited by Argon; 08-14-2004 at 01:15 AM..
Argon is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 06:23 AM.


Advertisement
Log in to turn off these ads.