Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8073555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:22:18+00:00 2026-06-05T14:22:18+00:00

FancyBox V2 – I’m stuck when I click the first fancybox link the box

  • 0

FancyBox V2 – I’m stuck when I click the first fancybox link the box loads an incorrect size but when I exist and click the fancy box again it loads right size??

It previously autosized correctly as I have multiple fancybox on website but when I open this fancybox to carry through purchase it autosizes incorrectly on first click then correctly on second click

How do I fix this??

(Obviously I have replaced my real PayPal information with madeup information)

Code is below:

Main Page:-

<!DOCTYPE html>
<head>
    <!-- Add jQuery library -->
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
    <!-- Add fancyBox main JS and CSS files -->
    <script type="text/javascript" src="./source/jquery.fancybox.js"></script>
    <link rel="stylesheet" type="text/css" href="./source/jquery.fancybox.css" media="screen" />


       <script>
$(document).ready(function() {
$(".fancybox1").fancybox();
}); // ready
</script>
</head>

<body>
    <a href="Fancybox.html" class="fancybox1 fancybox.ajax">Buy</a>
</body>

</html>

Fancybox Page:

<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr/" method="post" onsubmit="return">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="BuyAshirt@gmail.com">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="item_name" value="Great Shirt">
<input type="hidden" name="amount" value="10.00">
<table>
<td>
    <input type="hidden" name="on1" value="Name On Top">Name You Want On Top</td>
    <td>
    <input id="Top_name" nametype="text" name="os1" maxlength="200"></td>

    </td>
    <td>
<tr>
</table>
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_xpressCheckout.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input name= "agree" type="checkbox" id="CHKBOX_1" value="Accept Terms of Service"><span onClick="document._xclick.CHKBOX_1.checked=(! document._xclick.CHKBOX_1.checked);">I accept <a href="NotImportant.html" class="fancybox1 fancybox.ajax">terms</a></span> of service
</form>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T14:22:19+00:00Added an answer on June 5, 2026 at 2:22 pm

    It’s because fancybox doesn’t know the dimensions of the page when opened the first time, width and height are unknown so set to 0. Subsequent times, object dimensions are already cached so fancybox can render the content properly.

    From fancybox website:

    autoSize : If set to true (default), for ‘inline’, ‘ajax’ and ‘html’ type content width/height is auto determined. If no dimensions set this may give unexpected results

    It might be a good idea to set dimensions inside your Fancybox.html page, maybe in the <table> or in the <form> tag like

    <table style="width: 620px; height: 320px;"> - or -  <form style="width: 620px; height: 320px; display: block;">
    

    eventually you may prefer to set dimensions for this specific form within your script

    $(".fancybox1").fancybox({
     fitToView: false,
     width: 620,
     height: 320
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am using fancybox function in jquery. i am opening loign box on click
I have inside a fancybox box is already opened the next link: <%= link_to
I'm using FancyBox to display YouTube videos (using the YouTube embed link) with Fancy
I need the fancybox to display when the cookie has expired, but this does
I'm using Fancybox 1.3.4 with ASP.NET MVC 3. I have following link : <a
is there a way to get a fancybox ( http://fancy.klade.lv/ ) or any other
Hi im looking at intergrating fancybox with a youtube video but I want it
I want to add fancybox v2 to a link on my website: <p class=buttontext>
I am using fancybox to display a gallery of pictures. But I wanted to
I use jquery fancybox 1.3.4 as pop form. but I found fancybox can't bind

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.