|
Is there any way to close the window without alerting the user?.
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
No - the web is not a friendly enough place for browsers to allow that sort of thing.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
how can i use it in asp.net? sorry to disturb u again..
|
|
|
|
|
It has nothing to do with ASP.NET. It's just javascript.
|
|
|
|
|
u might have heard about the monster.com website , there , the moment u update ur resume , there u can close the window by the button click , and without noticing the user !!!!!!
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
modified on Wednesday, March 5, 2008 2:35 AM
|
|
|
|
|
If your script had opened a window, you have the rights to close it through window.close() without requesting permissions from the user. Otherwise, the web browser is obliged to get a nod from the user whether to accede to your request.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
can u elaborate this process of closing the window without user permissions?
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
What he is trying to tell is if the window has been opened through Javascript then you will not be asked for the permission otherwise confirmation box will appear.
Apurva Kaushal
|
|
|
|
|
window is opening through aspx page , still is does not ask the user confirmation , in the monster.com website , while u click the update button , to update the resume.
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
If the window is opened by a JS, it is possible.
|
|
|
|
|
what is JS? i try to use Response.Close() but this page appear "Internet Explorer cannot display the webpage".
|
|
|
|
|
zaimah wrote: what is JS
JS is Java Script
zaimah wrote: Response.Close()
Looks like you are not aware of how an ASP.NET page works. Response.Close() closes the connection to the client, not browser window. This executes on the sever. Java scipt executes on the client machine. To close a window from ASP.NET, you need to emit JS to the response.
|
|
|
|
|
yup, i'm not familliar with ASP.Net, just started a month ago. but i try to use window.close() as suggested, but there's a msg stated "windos not declared". why is it? sorry my english not so good.
|
|
|
|
|
<script language="javascript">
function closeWindow(){
window.close();
}
</script> I guess you wrote it on the code behind. Write it in the ASPX page inside head section. Call this from the control to close window.
|
|
|
|
|
use this line on your exit button click event.
Response.Write("<script language='javascript'> { self.close() }</script>");
|
|
|
|
|
u might have heard about the monster.com website , there , the moment u update ur resume , there u can close the window by the button click , and without noticing the user !
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
modified on Wednesday, March 5, 2008 2:35 AM
|
|
|
|
|
that would be good. but how did they do it?
|
|
|
|
|
i am also looking the same.
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
if u do find the answer pls tell me.. it's much easier without the msg..
|
|
|
|
|
Sonia Gupta wrote: i am also looking the same.
As I said, if the window is opened by a JS, then you can close it without any confirmation message. When JS is not the owner of the window, usually browsers will show a message to prevent unwanted scripts closing the window.
|
|
|
|
|
if u visit the monster.com , there click the update button, the pop up window will open , there u can close the window on button click .
U many not require to upload the resume , but u can see the window is opening through aspx page .Still not asking my confirmation !!
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
Sonia Gupta wrote: if u visit the monster.com , there click the update button, the pop up window will open
OMG, this is what I am telling, the window is opened by a script, so it has permission to close the window without waiting for the confirmation from user. You try to open a window using Window.Open and close it using JS, you won't get any confirmation.
|
|
|
|
|
Have u tried this thing..
function Close_Window()
{
window.opener="something";
window.close();
}
just call the function on the button click
<div class="ForumSig">When you fail to plan, you are planning to fail.</div>
|
|
|
|
|
How should i use the can grow field in cross tab crystal report.It is not showing me the full details in a column
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
i m sending the mail to some users(from database)according to the specified condition through a loop..i want to use the variables like $name, $address,$phone etc..so it takes the value from database of that partcular user.... how can i do that....i want to use some buttons like here in Formatting(here in codeproject mail)..so if i click on name..it inserts the $name in mail-body....
please help me how can i do that...
|
|
|
|