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 7769775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:14:31+00:00 2026-06-01T16:14:31+00:00

There is a page with a link inside the body tag. When the link

  • 0

There is a page with a link inside the “body” tag.
When the link is inserted the following view is rendered in fancybox.

<div class="form">
    <?php
                $model = new User;
        $model->scenario='registration';
        $form=$this->beginWidget('CActiveForm', array(
        'id'=>'signup-form',
                'action'=>'/signup/',
        'enableClientValidation'=>true,
        'clientOptions'=>array(
            'validateOnSubmit'=>true,
        ),
    )); ?>

        <p class="note">Fields with <span class="required">*</span> are required.</p>

        <div class="row">
            <?php echo $form->labelEx($model,'username'); ?>
            <?php echo $form->textField($model,'username'); ?>
            <?php echo $form->error($model,'username'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model,'password'); ?>
            <?php echo $form->passwordField($model,'password'); ?>
            <?php echo $form->error($model,'password'); ?>
        </div>


        <div class="row buttons">
            <?php echo CHtml::submitButton('sign up',array('name'=>'submit')); ?>
        </div>

    <?php $this->endWidget(); ?>
    </div><!-- form -->

When the above code is inserted without fancybox the client validation script is inserted correctly, but when in fancybox there are no jQuery validation functions inserted to the page.
What can be the problem?
(siteController code is inserted here on purpose)

  • 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-01T16:14:32+00:00Added an answer on June 1, 2026 at 4:14 pm

    Your problem is most likely how you send the HTML to Fancybox. If you do a renderPartial (as alluded to by user1248203), you need to make sure you have renderPartial postprocess the view that is sent back (post-processing includes javascript/css files that you want rendered along with the view itself).

    More info on the CController page

    One other thing to note: when you do the post-processing, you will need to make sure that the Javascript for your Fancybox (and possibly jQuery, etc) isn’t sent back again. It can cause some really confusing problems. To keep the files from being re-sent over Ajax, use this:

    Yii::app()->clientScript->scriptMap['jquery.js'] = false;
    Yii::app()->clientScript->scriptMap['jquery.min.js'] = false;
    Yii::app()->clientscript->scriptMap['jquery-ui.min.js'] = false;
    etc.
    

    Also note that jquery.js is sent when you’re debugging on a dev server (with YII_DEBUG set to true), but jquery.min.js is sent on production servers (where YII_DEBUG is set to false). That’s bitten me 🙂 You can see it defined in framework/web/js/packages.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have inside the body main 'container' div and inside this 'container' div there
Is there a way I can put a link inside a div using c#/css
There was a page with the link http://www.xyzabc.com/exampleone . Then i updated the link
The (very outdated) page for LZO contains a link to a Java implementation. There
In this asp.net page, there is a link that leads to another page in
On the page there are links displayed with CSS as buttons: HTML: <a class=button
I have a link inside a div that floats to the right of the
Is there anyway to detect if a user clicks a link inside of an
For some landing page templates there is code like this: <?php $Name = 'FOO';
On this page there is a list of footer links that have a little

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.