PDA

View Full Version : Modify slideshow to use elementID on the page



wijoder
06-25-2008, 10:52 PM
1) Ultimate Fade-in slideshow (v1.51)

2) http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.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

ddadmin
06-26-2008, 06:51 AM
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:


<script type="text/javascript" src="slideshow.js"></script>

Where "slideshow.js" contains the contents of the script. Is your company banning <script> tags altogether?

wijoder
06-26-2008, 03:38 PM
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:


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

Minos
06-27-2008, 12:53 PM
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.

jscheuer1
06-27-2008, 01:15 PM
If you can include a file, why not just put this in an otherwise blank file:


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

wijoder
06-27-2008, 08:38 PM
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

jscheuer1
06-28-2008, 05:57 AM
Can you do server side includes?

wijoder
06-30-2008, 09:53 PM
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.