Whing Dela Cruz
asked on
Error Handler
Hi experts, How to handle error on js? base on the code below, I want the alert will continue in spite of an error. I'm getting error this because "myProlist" is not found in the Html. My point here is to run the function in-spite of the error. Thank you!
function GoAlert()
{
document.getElementById("myProlist").style.display = "none";
alert("Okey");
}
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@norie
ID: 42125757 is not correct syntax...
also, it always alert "Okey" even if try/catch syntax is ok...
ID: 42125757 is not correct syntax...
also, it always alert "Okey" even if try/catch syntax is ok...
Huseyin
I realised the syntax was incorrect but was unable to edit as someone posted a comment straight after mine.:)
I realised the syntax was incorrect but was unable to edit as someone posted a comment straight after mine.:)
so,
write it on notepad
test with jsFiddle
then copy/paste and submit
:) this is what I do now ha ha...
write it on notepad
test with jsFiddle
then copy/paste and submit
:) this is what I do now ha ha...
ASKER
Thanks both of you guys, more power!
I'm on my phone - can't really test anything, working from memory basically.:)
Open in new window