PDA

View Full Version : Picture button to text button with class-style



joac1424
09-28-2015, 08:56 PM
1) Script Title: Ultimate Fade-in slideshow

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

3) Describe problem:

Hello

Currently I'm using the Ultimate Fade-in slideshow on my website, and I have been using a picture to trigger the slideshow to start. However, I would like to replace the picture I'm using with a simple text. I'm running a Joomla website and I use a specific "class" for my links, which I also would like to use as the trigger for the slideshow.
I'm not very experienced with codes, so I cannot figure out how to do it - I'm hoping you guys here can help me out with this little issue.

Website: http://lrhr.dk/flyt-dig
You can see the picture with the following text: "Forstyr ham". I would like to have this "button" as text instead of a picture.

If you look at the contact page on the website (http://lrhr.dk/kontakt) you can see the text button with the following text: "Sådan finder du os". This is made with class="button" code, and I would like to have it just like that on the other page with the picture button.

I hope you can help me with this and the explanation is understandable :)

Thanks in advance!

molendijk
09-28-2015, 09:22 PM
Try to replace

<a id="flytDig" name="flytDig" href="javascript:startShow();"><img src="/images/slideshowflyt_forstyrham.jpg" alt="" /></a>
with:

<a class="button" id="flytDig" name="flytDig" href="javascript:startShow();"><strong>Forstyr ham</strong></a>

joac1424
09-29-2015, 05:44 PM
I am having some trouble with it.. It was working perfectly when I pasted the code you gave me, but when I update the page nothing happens when I want to start the slideshow. How can that be?

styxlawyer
09-29-2015, 06:06 PM
There's no action associated with your link. the source code (line 285) is as follows:



<a id="flytDig" class="button" name="flytDig"><strong>Forstyr ham</strong></a>


Where is the 'href' attribute?

joac1424
09-29-2015, 06:44 PM
There's no action associated with your link. the source code (line 285) is as follows:



<a id="flytDig" class="button" name="flytDig"><strong>Forstyr ham</strong></a>


Where is the 'href' attribute?

Thanks I see that is missing.
Here is the weird thing. When I paste the exact code provided and save the page, it's saved. But if I go to the editor again it has automatically removed the href attribute. I don't understand how it can do that... Do any of you know how that can be?

Anyway, I have also tried to make the button bigger by increasing font size with the editor, but it's not working. Is it possible to make the font size bigger in a different way?

Thank you for the help :)

styxlawyer
09-29-2015, 06:50 PM
Your site is built with Joomla!, which means that you have to add an extension to add JavaScript code. Have a look at this link (http://extensions.joomla.org/extensions/extension/core-enhancements/coding-a-scripts-integration/add-custom-javascript).

If you don't use an extension the JavaScript will be deleted. That is standard behaviour for a Joomla! site.

joac1424
09-29-2015, 09:23 PM
Thank you very much for your help - I really appreciate it!
I have looked at the extension you link to, but I can't figure out how to use it for this. I'm making the javascript in a Joomla! article with JCE editor. The JCE editor should be able to handle javascripts (i have followed this guide here: https://www.joomlacontenteditor.net/support/faq/item/scripts-removed-on-saving) and it still doesn't work, so I don't know what is wrong, however it's working if I don't edit anything on the page :P

I don't know if you can solve the Joomla javascript issue - dont spend too much time, because I will live with the solution as it is now if it's too complicated to fix it and do it the right way.