...

View Full Version : Resize present window, and open new child



Argon
08-12-2004, 10:51 PM
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

Willy Duitt
08-13-2004, 09:56 PM
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

Argon
08-13-2004, 10:54 PM
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

Willy Duitt
08-13-2004, 11:14 PM
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

Mr J
08-13-2004, 11:14 PM
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>

Willy Duitt
08-13-2004, 11:16 PM
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

Argon
08-14-2004, 01:05 AM
Mr J,

I appreciate your helping me. I will give it a try, and hopefully, it will work.

Argon
08-14-2004, 01:10 AM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum