Geybox does not work on page load if centered

Hello
Tried using the code given on page http://www.sitepoint.com/forums/showthread.php?676415-Greybox-onload-amp-centered by Simple User.

If I use the following, it works:

  ClientScript.RegisterClientScriptBlock(Me.GetType(), "Mesaj", "<script type='text/javascript'>AJS.AEV(window, 'load', function() { GB_show('Title', '../inputform.aspx',500,700); });</script>")

However, The following does not work:

 ClientScript.RegisterClientScriptBlock(Me.GetType(), "Mesaj", "<script type='text/javascript'>AJS.AEV(window, 'load', function() { GB_showCenter('Title',  '../inputform.aspx', callback_fn); });</script>")

I want to have my popup window centered. What am I missing?

thanks

Elcin

Does the example of using GB_showCenter from http://orangoo.com/labs/greybox/advance_usage.html work?

Hello,
It works if I try to open greybıx from a link, no problems.

In the meantime, I found the solution, the folllowing worked for me (without the mention of “callback_fn”):

        ClientScript.RegisterClientScriptBlock(Me.GetType(), "Mesaj", "<script type='text/javascript'>AJS.AEV(window, 'load', function() { GB_showCenter('Title', '../inputform.aspx',500,600); });</script>")

Thanks for your replay

Elcin