Don't do that, you might get trapped in an endless loop of alert windows and crash the PDF viewer or Designer then, since the layout ready event can execute very very often depending on the forms build quality. Use the JavaScript console instead.
form1::ready:layout - (JavaScript, client)
console....