Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Change towards opening

  1. #1
    Join Date
    Jun 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Change towards opening

    1) Script Title: Drop Down/ Overlapping Content

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

    3) Describe problem:

    Hi, im italian so excuse me for my language errors. Im using ur script, found at link above to open and close a popup. I would need to change the direction of opening. Now the window opens towards right and i would like to open it to left.

    Can u help me? I would appreciate any ur advice.
    Last edited by ddadmin; 07-03-2008 at 08:26 AM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,926
    Thanks
    43
    Thanked 3,190 Times in 3,154 Posts
    Blog Entries
    12

    Default

    That script is actually officially presented here:

    http://www.dynamicdrive.com/dynamici...lapcontent.htm

    Which is the official demo page for it. On that page, your question is answered in the section headed:

    More Information

    Please see that section on the demo page.
    - John
    ________________________

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

  3. #3
    Join Date
    Jun 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks jscheuer1

    Ive tested the script following the instructions but unfortunately it seems not to work...When i click, it opens the link in this part instead of the popup

    <a href="http://www.dynamicdrive.com" id="searchlink" rel="subcontent">Search DD</a>

    Ive tried to replace the address with the symbol #, but the link remains static...

    how can I solve?

  4. #4
    Join Date
    Aug 2004
    Posts
    9,878
    Thanks
    3
    Thanked 962 Times in 951 Posts
    Blog Entries
    15

    Default

    Not sure if I understood you correctly, but as John said, the orientation of where the Content Drops down relative to the anchor link is explained in the "More Information" section on the script page. Specifically, the parameter in red below:

    Code:
    dropdowncontent.init("searchlink", "right-bottom", 500, 'mouseover')
    Valid values are: "left-bottom", "right-bottom", "left-top", or "right-top"

  5. #5
    Join Date
    Jun 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry ddadmin, ive some problem with english

    The problem is that this script doesn't work correctly and I don't understand the reason...

    When i click on the link, it doesn't open the popup but this address:

    <p>Demo #1: <a href="http://www.dynamicdrive.com" id="searchlink" rel="subcontent">Search DD</a></p>

    Ive tried this way:

    <p>Demo #1: <a href="#" id="searchlink" rel="subcontent">Search DD</a></p>

    but the problem remains and the link doesn't work...

    With the previous script (this: http://www.dynamicdrive.com/forums/s...08&postcount=6) it was ok.

    Im sure this is a small problem, but Im not able to solve it.

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,926
    Thanks
    43
    Thanked 3,190 Times in 3,154 Posts
    Blog Entries
    12

    Default

    Please post a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

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

  7. #7
    Join Date
    Jun 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    Please post a link to the page on your site that contains the problematic code so we can check it out.
    For the moment i work in local, so ive update a test page here:

    http://www.clanlasicilia.altervista.org/pag.html

    Here's the script:

    http://www.clanlasicilia.altervista....downcontent.js

    If u click on both links, the script doesn't show any popup. What's the error?

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,926
    Thanks
    43
    Thanked 3,190 Times in 3,154 Posts
    Blog Entries
    12

    Default

    You left out the initialization (from the demo - goes right before the closing </body> tag):

    Code:
    <script type="text/javascript">
    //Call dropdowncontent.init("anchorID", "positionString", glideduration, "revealBehavior") at the end of the page:
    
    dropdowncontent.init("searchlink", "right-bottom", 500, "mouseover")
    dropdowncontent.init("contentlink", "left-top", 300, "click")
    
    </script>
    Your first test would init on just:

    Code:
    <script type="text/javascript">
    //Call dropdowncontent.init("anchorID", "positionString", glideduration, "revealBehavior") at the end of the page:
    
    dropdowncontent.init("searchlink", "right-bottom", 500, "mouseover")
    
    
    </script>
    But your second test uses the same id as the first test, so some browsers will give up and not init either. Go back to the demo page and follow the instructions for Step 1 and Step 2 exactly as written.

    Once you do that, it will work. Then you can begin customizing it.
    - John
    ________________________

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

  9. #9
    Join Date
    Jun 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm a true idiot! I hadn't seen that part of code...

    Thank you very much jscheuer1 and excuse me for my stupid distraction.

    Ive a last question (just a little curiosity): is it possible to move this part in the file .js in some way?

    dropdowncontent.init("searchlink", "right-bottom", 500, "mouseover")
    dropdowncontent.init("contentlink", "left-top", 300, "click")

    Thanks again for the support!

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,926
    Thanks
    43
    Thanked 3,190 Times in 3,154 Posts
    Blog Entries
    12

    Default

    Yes, but it would require using the onload event*. If your page has another script or scripts that already use the onload event, that can get a little complicated, but can be worked out. If this is the only script on your page, or the only script on your page that would be using the onload event, it is comparatively simple. You could add at the very end of the dropdowncontent.js file:

    Code:
    window.onload = function(){
    dropdowncontent.init("searchlink", "right-bottom", 500, "mouseover");
    dropdowncontent.init("contentlink", "left-top", 300, "click");
    };
    If you have a problem with doing it this way, (once again) a link to the page would be required to diagnose that.


    * The onload event can take various forms. So if you have another script or scripts on the page, and are unfamiliar with the concept of the onload event, it may already be in use without your being aware of it. The worst that can happen in such a case is that one or the other of the scripts or script attempting to use the onload event would stop working.
    - John
    ________________________

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

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
  •