Results 1 to 3 of 3

Thread: Ajax Side Panel script: Change width of the panel from the same link that calls it?

  1. #1
    Join Date
    Aug 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ajax Side Panel script: Change width of the panel from the same link that calls it?

    1) Script Title: Script: Ajax Side Panel script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...xsidepanel.htm

    3) Describe problem:

    Hi mate, greetings.

    You can change the width of the panel from the same link that calls it ?. Something that can be added within the same code, to open in a different width:

    HTML Code:
    <a href="http://www.mysite.com/index.html" rel="ajaxpanel" data-loadtype="iframe">My Home Page</a>
    Or is there a way to do it?

    Thank you!

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Try adding a function like the below to your page, which dynamically changes the width of the panel:

    Code:
    <script>
    
    function changepanelwidth(w){
    	ddajaxsidepanel.$panelref.css('width', w)
    }
    
    </script>
    Then inside one of your links to invoke the panel, augment it with the code in red to say, change the panel to 500px width when it's revealed:

    Code:
    <a href="http://www.cssdrive.com" rel="ajaxpanel" onClick="changepanelwidth(500)">CSS Drive</a>
    DD Admin

  3. #3
    Join Date
    Aug 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hello.

    Thank you! Works for me.

    Greetings!!

Similar Threads

  1. Ajax Side Panel script
    By bdhone in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 10-18-2014, 03:47 PM
  2. Making Ajax Side Panel refresh parent page when panel is closed.
    By Jvloomin in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 08-02-2013, 05:48 PM
  3. Ajax Side Panel script
    By Wakel in forum Dynamic Drive scripts help
    Replies: 11
    Last Post: 07-07-2013, 10:07 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
  •