473,387 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

DropDownList SelectedIndexChanged window.showModalDialog

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
Nov 18 '05 #1
6 5382
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

Nov 18 '05 #2
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

Nov 18 '05 #3
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
>
>
>



Nov 18 '05 #4
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
>
>
>


Nov 18 '05 #5
Scott:

The URL property on a dialog is read-only. You cant change it once you set
it, even if it is the same page (ie posting back to self). I figured this
out recently and was a pain in the butt.

Try putting the HTML inside the dialog inside of an IFrame. Thats what I
did and it fixed the problem.

Best of luck!

-Mike
"Scott Lee" <sc*******@NOSPAMhantzgroup.com> wrote in message
news:ee**************@TK2MSFTNGP14.phx.gbl...
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
>> >
>> >
>> >
>
>


Nov 18 '05 #6
A coworker of mine just suggested that I add a <base target=_self> tag to
the HEAD section and not use SmartNavigation. That worked also.

Thank you for your time and concern,
Scott Lee
sc*******@hantzgroup.com
"Mike" <sp************@thenullset.com> wrote in message
news:eT**************@tk2msftngp13.phx.gbl...
Scott:

The URL property on a dialog is read-only. You cant change it once you set it, even if it is the same page (ie posting back to self). I figured this
out recently and was a pain in the butt.

Try putting the HTML inside the dialog inside of an IFrame. Thats what I
did and it fixed the problem.

Best of luck!

-Mike
"Scott Lee" <sc*******@NOSPAMhantzgroup.com> wrote in message
news:ee**************@TK2MSFTNGP14.phx.gbl...
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
>> >
>> >
>> >
>
>



Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: ritskits | last post by:
I have the dropdownlist that is populated when the form is loaded. I have the button that opens search child window using the modalwindowdialog and it returns the value that I want to add to the...
1
by: Donal | last post by:
I have 3 related dropdowns. When the 1st is changed, the 2nd is updated, and when the 2nd is changed, the 3rd is updated. When i change the 1st dropdown (sites), the SelectedIndexChanged fires...
4
by: DotNetJunky | last post by:
I have built a control that runs an on-line help system. Depending on the category you selected via dropdownlist, it goes out and gets the child subcategories, and if there are any, adds a new...
3
by: Corobori | last post by:
I am looking for a sample showing the following: I have one form (say frmProducts) where there is a dropdown list containing products. My users want to make this dropdown list more usable by...
0
by: ritskits | last post by:
I have the dropdownlist that is populated when the form is loaded. I have the button that opens search child window using the modalwindowdialog and it returns the value that I want to add to the...
2
by: Marc Robitaille | last post by:
Hello, I set the DataSource property of a DropDownList to as DataSet that is filled from a SQLDataAdapter. The AutoPostBack property of that DropDownList is set to True. When the...
4
by: David | last post by:
Hi all, I am doing this in a web page... I have a dropdownlist that autopostback. This sets me a filter criteria for items to display in a datalist. In the datalist, I have edit...
11
by: Santosh | last post by:
Dear all , i am writting following code. if(Page.IsPostBack==false) { try { BindSectionDropDownlist();
5
by: revbart | last post by:
Yep, that's me. I'll bet I've read a hundred articles somewhere or another, but I just can't get the thing to work. I'm working on a custom solution. One of the major UIs includes a calendar-style...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.