Click here to Skip to main content
15,894,720 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
var r = confirm("Document Already Exist!Do you want update it?");
if (r == true) {
   //do something
}
else
{
   //do something
}




this is not working in IE10 and Firefox..

Please suggest a solution.


Regards,
Anupama
Posted
Updated 4-Nov-13 22:47pm
v2
Comments
Nelek 5-Nov-13 4:48am    
You were missing the end qoute ( " ) in the confirm line. Was it a typo or do you really miss it in your code?
AnupamaPillai 5-Nov-13 4:55am    
var r = confirm("Document Already Exist!Do you want update it?");

where i missed? ...
Nelek 5-Nov-13 6:30am    
You had posted:
var r = confirm("Document Already Exist!Do you want update it?);

Note the it?); instead of it?"); I have added it in your question when editing, that's why I asked you. You can check it if you click in the tiny "v2" and select the version 1 (the one you posted)

1 solution

Hi Anupama ,
By looking your code I guess that you made a mistake here
var r = confirm("Document Already Exist!Do you want update it?);
write the above statement as
var r = confirm("Document Already Exist!Do you want update it?");
You haven't closed your question string with ".

try this and tell me result.
If problem continuous see JavaScript is disabled in IE or any script blocker extension such as NoScript is installed in firefox.

--
Thanks
 
Share this answer
 
v2
Comments
AnupamaPillai 5-Nov-13 5:20am    
Hi ,
Please check my question.. I added the line exactly as like the belowed one.
var r = confirm("Document Already Exist!Do you want update it?");


I did'nt missed the quote.. im sure...
Nelek 5-Nov-13 6:31am    
You were missing it here in your question. See my comment above and check your code. If you copy+pasted the code here, then you are missing it in your programm.
member 8888995 6-Nov-13 4:30am    
Anupama,
If (")is there in your code & it is not working then please check javascript settings of your browser.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900