Hi,
I'm not sure am I allowed to post this topic here, but here's my problem...
Let's make this simple, I am totally newbie in coding.
I installed a lightbox patch to FCKeditor, and I tried to modify it a bit so I could add a title into it. I kind of managed but...
Here's the html code which I added to the html file:
<div> <br /> <input id="txtTitleLightBox" style="width: 100%" type="text" /> </div>
And these are the modified codes which I added to the js file:
var rel = oLink.rel; if (rel) { var type; if (rel.indexOf("[") > 0) type = rel.substring(0,rel.indexOf("[")); else type = rel; var oE = GetE('rad'+type); if (oE) { GetE('txtTitleLightBox').value= title; GetE('txtGroupLightBox').value= rel.substring(rel.indexOf("[")+1, rel.indexOf("]")); GetE('chkLightBox').checked = true; GetE('rad'+type).checked = true; } }
if (GetE('chkLightBox').checked && oLink) { var rel = "lightbox" var rad = document.getElementsByName('radLightBoxType') for (var i=0; i < rad.length; i++) { if (rad[i].checked) { rel = rad[i].value; break; } } oLink.title = title var title = GetE('txtTitleLightBox').value = title; oLink.rel = rel var group = GetE('txtGroupLightBox').value if (group) { oLink.rel += "[" + group + "]" } }
And what I added as new code were
oLink.title = title var title = GetE('txtTitleLightBox').value = title;
and
GetE('txtTitleLightBox').value= title;
The result is (eg) this kind of html text:
<a title="undefined" rel="lightbox" href="image/path"><img width="200" height="113" alt="" src="image/path" /></a>
So the title is undefined even if I fill something to the txtTitleJavaScript box...
If you want to investigate the full files, they are here:
http://jump.fm/IYOXH
.. thanks :s
btw, is this a custom forum or somewhere available to download? This looks awesome!