Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
56
rated 0 times [  57] [ 1]  / answers: 1 / hits: 19889  / 11 Years ago, wed, july 10, 2013, 12:00:00

based on some actions in a page , I want to give an alert message to the user (ie.. your resume has been uploaded.) like that and i want to close that window, when the user clicks okay in that alert box. I want to do this using alert method only instead of confirm method in javascript. why because alert method gives the only option ok where as confirm method gives yes or no .can anyone help me please.


More From » html

 Answers
5

Just put the statements one after each other :



alert(ok);
window.close();


EDIT following Ankit's remark to OP : note that if you didn't open the window with Javascript yourself, you may not be authorized to close it depending on the browser.


[#77094] Tuesday, July 9, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
emiliano

Total Points: 381
Total Questions: 109
Total Answers: 93

Location: Jersey
Member since Fri, Oct 1, 2021
3 Years ago
emiliano questions
;