:: Forum >>

Strange behaviour of Combo when launching through IIS

Hi Alex,

I already created a topic in this forum regarding this. I am posting again with clear inputs.

I am using ActiveWidgets 2.0.2 combo box in my HTML. If i launch the HTML from its physical location, everything works fine. But the same HTML launched through IIS URL, combo dropdown items are giving problem.

Some white box around the combo dropdown items is getting displayed and the items disappearing out of the screen. I am able to see only the white box.

This is my sample HTML Code:

<HTML>
<HEAD>
<TITLE>Sample HTML</TITLE>
</HEAD>
<style>
#Combo1
{
width: 250px;
height: 22px;
}


#Combo1-popup
{
width: 250px;
height: 44px;
border: 3px double #69f;
}


#Combo2
{
width: 250px;
height: 22px;
}


#Combo2-popup
{
width: 250px;
height: 44px;
border: 3px double #69f;
}


#Combo3
{
width: 250px;
height: 22px;
}


#Combo3-popup
{
width: 250px;
height: 44px;
border: 3px double #69f;
}


#Combo4
{
width: 250px;
height: 22px;
}


#Combo4-popup
{
width: 250px;
height: 44px;
border: 3px double #69f;
}

body.generalbodycolor
{
background-color: #000077;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8pt;
font-weight: normal;
color: #000000;
}

.XPBlueExTitle
{
color: #D6DFF5;
font: 15px Tahoma, Arial, Helvetica;
font-weight: bold;
}

.XPTitleBG
{ color: white;
font: 8pt Tahoma, Arial, Helvetica;
font-weight: bold;
}

td.labelsleft
{
FONT-FAMILY: Tahoma, Verdana, Arial, Helvetica, sans-serif;
FONT-SIZE: 8pt;
COLOR: white;
FONT-WEIGHT: normal;
TEXT-ALIGN: left;
}

</style>
<link href="Styles/AW/aw.css" rel="stylesheet"></link>
<script src="JS/AW/aw.js"></script>
<script>
var objCombo1 = new AW.UI.Combo;
var objCombo2 = new AW.UI.Combo;
var objCombo3 = new AW.UI.Combo;
var objCombo4 = new AW.UI.Combo;
</script>
<BODY class="generalbodycolor">
<form action="submit" name="frmMB" method="POST">
<TABLE width="100%" cellpadding="0" cellspacing="0" style="margin-top:0;margin-left:0;margin-right:0;margin-bottom:0;" align="center">
<TR>
<TD height="15" width="50%" align="center" class="XPTitleBG">Current Template
</TD>
<TD width="50%" align="center" class="XPTitleBG">Reference Template
</TD>
</TR>
</Table>
<TABLE width="100%" cellpadding="0" border="1" cellspacing="0" align="center">
<TR>
<TD height="65" width="50%">
<Table width="100%" class="VisibleSectionGridWithBorder" height="63">
<tr>
<td class="labelsleft" width="25%">Context
</td>
<td width="75%">
<script>
document.write('<div id="Combo1" style="overflow:hidden"></div>');
objCombo1.setId("Combo1");
objCombo1.setItemText(["Item Text Template with more than 25 chars", "Item Text 2", "Item Text 3", "Item Text 4", "Item Text 5", "Item Text 6", "Item Text 7", "Item Text 8", "Item Text 9", "Item Text 10"]);
objCombo1.setItemCount(10);
objCombo1.getPopupTemplate().setStyle("height", (5) * 18 + 'px');
objCombo1.refresh();
</script>
</td>
</tr>
<tr>
<td class="labelsleft" width="25%">Template
</td>
<td width="75%">
<script>
document.write('<div id="Combo2" style="overflow:hidden"></div>');
objCombo2.setId("Combo2");
objCombo2.setItemText(["Item Text Template with more than 25 chars", "Item Text Template with more than 25 chars 2", "Item Text Template with more than 25 chars 3", "Item Text Template with more than 25 chars 4", "Item Text Template with more than 25 chars 5", "Item Text Template with more than 25 chars 6", "Item Text Template with more than 25 chars 7", "Item Text Template with more than 25 chars 8", "Item Text Template with more than 25 chars 9", "Item Text Template with more than 25 chars 10"]);
objCombo2.setItemCount(10);
objCombo2.getPopupTemplate().setStyle("height", (5) * 18 + 'px');
objCombo2.refresh();
</script>
</td>
</tr>
</table>
</TD>
<TD width="50%" class="XPTitleBG">
<Table width="100%" class="VisibleSectionGridWithBorder" height="63">
<tr>
<td class="labelsleft" width="25%">Context
</td>
<td width="75%"><script>
document.write('<div id="Combo3" style="overflow:hidden"></div>');
objCombo3.setId("Combo3");
objCombo3.setItemText(["Item Text 1", "Item Text 2", "Item Text 3", "Item Text 4", "Item Text 5", "Item Text 6", "Item Text 7", "Item Text 8", "Item Text 9", "Item Text 10"]);
objCombo3.setItemCount(10);
objCombo3.getPopupTemplate().setStyle("height", (5) * 18 + 'px');
objCombo3.refresh();
</script>
</td>
</tr>
<tr>
<td class="labelsleft" width="25%">Template
</td>
<td width="75%">
<script>
document.write('<div id="Combo4" style="overflow:hidden"></div>');
objCombo4.setId("Combo4");
objCombo4.setItemText(["Item Text Template with more than 25 chars", "Item Text Template with more than 25 chars 2", "Item Text Template with more than 25 chars 3", "Item Text Template with more than 25 chars 4", "Item Text Template with more than 25 chars 5", "Item Text Template with more than 25 chars 6", "Item Text Template with more than 25 chars 7", "Item Text Template with more than 25 chars 8", "Item Text Template with more than 25 chars 9", "Item Text Template with more than 25 chars 10"]);
objCombo4.setItemCount(10);
objCombo4.getPopupTemplate().setStyle("height", (5) * 18 + 'px');
objCombo4.refresh();
</script>
</td>
</tr>
</table>
</TD>
</TR>
</Table>
</form>
</Body>
</HTML>


But this is giving problem only in some of the environments like mine.

My system specification:

Internet Explorer:
Version : 6.0.2800.1106 (SP1)
Client Strength: 128 bit
Product ID: 55736-579-6588582-04251

Operating System: Microsoft Windows 2000 Professional Edition

Kindly help me in this regard.
Ram
Tuesday, April 3, 2007
Hi Alex,

My problem was solved. I added the following code segment (I took this code segment from previous forum) at the end of aw.js.

if (AW.ie) {

new AW.UI.Combo;

AW.UI.Combo.prototype.showPopup = function(){
var popup = window.createPopup();
this.$popup = popup;
AW.$popup = this;

var doc = popup.document;
doc.open();

if (AW.strict){
doc.write("<!DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01\/\/EN\" \"http:\/\/www.w3.org/TR/html4/strict.dtd\">");
}

var cls = document.getElementsByTagName("html")[0].className;

doc.write("<html class=\"aw-popup-window aw-system-control " + cls + "\"><head>");

AW.register(doc.parentWindow);

for (var i=0; i<document.styleSheets.length; i++){
doc.write(document.styleSheets[i].owningElement.outerHTML);
}

doc.write("</head><body onselectstart=\"return false\" oncontextmenu=\"return false\">");
doc.write(this.getPopupTemplate().toString());
doc.write("</body></html>");
doc.close();

var ref = this.element();

var left = 0;
var top = ref.offsetHeight;
var width = ref.offsetWidth;
var height = 1;

popup.show(left, top, width, height, ref);

this.setTimeout(function(){
width = Math.max(doc.body.scrollWidth, width);
height = Math.max(doc.body.scrollHeight+1, 20);
popup.show(left, top, width, height, ref);
ref = null;
}, 100);
};
}


Thank you very much
Ram
Tuesday, April 3, 2007

This topic is archived.


Back to support forum

Forum search