The master page simply displays with the child page as one HTML code, so you just have to access it on the client side as usual.
Try rewriting this:
if(!$('input[type=hidden]').val().length == 0 ) { }
and
if ($('input[type=hidden]').val()) {}
which is a simpler condition if the hidden field matters. I'm not sure if !combined with ==does what you want it to perform logically. In any case, $('input[type=hidden]').val()a more readable IMO.
source
share