...

View Full Version : Close Window Problem?



paladinckm
08-13-2008, 08:25 PM
Hi all , I am having a button , and if i click that a pop-up message should come up alerting " you are closing window" with yes and no buttons and well everybody knows if yes =close and no=stay .Now the problem is I am getting the popup displayed twice ..i,e even i press yes .. Iam getting a new pop asking the same question .How can this be avoided . I just need pop-up once..if i hit cancel it works fine .help plz

ninnypants
08-13-2008, 08:35 PM
How exactly are you closing the window? Can you post any code?

paladinckm
08-13-2008, 09:11 PM
function closeMe(){
var isConfirmed=confirm('do u want to close window')
if(isConfirmed){
self.close()
}
}


OnClientClick="closeMe()"

ninnypants
08-13-2008, 09:46 PM
use "onclick" not "OnClientClick" also try


function closeMe(){
var isConfirmed=confirm('do u want to close window')
if(isConfirmed){
window.close()
}
}

paladinckm
08-13-2008, 10:11 PM
use "onclick" not "OnClientClick" also try


function closeMe(){
var isConfirmed=confirm('do u want to close window')
if(isConfirmed){
window.close()
}
}


Hi,
If I use onclick I am getting an error saying that closeMe() is not a member of asp.default.aspx ..I don't know why ..I jus changed the onclientclick() to onclick .and i am getting error

ninnypants
08-13-2008, 10:50 PM
That's because onclick is JavaScript. If you're using ASP for this you should probably post in the ASP forum



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum