art
art

Reputation: 313

using lightbox that can open another file

Now I have a lightbox that only can use to show its <div> in current file . Is it possible to use a lightbox to show something from another file.

This is where my lightbox linked to <a id="list" href="?lightbox[width]=808&lightbox[height]=365#div_currentfile" class="lightbox">Change Password</a>

and the example file I want to open up from my lightbox is test_lightbox.php

any help will be appriciated

Upvotes: 1

Views: 741

Answers (1)

Kapil Dev S
Kapil Dev S

Reputation: 102

There are two ways to achieve this:

  1. Load your php file inside your div using AJAX call by providing the relative path of test_lightbox.php
  2. Put an IFrame inside your div and load that .php file in IFrame.

First method is best if you are trying to load the php file from the same domain. If test_lightbox.php file is served from some other place, then second method is the right choice.

If you are not sure how to load, have a look in the following url. But without jQuery also you can acheive the result. jQuery Load

Upvotes: 1

Related Questions