It dawned on me that I could write the body's innerHTML to a textarea on a
newly opened window. Here is the HTML of the body:
--------------------------------
<IFRAME id=__hifSmartNav style="DISPLAY: none" name=__hifSmartNav
src="/aspnet_client/system_web/1_1_4322/SmartNav.htm"></IFRAME>
<FORM id=Form1 name=Form1
action=DispatchLoadOwnerOperatorEdit.aspx?LoadID=4 544 method=post
target=__hifSmartNav1097668664281 __smartNavEnabled="true"
__formAttached="true">
<INPUT type=hidden name=__EVENTTARGET> <INPUT type=hidden
name=__EVENTARGUMENT>
<INPUT type=hidden
value=dDwxMjUwMjI1NzY0O3Q8O2w8aTwxPjs+O2w8dDw7bDxp PDM+O2k8Nj47aTw3PjtpPDg+O2
k8Mjg+Oz47bDx0PHA8O3A8bDxvbkNsaWNrOz47bDxkb0NhbmNl bCgpXDtyZXR1cm4gZmFsc2VcOz
s+Pj47Oz47dDx0PHA8cDxsPERhdGFUZXh0RmllbGQ7RGF0YVZh bHVlRmllbGQ7PjtsPERlc2NyaX
B0aW9uO1RyYWlsb3JJRDs+Pjs+O3Q8aTwxPjtAPDUyMTUyLVZh bjs+O0A8MTs+Pjs+Ozs+O3Q8dD
xwPHA8bDxEYXRhVGV4dEZpZWxkO0RhdGFWYWx1ZUZpZWxkOz47 bDxGdWxsTmFtZTtPd25lck9wZX
JhdG9ySUQ7Pj47Pjt0PGk8Mz47QDxQbGVhc2UsICBDaG9vc2Ug T25lO0RvYmJzLCBCb2I7RHJpdm
VyLCBUZXN0Oz47QDwtMTsxOzE2Oz4+O2w8aTwxPjs+Pjs7Pjt0 PHQ8O3Q8aTw0PjtAPFBsZWFzZS
BDaG9vc2UgT25lO0ExQjJDM0Q0IC0gMjAwNyBQZXRlcmJ1aWx0 IE1vZGVsIEEgUmVkO0FBQTEyMy
AtIDIwMDEgUGV0ZXJidWlsdCBNb2RlbCBUIEdyZWVuO1paWFgy MjExIC0gMjAwMyBHZW9yZ2lhIG
RmZ2ZqayBramhraDs+O0A8LTE7MTs1Ozc7Pj47Pjs7Pjt0PHQ8 O3Q8aTwzPjtAPFBsZWFzZSBDaG
9vc2UgT25lO0RvYmJzLCBCb2I7Qm9iLCBBIERyaXZlcjs+O0A8 LTE7MTsxNzs+Pjs+Ozs+Oz4+Oz
4+Oz6CRGE8a2EDroCMLoyZiGMCviUVKQ== name=__VIEWSTATE>
<SCRIPT language=javascript type=text/javascript>
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("m icrosoft") > -1) {
theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</SCRIPT>
<SCRIPT language=JavaScript>
function doCancel() {
window.returnValue = false;
window.close();
}
</SCRIPT>
<SCRIPT language=JScript
src="/aspnet_client/system_web/1_1_4322/SmartNav.js"
type=text/JScript></SCRIPT>
<DIV style="BORDER-RIGHT: navy double; BORDER-TOP: navy double; Z-INDEX:
101; LEFT: 0px; BORDER-LEFT: navy double; WIDTH: 452px; BORDER-BOTTOM: navy
double; POSITION: absolute; TOP: 0px; HEIGHT: 368px; BACKGROUND-COLOR:
silver" ms_positioning="GridLayout">
<SPAN id=Label1 style="Z-INDEX: 101; LEFT: 16px; COLOR: navy; POSITION:
absolute; TOP: 8px; HEIGHT: 11px">OwnerOperator</SPAN>
<INPUT id=btnUpdate style="Z-INDEX: 102; LEFT: 104px; WIDTH: 105px;
POSITION: absolute; TOP: 320px" tabIndex=9 type=submit value=Update
name=btnUpdate>
<INPUT id=btnCancel style="Z-INDEX: 103; LEFT: 216px; WIDTH: 105px;
POSITION: absolute; TOP: 320px" onclick="doCancel();return false;"
tabIndex=10 type=submit value=Cancel name=btnCancel><SPAN id=Label4
style="Z-INDEX: 104; LEFT: 16px; COLOR: navy; POSITION: absolute; TOP:
104px; HEIGHT: 11px">Tractor</SPAN>
<SPAN id=Label2 style="Z-INDEX: 105; LEFT: 16px; COLOR: navy; POSITION:
absolute; TOP: 152px; HEIGHT: 8px">Trailor</SPAN>
<SELECT id=ddlTrailor style="Z-INDEX: 106; LEFT: 16px; WIDTH: 344px;
POSITION: absolute; TOP: 168px" name=ddlTrailor>
<OPTION value=1 selected>52152-Van</OPTION>
</SELECT>
<SELECT language=javascript id=ddlOwnerOperator style="Z-INDEX: 107; LEFT:
16px; WIDTH: 344px; POSITION: absolute; TOP: 24px"
onchange="__doPostBack('ddlOwnerOperator','')" name=ddlOwnerOperator>
<OPTION value=-1>Please, Choose One</OPTION>
<OPTION value=1 selected>Dobbs, Bob</OPTION>
<OPTION value=16>Driver, Test</OPTION>
</SELECT>
<SELECT id=ddlTractor style="Z-INDEX: 108; LEFT: 16px; VISIBILITY: visible;
WIDTH: 344px; POSITION: absolute; TOP: 120px" name=ddlTractor>
<OPTION value=-1 selected>Please Choose One</OPTION>
<OPTION value=1>A1B2C3D4 - 2007 Peterbuilt Model A Red</OPTION>
<OPTION value=5>AAA123 - 2001 Peterbuilt Model T Green</OPTION>
<OPTION value=7>ZZXX2211 - 2003 Georgia dfgfjk kjhkh</OPTION>
</SELECT>
<INPUT id=txtOrigin style="Z-INDEX: 109; LEFT: 16px; WIDTH: 216px; POSITION:
absolute; TOP: 216px" name=txtOrigin>
<SPAN id=Label3 style="Z-INDEX: 110; LEFT: 16px; COLOR: navy; POSITION:
absolute; TOP: 200px; HEIGHT: 11px">Origin</SPAN>
<INPUT id=txtPickup style="Z-INDEX: 111; LEFT: 16px; WIDTH: 216px; POSITION:
absolute; TOP: 264px" value="PINE BROOK, NJ" name=txtPickup>
<SPAN id=Label5 style="Z-INDEX: 112; LEFT: 16px; COLOR: navy; POSITION:
absolute; TOP: 248px; HEIGHT: 11px">Pickup</SPAN>
<INPUT id=txtDHMiles style="Z-INDEX: 113; LEFT: 256px; WIDTH: 104px;
POSITION: absolute; TOP: 216px" value=0 name=txtDHMiles>
<SPAN id=Label6 style="Z-INDEX: 114; LEFT: 256px; COLOR: navy; POSITION:
absolute; TOP: 200px; HEIGHT: 11px">DH Miles</SPAN>
<SPAN id=Label7 style="Z-INDEX: 115; LEFT: 16px; COLOR: navy; POSITION:
absolute; TOP: 56px; HEIGHT: 11px">Driver</SPAN>
<SELECT id=ddlDriver style="Z-INDEX: 118; LEFT: 16px; VISIBILITY: visible;
WIDTH: 344px; POSITION: absolute; TOP: 72px" name=ddlDriver>
<OPTION value=-1 selected>Please Choose One</OPTION>
<OPTION value=1>Dobbs, Bob</OPTION>
<OPTION value=17>Bob, A Driver</OPTION>
</SELECT>
</DIV>
</FORM>
----------------------------------------------
Thank you for you help,
Scott Lee
sc*******@hantzgroup.com
"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:eT**************@TK2MSFTNGP09.phx.gbl...
Hi Scott,
It sounds like SmartNavigation is causing a client-side syntax error in
the page but you're not see it in the modal form.
What happens if you launch the page as a regular Web page, not using
showModalDialog ? Can you see anything funny in the source?
Ken
"Scott Lee" <sc*******@NOSPAMhantzgroup.com> wrote in message
news:Oa**************@TK2MSFTNGP12.phx.gbl... The problem is associated with using this form in a popup opened via
window.showModalDialog. The HTML is well formed and all OPTIONS appear
in the SELECT, they just don't display. The ddls are filled via this code:
-----------------------------
Dim sb As New System.Text.StringBuilder(128)
Dim wsOO As New wsOwnerOperator.OwnerOperator
Dim drDriver As wsOwnerOperator.tdsOwnerOperators.DriversRow
Dim drTractor As
wsOwnerOperator.tdsOwnerOperators.OwnerOperatorTra ctorsRow
Dim li As System.Web.UI.WebControls.ListItem
Dim i As Integer
'clear the ddl
ddlTractor.Items.Clear()
ddlDriver.Items.Clear()
'get the dataset
_tdsOwnerOperators1 = wsOO.GetOwnerOperatorsFull
_tdsOwnerOperators1.EnforceConstraints = False
'add a column to allow display of the Driver's full name in the ddl
If _tdsOwnerOperators1.Drivers.Columns("FullName") Is Nothing Then
Dim col As New System.Data.DataColumn("FullName")
col.Expression = "LastName + ', ' + FirstName"
_tdsOwnerOperators1.Drivers.Columns.Add(col)
End If
'add a column to allow display of the tractor's make, model, year, and
license# in the ddl
If _tdsOwnerOperators1.OwnerOperatorTractors.Columns( "Description") Is
Nothing Then
Dim col As New System.Data.DataColumn("Description")
col.Expression = "TruckNumber + ' - ' + Year + ' ' + Make + ' ' + Model
+ '
' + Color"
_tdsOwnerOperators1.OwnerOperatorTractors.Columns. Add(col)
End If
_tdsOwnerOperators1.OwnerOperatorTractors.DefaultV iew.RowFilter =
"OwnerOperatorID = " & ddlOwnerOperator.SelectedValue & "OR
OwnerOperatorTractorID = -1"
li = New System.Web.UI.WebControls.ListItem("Please Choose One",
CStr(-1))
ddlTractor.Items.Add(li)
ddlDriver.Items.Add(li)
For i = 0 To
(_tdsOwnerOperators1.OwnerOperatorTractors.Default View.Count -
1)
li = New
System.Web.UI.WebControls.ListItem(CStr(_tdsOwnerO perators1.OwnerOperatorTra ctors.DefaultView(i).Item("Description")),
CStr(_tdsOwnerOperators1.OwnerOperatorTractors.Def aultView(i).Item("OwnerOpe ratorTractorID")))
ddlTractor.Items.Add(li)
Next
_tdsOwnerOperators1.Drivers.DefaultView.RowFilter = "OwnerOperatorID = "
& ddlOwnerOperator.SelectedValue & "OR OwnerOperatorID = -1"
For i = 0 To (_tdsOwnerOperators1.Drivers.DefaultView.Count - 1)
li = New
System.Web.UI.WebControls.ListItem(CStr(_tdsOwnerO perators1.Drivers.DefaultV iew(i).Item("FullName")),
CStr(_tdsOwnerOperators1.Drivers.DefaultView(i).It em("DriverID")))
ddlDriver.Items.Add(li)
Next
End Sub
------------------------------------------------------
If I set a break point in this code and setp through it, voila, it
displays.
If I don't it does not. The form sets SmartNavigation to true. If I
comment that out (causing the postback's response to the event to open
in another browser window), it works. I would assume that it is an IE
6.0.2800.1106 problem, except that it works if I set a break point in
the code.
I do the same thing in other forms throughout the site and have not
experienced this problem before.
As I cannot "view source" on a window opened via the showModalDialog
method,
and I cannot copy text from an alert, I do not know how I can get you
the HTML that is generated from the ASPX.
Thank you,
Scott Lee
sc*******@hantzgroup.com
"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:C3**********************************@microsof t.com... Hi Scott,
You didn't show us the code that is causing the problem, so I can only
guess at what may be causing this. Make sure that the rest of the HTML is
well-formed. Missing closing tags could be preventing the page from
rendering properly.
If you can post code that reproduces the problem, that would help a
lot.
Ken
"Scott Lee" wrote:
> I am displaying an ASP.Net generated form in a popup opened with
> window.showModalDialog.
>
> The form contains DropDownList controls. The first ddl is populated
> via
> databinding to a datatable, has its AutoPostBack set to true and has
> its
> SelectedIndexChanged event being handled in codebehind. The event
> fires
as > it should populating two more ddls.
>
> The problem is, the two ddls appear empty. I have used a javascript
alert > to look at the innerHTML of the body and the SELECT tags have the
correct > OPTION tags contained within them, but they display as empty.
>
> A funny thing is, if I set a break point in the SelectedIndexChanged
event > and step through the code, they will display properly. I have
examined they > HTML generated when I break and when I don't, and it is the same for
both. >
> This is strange, can anyone help me?
>
> Thank you,
> Scott Lee
> sc*******@hantzgroup.com
>
>
>