Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I've been testing a banner-rotation script that is part html and part js. The html part goes after the <body> tag and the js part goes just before the </body> tag, however I'm having the following issues that I need to resolve. Using 'View--Html Code of Page--Additional attributes in body' doesn't work because the RC editor doesn't allow me to paste the js code before the </body> tag, so I can only do this externally using Notepad or similar (and then the banner rotation works), but this of course is no good because if I then want to edit the page via RC, all of that code is removed. So how can I place the js code where I want to place it before the </body> tag using the RC editor? The other issues I'm having is that the images are not displayed exactly central within the container (they're slightly offset to the right) and the message 'Undefined' is displayed after the last image/banner. Thanks if anyone can help. |
||||
|
You can just create a HTML Code or JavaSCript Code element. Place it somewhere on your page (probably on the very bottom) and uncheck the "Create Div around element" option. Double click it and paste your code into there. (With script tags if it you use a HTML Code, without if you your JavaScript code element) |
||||
|
Ok, placing a code element at the very bottom of the page and pasting the JavaScript into there worked! Thank you very much for the suggestion! :) However I still have the problem of images not being centred (they're still slightly offset to the right) and the message 'Undefined' is still displayed after the last image. |
||||
|
Difficult to say without seeing it, that seems likely to be caused by that banner you are using. |
||||
|
Thanks again for helping. Turns out that the default cell padding values of 10 was the reason. They're now set to 0 and the images now centre exactly. I'm still getting the 'Undefined' message though after the last image is shown, but I think that's something to do with the script. |
||||
|
Turns out the count value in the JS code was set to 6, but there were only 5 images/banners, so I just reset the count value. Now everything's fine :) |
||||
|
Ah, thanks for the update. Nice! |
|