- This topic is empty.
April 24, 2014 at 8:17 am #168586
I have to deal with a JS problem, and want to get a better understanding of how JS works. I am not a sophisticated user, but I can read code to some extent and follow routines, handle some CSS, and so on.
Could anybody shed some light on this situation? Where would I look for a call to the JS files, in the php or in the templates? How do these connect?
Thanks in advance for any advice!April 24, 2014 at 10:54 pm #168644
Hi Shane thanks for the message.
Yes, I think I figured it out, but let me bounce an idea or two off of you, if I may. It turned out the parser to change the code from bb to html was working fine, its just the buttons that aren’t working. I was a little unclear about that before.
So I found that the buttons are using a function called surroundText, and I do have a working sample to inspect.
So, if I have a call to a JS script in my header, (of any name) and that JS script properly defines the function called surroundText, am I good to go? Because this type of code is easy to find online.
Thanks again for the help!April 24, 2014 at 11:03 pm #168646shaneismeParticipant
Yes, as long as the JS file you add doesn’t have any dependencies or problems with any other script on the site :)April 24, 2014 at 11:50 pm #168649
Ah great! Thanks so much, I think I can avoid those two pitfalls! Cheers!~!