SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jun 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Geybox does not work on page load if centered.

    Hello
    Tried using the code given on page http://www.sitepoint.com/forums/show...d-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

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    4 Thread(s)
    Does the example of using GB_showCenter from http://orangoo.com/labs/greybox/advance_usage.html work?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Member
    Join Date
    Jun 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •