Thanks for Highslide! I am using it for displaying ajax responses.
Everything is ok, but I wasted a lot of time and didn't find any solution for my issue.
I have a <div id='mydiv'> that is inside ajax response and is displayed inside HighSlide popup.
Now I need to change height of this div before the popup appears.
I tried onBeforeExpand, the needed div is getting wanted height value in the DOM (style='height:50px;'), but not in appearance (it looks like height:0px;).
Then I tried onAfterGetContent, but realised that I can't even access elements of my content.
With onBeforeExpand I do can access the elements of the content, but the new set of styles are not displayed, just only in the DOM code.
Please see the code below and some outputs.
- Code: Select all
hs.Expander.prototype.onBeforeExpand=function(sender){
var all = sender.content.getElementsByTagName('*');
for (var i=0, max=all.length; i < max; i++) {
var str=str+all[i].tagName+' - '+all[i].id+'\\n';;
}
alert(str);
OutPut:
- Code: Select all
undefinedDIV -
DIV -
DIV -
UL -
LI -
A -
SPAN -
LI -
A -
SPAN -
LI -
A -
SPAN -
LI -
A -
SPAN -
DIV -
DIV -
DIV - highslide_popup_wrapper_blank
DIV -
DIV - highslide_popup_wrapper
FORM -
TABLE -
TBODY -
TR -
TD -
INPUT -
TD -
TR -
TD -
INPUT -
TD -
TR -
TD -
INPUT -
TD -
TR -
TD -
INPUT -
TD -
TR -
TD -
INPUT -
TD -
TR -
TD -
INPUT -
TD -
TR -
TD -
INPUT -
TD -
TR -
TD -
INPUT -
TD -
TR -
TD -
INPUT -
TD -
DIV -
INPUT -
INPUT - popup_ok
DIV -
DIV -
SPAN -
SPAN -
- Code: Select all
hs.Expander.prototype.onAfterGetContent=function(sender){
var all = sender.content.getElementsByTagName('*');
for (var i=0, max=all.length; i < max; i++) {
var str=str+all[i].tagName+' - '+all[i].id+'\\n';;
}
alert(str);
OutPut:
- Code: Select all
undefinedDIV -
UL -
LI -
A -
SPAN -
LI -
A -
SPAN -
LI -
A -
SPAN -
LI -
A -
SPAN -
DIV -
DIV -
DIV -
SPAN -
SPAN -
As you see with onAfterGetContent I can't access the elements of my ajax response content.
Is there any solution for my issue? Thanks!