Results 1 to 7 of 7

Thread: Blending Image Slide Show

  1. #1
    Join Date
    Apr 2007
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Blending Image Slide Show

    1) Script Title: Blending Image Slide Show

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

    3) Describe problem: I would like to have the blending image slide show apear and work within the "Ajax Contentarea". Is this posible. I have tried for days to get it to work but it doesnt. I am required to place the Javascript in the body so I have been placeing it in the content area, I think that must be wrong. I want this to work on the index.html page. Does anybody know how it should be set up?

  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

    Much depends upon the specifics of your implementation. Please provide a link to your problem page.
    - John
    ________________________

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

  3. #3
    Join Date
    Apr 2007
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    http://www.salisburybeachhome.com

    Thanks for sresponding. I wanted the blending image slide show to begin on the index page. I have moved stuff around so much trying to get it to work but no matter what I do, it no work. I am sure that the two javascripts dont belong in the same <td> and that may be the problem but it will work on my local browser but not when I upload it to a server.

    Any help would be appreciated.

  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

    First of all, in order to be in compliance with Dynamic Drive's Terms of Use, you need to include the credits for the Dynamic Drive scripts that you are using right in the source code of the page(s) that use them, ex:

    Code:
    <script type="text/javascript" src="js/dynamicajaxpage.js">
    /***********************************************
    * Dynamic Ajax Content- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    </script>
    <script type="text/javascript" src="js/photo.js">
    //*****************************************
    // Blending Image Slide Show Script- 
    // © Dynamic Drive (www.dynamicdrive.com)
    // For full source code, visit http://www.dynamicdrive.com/
    //*****************************************
    </script>
    <script type="text/javascript" src="js/pollcont.js" ></script>
    Not:

    Code:
    <script type="text/javascript" src="js/dynamicajaxpage.js"></script>
    <script language="JavaScript1.1" src="js/photo.js"></script>
    <script language="JavaScript1.1" src="js/pollcont.js" ></script>
    as you currently have them.

    Now, where you have:

    Code:
    <div id="contentarea">
    <script type="text/javascript">ajaxpage('p_home.html', 'contentarea') //load "p_home.html" into "contentarea" DIV
    </script>
    <script language="JavaScript1.1" src="js/photo_show.js"></script>
    
    						</div>
    Since you are loading the show with the page anyway, this would be better:

    Code:
    <div id="contentarea" style="display:none;"></div>
    <div id="theShow"><img src="house_pics/rot_ocean.jpg" name="slide" border=0 style="filter:blendTrans(duration=3)">
    <script type="text/javascript" src="js/photo_show.js"></script></div>
    Once we've broken it up like that, we can do some simple display style manipulation as regards the Ajax stuff here:

    Code:
            <div id="globalNav"> 
                <ul> 
                  <li ><a href="javascript:ajaxpage('p_home.html', 'contentarea');">Home</a></li> 
                  <li ><a href="javascript:ajaxpage('p_area.html', 'contentarea');">Area</a></li> 
                  <li ><a href="javascript:ajaxpage('p_demo.html', 'contentarea');">Demographics</a></li> 
                  <li ><a href="javascript:ajaxpage('p_loc.html', 'contentarea');">Location</a></li> 
                </ul> 
            </div>
    Like so:

    Code:
    <script type="text/javascript">
    function togShow(state){
    document.getElementById('theShow').style.display=state? 'block' : 'none';
    document.getElementById('contentarea').style.display=state? 'none' : 'block';
    }
    </script>
            <div id="globalNav"> 
                <ul> 
                  <li ><a href="#" onclick="togShow(1);return false;">Home</a></li> 
                  <li ><a href="#" onclick="ajaxpage('p_area.html', 'contentarea');togShow(0);return false;">Area</a></li> 
                  <li ><a href="#" onclick="ajaxpage('p_demo.html', 'contentarea');togShow(0);return false;">Demographics</a></li> 
                  <li ><a href="#" onclick="ajaxpage('p_loc.html', 'contentarea');togShow(0);return false;">Location</a></li> 
                </ul> 
            </div>
    - John
    ________________________

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

  5. #5
    Join Date
    Apr 2007
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Blending Image Slide Show

    Thanks John, I will give it a try. Thought I was in compliance by just having it on the javascript page's, but I will make the necessary adjustments as you recomended. I appreciate your help and time in this matter.

  6. #6
    Join Date
    Apr 2007
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Works great John. A little sluggish but it is doing the job. Thanks heaps......I almost gave up, well I did give up but I am one of those people who just has to know y the code didnt work. I spent days of frustration.

    http://www.salisburybeachhome.com

  7. #7
    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

    You could probably speed things up by validating to a strict or transitional HTML 4.01 DOCTYPE rather than the unsupported XHTML one you are using and by optimizing your images. Optimizing the images would probably net the biggest gains.

    BTW, you only need this:

    Code:
    <script type="text/javascript">
    function togShow(state){
    document.getElementById('theShow').style.display=state? 'block' : 'none';
    document.getElementById('contentarea').style.display=state? 'none' : 'block';
    }
    </script>
    Once on the page. The first one will do nicely.
    - 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
  •