Results 1 to 6 of 6

Thread: Problem Ajax Tabs Content Script (v 2.2) and Facebox 1.3

  1. #1
    Join Date
    Jan 2017
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry Problem Ajax Tabs Content Script (v 2.2) and Facebox 1.3

    Script Title: Ajax Tabs Content Script (v 2.2)


    Hello, I am French, my English is bad lol
    My problem with Ajax Tabs Content Script (v 2.2) is the use of a lightbox link in the external page.

    The ligntbox link does not work in an external page without going through iframe
    I use the function rel = "countrycontainer"

    The css and lightbox script is in the <head>. Of the main page that calls the "countrycontainer". When I click on the link it 'opens in the normal page and does not load in ligntbox. I use Facebox 1.3.

    Here is the code in my external page:
    Code:
    <a href="content/messaging.php" rel="facebox"> <div id = "pp2"> View </ div> </a>
    It is therefore correct. Should you use MANDATORY page in iframe to run?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Off hand I would say yes. But I think there's a way to do it without iframe, which I think is desirable because any sort of content displayed within an iframe is usually limited to that frame. There are also ways to overcome that sometimes. But I'm a little confused what you are trying to do. You mention lightbox and facebox. These are two different yet somewhat similar scripts.

    Because of the language barrier, perhaps it would be easiest if you posted a link to your page where you are trying this and have it in the iframe.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jan 2017
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OK then...
    The facebox link does not open in floating window in the Ajax Tabs Content Script (v 2.2)
    It opens in full page like a classic link.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I would first try using the instance.onajaxpageload function to initialize the content imported from the external page.

    To use this method, you would have the facebox and jQuery scripts and the facebox css on the "top" page (the one with the tabs on it). Then where you go to initialize the tabs script - say you have something like so:

    Code:
    var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
    countries.setpersist(true)
    countries.setselectedClassTarget("link") //"link" or "linkparent"
    countries.init()
    To make facebox links on messaging.php work in the tab, add the highlighted:

    Code:
    var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
    countries.setpersist(true)
    countries.setselectedClassTarget("link") //"link" or "linkparent"
    countries.init()
    
    countries.onajaxpageload = function(pageurl){
    	if (pageurl.indexOf("messaging.php")!=-1){
    		jQuery.facebox.settings.closeImage = 'facebox/closelabel.png'; // change to path relative to the 'top' page
    		jQuery.facebox.settings.loadingImage = 'facebox/loading.gif'; // change to path relative to the 'top' page
    		jQuery('a[rel*=facebox]').facebox();
    	}
    };
    If you want more help, please post a link to the page on your site with the problematic code.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Jan 2017
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    super, is very good !
    This works perfectly!
    I do not know if I have to make a new message but can not run a link in a form button. Here's what I put:

    Code:
    <form>
    <input type="submit" value="AJOUTER" class="pclubvalid" onclick="javascript: countries.loadajaxpage('content/pnovalidok.php')" />
    </form>
    And curiously it returns on the page of the form and not the desired page

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    There are various ways to fix that. Here's one:

    Code:
    <form onsubmit="countries.loadajaxpage('content/pnovalidok.php'); return false;">
    <input type="submit" value="AJOUTER" class="pclubvalid" />
    </form>
    There still might be other problems, but assuming a regular link would work, then this will.

    Again, if you want more help with this one, please post a link to your page.

    Oh, and yes, usually a new thread should be made for a new question, but I'll allow it this time. If you have more questions not related to these two, please start a new thread.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. Ajax Tabs Content script v2.2 problem IE
    By ssnobben in forum Dynamic Drive scripts help
    Replies: 11
    Last Post: 11-12-2009, 12:23 PM
  2. Ajax Tabs Content Script problem
    By suv in forum Dynamic Drive scripts help
    Replies: 7
    Last Post: 09-30-2009, 11:01 PM
  3. Problem using Ajax Tabs Content Script (v2.2)
    By dd8081 in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 05-02-2009, 05:45 AM
  4. Problem with Ajax Tabs Content Script 2.0
    By bigmarketing in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 11-29-2007, 01:17 AM
  5. Problem at Ajax Tabs Content script
    By kahhiung in forum Dynamic Drive scripts help
    Replies: 5
    Last Post: 09-30-2006, 06:31 AM

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
  •