I did some testing first, and when I was checking the Array first, I
had a fatal error ; but not when I checked the first .get on the
array. That's how I end testing a array that doesn't exists...

The idea, however, would have be to rewrite the script so it first
test is there is a "menu-page-item-active" div, if not, giving "Actif"
the value "-1", and if so, taking the number written in the id of the
element and attributes its value to the variable "Actif".

Thank you anyway, now it's working perfectly and it's much more
logical by using different script on different type of pages.

On 11 avr, 23:37, Sanford Whiteman <[email protected]>
wrote:
> > Just to be sure : it was that flaw that makes the "else" doesn't
> > trigger ?
>
> Yes,  because  the  uncaught reference is a fatal error and the script
> stops processing. Again, you can see this in the console.
>
> -- Sandy


-- 
To unsubscribe, reply using "remove me" as the subject.

Reply via email to