Results 1 to 8 of 8

Thread: Modify slideshow to use elementID on the page

  1. #1
    Join Date
    Jun 2008
    Location
    Los Angeles
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Modify slideshow to use elementID on the page

    1) Ultimate Fade-in slideshow (v1.51)

    2) http://www.dynamicdrive.com/dynamici...nslideshow.htm

    3) My company CMS vendor has banned JavaScript within the body tag of the HTML pages. The actual JScript page has been changed into an ASP page and then is serverside included as the page formats in CMS but I can't invoke the function to use the slideshow on the page where it is needed.

    I figure I have to do something with elementID in the javascript page and then place the elementID name inside of a div tag. I have been working for hours and cannot get the the right combination of script in jscript page and elementID in the body of the page to make this work. I could really use some assistance.

    It was so much easier when all I had to do was copy a really cool JScript code into my page and adjust params to make it all work. This has turned my brain to mush. :-)

    thanks

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

    Default

    Well, you can move the script into an external .js file, but at the minimum you'd still need to add to your BODY a script reference such as:

    Code:
    <script type="text/javascript" src="slideshow.js"></script>
    Where "slideshow.js" contains the contents of the script. Is your company banning <script> tags altogether?

  3. #3
    Join Date
    Jun 2008
    Location
    Los Angeles
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Red face

    Quote Originally Posted by ddadmin View Post
    Well, you can move the script into an external .js file, but at the minimum you'd still need to add to your BODY a script reference such as:

    Code:
    <script type="text/javascript" src="slideshow.js"></script>
    Where "slideshow.js" contains the contents of the script. Is your company banning <script> tags altogether?
    Unfortunatly, yes. No script tags allowed. I can, however, use CSS tags. I am pretty sure, based on a LOT of research on the Web, that I can evoke a jscript function through the use of elementID.

    The way the system is currently set up, I create an ASP page and the system then server side includes the jscript in the head of the formatting page. When you view source, all the code is actually in the page but I have to then invoke the code somewhere on the page and that is where the wheels are falling off. I have tried every example I could find, cracked the books and for some reason (probably simple) I am just not getting the slideshow to work.

    thanks for the response. I am hoping someone will have familiarity with calling a script command via the elementid and know how to modify the slideshow and what to place in the body of the page. Needless to say, I am not a jscript author.

  4. #4
    Join Date
    Dec 2004
    Posts
    177
    Thanks
    0
    Thanked 18 Times in 17 Posts

    Default

    Is it possible? Sure. In fact, all the script is doing now is dynamically creating <div>s and assigning them IDs and other settings. Will it take a bit of re-writing? Yeah...and before I venture into the task, I just want to make sure:

    You ARE allowed to have scripts in the head section, correct? Just not within the body, if I understood correctly.

    -N.
    Verzeihung!

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

    If you can include a file, why not just put this in an otherwise blank file:

    Code:
    <script type="text/javascript">
    //new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
    new fadeshow(fadeimages, 140, 225, 0, 3000, 1, "R")
    </script>
    and include that file where you otherwise would have put the above code.
    - John
    ________________________

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

  6. #6
    Join Date
    Jun 2008
    Location
    Los Angeles
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Red face

    Quote Originally Posted by Minos View Post
    Is it possible? Sure. In fact, all the script is doing now is dynamically creating <div>s and assigning them IDs and other settings. Will it take a bit of re-writing? Yeah...and before I venture into the task, I just want to make sure:

    You ARE allowed to have scripts in the head section, correct? Just not within the body, if I understood correctly.

    -N.
    The CMS we use has an HTML editor function that allows us almost anything except <script>.

    2nd start. The first attempt at a message was getting tedious as heck so maybe I can just show the actual coding of the page with some annotation to explain what is going on with the page. Unfortunatly, I am away from my desk today. Let me come back on Monday and I will set up a "look-see" at the test bed page I created. That should make things ever so much easier.

    thanks for your help

    bill

  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

    Can you do server side includes?
    - John
    ________________________

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

  8. #8
    Join Date
    Jun 2008
    Location
    Los Angeles
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry to take so long. An admin's work is never done. I put a couple of pages on my website that show the current status - none. :-( Fairly straight forward. On this page:

    http://www.longbeach.gov/test/dynamicdrive.html

    is preformatted text with the script with changes and the actual page as it is saved by the content management system. As you can see, the page actually is nothing but a bunch of jscript itself. The problem is the stored text that is displayed is blocked from actually having script.

    The 2nd page is an actual page:

    http://www.longbeach.gov/test/fadeshow.asp

    where the compiled page is visible. Viewing the source code will show you what the browser gets to see having all the jscript has been executed and the the text displayed. I figure I have to get an elementID into the div tag and somehow get the browser to execute the fadeshow at the point of entry based upon the tag with the proper elementID.

    I got the theory but the practice is woefully inadequate.

    Thanks all for the help and suggestions.

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
  •