Saturday, March 31, 2012

Table Style

I have the following table in ascx , when I click the button the table style
not showing in the popup , it is ONLY showing on the page not in the
popup...WHY?

<TABLE style="BACKGROUND: #d8e8f5;CURSOR:hand" bgcolor="#d8e8f5"
id="tblMenu" cellSpacing="0"cellPadding="2" width="150" border="1">
<TR>
<TD class="standerdfont" >New Document</TD>
</TR>
<TR>
<TD class="standerdfont">New Folder</TD>
</TR>
</TABLE
this table is shown when user click the button as following:
<TABLE id="Table6" cellSpacing="0" cellPadding="0" width="560" border="0">
<TR>
<TH style="HEIGHT: 14px" vAlign="middle" scope="col" align="right" width="67">
<IMG id=imgAddNew
onmouseover="MM_swapImage('Image15','','/images/<%=strImgName_New_O%>',1)"
style="CURSOR: hand" onclick="showMenu('tblMenu',100,44);"
onmouseout=MM_swapImgRestore() height=23
src="MailTools/images/<%=strImgName_New%>" width=59 border=0 name=Image15
></TH
</table
the javascript function is :

function showMenu(menu, width , height)
{

varlefter= event.clientX;
varleftoff= event.offsetX;
vartopper= event.clientY;
vartopoff= event.offsetY;
varoPopup= window.createPopup();
varoPopBody= oPopup.document.body;
varHTMLContent= eval(menu).innerHTML;
oPopBody.innerHTML = HTMLContent;
oPopup.show(lefter - leftoff - 2, topper - topoff
+22,width,height,document.body);
}In yout javascript function your manipulate with variables. You never change
the html of the popup window. Should be

oPopup.document.body.innerHTML = HTMLContent;

Eliyahu

"Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
news:68DF83CD-6146-4A18-AF92-DBE3AC52FDBE@.microsoft.com...
> I have the following table in ascx , when I click the button the table
style
> not showing in the popup , it is ONLY showing on the page not in the
> popup...WHY?
> <TABLE style="BACKGROUND: #d8e8f5;CURSOR:hand" bgcolor="#d8e8f5"
> id="tblMenu" cellSpacing="0" cellPadding="2" width="150" border="1">
> <TR>
> <TD class="standerdfont" >New Document</TD>
> </TR>
> <TR>
> <TD class="standerdfont">New Folder</TD>
> </TR>
> </TABLE>
> this table is shown when user click the button as following:
> <TABLE id="Table6" cellSpacing="0" cellPadding="0" width="560" border="0">
> <TR>
> <TH style="HEIGHT: 14px" vAlign="middle" scope="col" align="right"
width="67">
> <IMG id=imgAddNew
> onmouseover="MM_swapImage('Image15','','/images/<%=strImgName_New_O%>',1)"
> style="CURSOR: hand" onclick="showMenu('tblMenu',100,44);"
> onmouseout=MM_swapImgRestore() height=23
> src="http://pics.10026.com/?src=MailTools/images/<%=strImgName_New%>" width=59 border=0 name=Image15
> ></TH>
> </table>
>
> the javascript function is :
>
> function showMenu(menu, width , height)
> {
> var lefter = event.clientX;
> var leftoff = event.offsetX;
> var topper = event.clientY;
> var topoff = event.offsetY;
> var oPopup = window.createPopup();
> var oPopBody = oPopup.document.body;
> var HTMLContent = eval(menu).innerHTML;
> oPopBody.innerHTML = HTMLContent;
> oPopup.show(lefter - leftoff - 2, topper - topoff
> + 22, width,height,document.body);
> }
I modified it as following and still wont display the table style

function showMenu(menu, width , height)
{

varlefter= event.clientX;
varleftoff= event.offsetX;
vartopper= event.clientY;
vartopoff= event.offsetY;
varoPopup= window.createPopup();
varHTMLContent= eval(menu).innerHTML;
oPopup.document.body.innerHTML = HTMLContent;
oPopup.show(lefter - leftoff - 2, topper - topoff
+22,width,/*newHeight*/height,document.body);
}

"Eliyahu Goldin" wrote:

> In yout javascript function your manipulate with variables. You never change
> the html of the popup window. Should be
> oPopup.document.body.innerHTML = HTMLContent;
> Eliyahu
> "Raed Sawalha" <RaedSawalha@.discussions.microsoft.com> wrote in message
> news:68DF83CD-6146-4A18-AF92-DBE3AC52FDBE@.microsoft.com...
> > I have the following table in ascx , when I click the button the table
> style
> > not showing in the popup , it is ONLY showing on the page not in the
> > popup...WHY?
> > <TABLE style="BACKGROUND: #d8e8f5;CURSOR:hand" bgcolor="#d8e8f5"
> > id="tblMenu" cellSpacing="0" cellPadding="2" width="150" border="1">
> > <TR>
> > <TD class="standerdfont" >New Document</TD>
> > </TR>
> > <TR>
> > <TD class="standerdfont">New Folder</TD>
> > </TR>
> > </TABLE>
> > this table is shown when user click the button as following:
> > <TABLE id="Table6" cellSpacing="0" cellPadding="0" width="560" border="0">
> > <TR>
> > <TH style="HEIGHT: 14px" vAlign="middle" scope="col" align="right"
> width="67">
> > <IMG id=imgAddNew
> > onmouseover="MM_swapImage('Image15','','/images/<%=strImgName_New_O%>',1)"
> > style="CURSOR: hand" onclick="showMenu('tblMenu',100,44);"
> > onmouseout=MM_swapImgRestore() height=23
> > src="http://pics.10026.com/?src=MailTools/images/<%=strImgName_New%>" width=59 border=0 name=Image15
> > ></TH>
> > </table>
> > the javascript function is :
> > function showMenu(menu, width , height)
> > {
> > var lefter = event.clientX;
> > var leftoff = event.offsetX;
> > var topper = event.clientY;
> > var topoff = event.offsetY;
> > var oPopup = window.createPopup();
> > var oPopBody = oPopup.document.body;
> > var HTMLContent = eval(menu).innerHTML;
> > oPopBody.innerHTML = HTMLContent;
> > oPopup.show(lefter - leftoff - 2, topper - topoff
> > + 22, width,height,document.body);
> > }
>

0 comments:

Post a Comment