Connecting Tech Pros Worldwide Forums | Help | Site Map

situation with need to update dropdown on another page

Chris
Guest
 
Posts: n/a
#1: Nov 19 '05
I pop up a Modal form on a web page that allows the user to update the
selections of a dropdownlist via adding a new item to the db (Sql Server).The
only thing is this list is on the page beneath it. So when the user updates
the db with a new selection, and then closes the form, the page below must be
refreshed to see the new option.

Any ideas on adding the new option to the control below the modal form?

thanx.


Steve C. Orr [MVP, MCSD]
Guest
 
Posts: n/a
#2: Nov 19 '05

re: situation with need to update dropdown on another page


This client side javascript should do the trick:

window.opener.location.reload(true);

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


"Chris" <Chris@discussions.microsoft.com> wrote in message
news:A234F0A9-BFDC-4777-9370-DCCE6E81040D@microsoft.com...[color=blue]
>I pop up a Modal form on a web page that allows the user to update the
> selections of a dropdownlist via adding a new item to the db (Sql
> Server).The
> only thing is this list is on the page beneath it. So when the user
> updates
> the db with a new selection, and then closes the form, the page below must
> be
> refreshed to see the new option.
>
> Any ideas on adding the new option to the control below the modal form?
>
> thanx.
>[/color]


Steve C. Orr [MVP, MCSD]
Guest
 
Posts: n/a
#3: Nov 19 '05

re: situation with need to update dropdown on another page


This client side javascript should do the trick:

window.opener.location.reload(true);

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


"Chris" <Chris@discussions.microsoft.com> wrote in message
news:A234F0A9-BFDC-4777-9370-DCCE6E81040D@microsoft.com...[color=blue]
>I pop up a Modal form on a web page that allows the user to update the
> selections of a dropdownlist via adding a new item to the db (Sql
> Server).The
> only thing is this list is on the page beneath it. So when the user
> updates
> the db with a new selection, and then closes the form, the page below must
> be
> refreshed to see the new option.
>
> Any ideas on adding the new option to the control below the modal form?
>
> thanx.
>[/color]


Chris
Guest
 
Posts: n/a
#4: Nov 19 '05

re: situation with need to update dropdown on another page


I assume this is for the form that opened the showmodel pop-up?
If so, will this affect any of the fields/values on that form. I'm not
performing a post back so I do not want to reset the fields.
If on the parent page, where should I launch this?

would you know of a code behind method on the form that was popped up? I
know framewrok 2.0 has an option to access prevoius pages controls, but I'm
using 1.1.

thanx.

"Steve C. Orr [MVP, MCSD]" wrote:
[color=blue]
> This client side javascript should do the trick:
>
> window.opener.location.reload(true);
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
>
> "Chris" <Chris@discussions.microsoft.com> wrote in message
> news:A234F0A9-BFDC-4777-9370-DCCE6E81040D@microsoft.com...[color=green]
> >I pop up a Modal form on a web page that allows the user to update the
> > selections of a dropdownlist via adding a new item to the db (Sql
> > Server).The
> > only thing is this list is on the page beneath it. So when the user
> > updates
> > the db with a new selection, and then closes the form, the page below must
> > be
> > refreshed to see the new option.
> >
> > Any ideas on adding the new option to the control below the modal form?
> >
> > thanx.
> >[/color]
>
>
>[/color]
Chris
Guest
 
Posts: n/a
#5: Nov 19 '05

re: situation with need to update dropdown on another page


I assume this is for the form that opened the showmodel pop-up?
If so, will this affect any of the fields/values on that form. I'm not
performing a post back so I do not want to reset the fields.
If on the parent page, where should I launch this?

would you know of a code behind method on the form that was popped up? I
know framewrok 2.0 has an option to access prevoius pages controls, but I'm
using 1.1.

thanx.

"Steve C. Orr [MVP, MCSD]" wrote:
[color=blue]
> This client side javascript should do the trick:
>
> window.opener.location.reload(true);
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
>
> "Chris" <Chris@discussions.microsoft.com> wrote in message
> news:A234F0A9-BFDC-4777-9370-DCCE6E81040D@microsoft.com...[color=green]
> >I pop up a Modal form on a web page that allows the user to update the
> > selections of a dropdownlist via adding a new item to the db (Sql
> > Server).The
> > only thing is this list is on the page beneath it. So when the user
> > updates
> > the db with a new selection, and then closes the form, the page below must
> > be
> > refreshed to see the new option.
> >
> > Any ideas on adding the new option to the control below the modal form?
> >
> > thanx.
> >[/color]
>
>
>[/color]
Steve C. Orr [MVP, MCSD]
Guest
 
Posts: n/a
#6: Nov 19 '05

re: situation with need to update dropdown on another page


The two pages do not exist on the server at the same point in time,
therefore you must use client side code for this situation.
The code snippet I gave will cause the parent page to refresh as if the user
had clicked the reload button. Using client side script you could also
submit the parent page from the child page, or alter its controls.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net



"Chris" <Chris@discussions.microsoft.com> wrote in message
news:E24B455B-73F4-4532-B207-7FD14BEE3937@microsoft.com...[color=blue]
>I assume this is for the form that opened the showmodel pop-up?
> If so, will this affect any of the fields/values on that form. I'm not
> performing a post back so I do not want to reset the fields.
> If on the parent page, where should I launch this?
>
> would you know of a code behind method on the form that was popped up? I
> know framewrok 2.0 has an option to access prevoius pages controls, but
> I'm
> using 1.1.
>
> thanx.
>
> "Steve C. Orr [MVP, MCSD]" wrote:
>[color=green]
>> This client side javascript should do the trick:
>>
>> window.opener.location.reload(true);
>>
>> --
>> I hope this helps,
>> Steve C. Orr, MCSD, MVP
>> http://SteveOrr.net
>>
>>
>> "Chris" <Chris@discussions.microsoft.com> wrote in message
>> news:A234F0A9-BFDC-4777-9370-DCCE6E81040D@microsoft.com...[color=darkred]
>> >I pop up a Modal form on a web page that allows the user to update the
>> > selections of a dropdownlist via adding a new item to the db (Sql
>> > Server).The
>> > only thing is this list is on the page beneath it. So when the user
>> > updates
>> > the db with a new selection, and then closes the form, the page below
>> > must
>> > be
>> > refreshed to see the new option.
>> >
>> > Any ideas on adding the new option to the control below the modal form?
>> >
>> > thanx.
>> >[/color]
>>
>>
>>[/color][/color]


Steve C. Orr [MVP, MCSD]
Guest
 
Posts: n/a
#7: Nov 19 '05

re: situation with need to update dropdown on another page


The two pages do not exist on the server at the same point in time,
therefore you must use client side code for this situation.
The code snippet I gave will cause the parent page to refresh as if the user
had clicked the reload button. Using client side script you could also
submit the parent page from the child page, or alter its controls.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net



"Chris" <Chris@discussions.microsoft.com> wrote in message
news:E24B455B-73F4-4532-B207-7FD14BEE3937@microsoft.com...[color=blue]
>I assume this is for the form that opened the showmodel pop-up?
> If so, will this affect any of the fields/values on that form. I'm not
> performing a post back so I do not want to reset the fields.
> If on the parent page, where should I launch this?
>
> would you know of a code behind method on the form that was popped up? I
> know framewrok 2.0 has an option to access prevoius pages controls, but
> I'm
> using 1.1.
>
> thanx.
>
> "Steve C. Orr [MVP, MCSD]" wrote:
>[color=green]
>> This client side javascript should do the trick:
>>
>> window.opener.location.reload(true);
>>
>> --
>> I hope this helps,
>> Steve C. Orr, MCSD, MVP
>> http://SteveOrr.net
>>
>>
>> "Chris" <Chris@discussions.microsoft.com> wrote in message
>> news:A234F0A9-BFDC-4777-9370-DCCE6E81040D@microsoft.com...[color=darkred]
>> >I pop up a Modal form on a web page that allows the user to update the
>> > selections of a dropdownlist via adding a new item to the db (Sql
>> > Server).The
>> > only thing is this list is on the page beneath it. So when the user
>> > updates
>> > the db with a new selection, and then closes the form, the page below
>> > must
>> > be
>> > refreshed to see the new option.
>> >
>> > Any ideas on adding the new option to the control below the modal form?
>> >
>> > thanx.
>> >[/color]
>>
>>
>>[/color][/color]


Chris
Guest
 
Posts: n/a
#8: Nov 19 '05

re: situation with need to update dropdown on another page


mayb eI'm missing something. I still don't see where to trigger this. If what
you say is true then it must be triggered on the parent page. The pop-up is
closed by the user thus returning to that page. I don't know where that
trigger would be since I open the pop-up using:

btnxyz.Attributes.Add("onclick", "window.showModalDialog('../page.aspx',
'Dialog Arguments Value','dialogWidth: 490px; help:0; resizable:no;
center:yes; edge:sunken; status:no')")

also, if you reload on a new form (in my app) you are clearly the options
and field info.

so I'm wondering if there is a way to re-bind the dropdown each time the
dropdown is clicked/touched, thus showing the new option? Or something like
that. I can't do a post back in 1.1 since it will submit the form and I don't
want to do that yet. What I'm trying to do is common in windows forms.

thanx.

"Steve C. Orr [MVP, MCSD]" wrote:
[color=blue]
> The two pages do not exist on the server at the same point in time,
> therefore you must use client side code for this situation.
> The code snippet I gave will cause the parent page to refresh as if the user
> had clicked the reload button. Using client side script you could also
> submit the parent page from the child page, or alter its controls.
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
>
>
> "Chris" <Chris@discussions.microsoft.com> wrote in message
> news:E24B455B-73F4-4532-B207-7FD14BEE3937@microsoft.com...[color=green]
> >I assume this is for the form that opened the showmodel pop-up?
> > If so, will this affect any of the fields/values on that form. I'm not
> > performing a post back so I do not want to reset the fields.
> > If on the parent page, where should I launch this?
> >
> > would you know of a code behind method on the form that was popped up? I
> > know framewrok 2.0 has an option to access prevoius pages controls, but
> > I'm
> > using 1.1.
> >
> > thanx.
> >
> > "Steve C. Orr [MVP, MCSD]" wrote:
> >[color=darkred]
> >> This client side javascript should do the trick:
> >>
> >> window.opener.location.reload(true);
> >>
> >> --
> >> I hope this helps,
> >> Steve C. Orr, MCSD, MVP
> >> http://SteveOrr.net
> >>
> >>
> >> "Chris" <Chris@discussions.microsoft.com> wrote in message
> >> news:A234F0A9-BFDC-4777-9370-DCCE6E81040D@microsoft.com...
> >> >I pop up a Modal form on a web page that allows the user to update the
> >> > selections of a dropdownlist via adding a new item to the db (Sql
> >> > Server).The
> >> > only thing is this list is on the page beneath it. So when the user
> >> > updates
> >> > the db with a new selection, and then closes the form, the page below
> >> > must
> >> > be
> >> > refreshed to see the new option.
> >> >
> >> > Any ideas on adding the new option to the control below the modal form?
> >> >
> >> > thanx.
> >> >
> >>
> >>
> >>[/color][/color]
>
>
>[/color]
Chris
Guest
 
Posts: n/a
#9: Nov 19 '05

re: situation with need to update dropdown on another page


mayb eI'm missing something. I still don't see where to trigger this. If what
you say is true then it must be triggered on the parent page. The pop-up is
closed by the user thus returning to that page. I don't know where that
trigger would be since I open the pop-up using:

btnxyz.Attributes.Add("onclick", "window.showModalDialog('../page.aspx',
'Dialog Arguments Value','dialogWidth: 490px; help:0; resizable:no;
center:yes; edge:sunken; status:no')")

also, if you reload on a new form (in my app) you are clearly the options
and field info.

so I'm wondering if there is a way to re-bind the dropdown each time the
dropdown is clicked/touched, thus showing the new option? Or something like
that. I can't do a post back in 1.1 since it will submit the form and I don't
want to do that yet. What I'm trying to do is common in windows forms.

thanx.

"Steve C. Orr [MVP, MCSD]" wrote:
[color=blue]
> The two pages do not exist on the server at the same point in time,
> therefore you must use client side code for this situation.
> The code snippet I gave will cause the parent page to refresh as if the user
> had clicked the reload button. Using client side script you could also
> submit the parent page from the child page, or alter its controls.
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
>
>
> "Chris" <Chris@discussions.microsoft.com> wrote in message
> news:E24B455B-73F4-4532-B207-7FD14BEE3937@microsoft.com...[color=green]
> >I assume this is for the form that opened the showmodel pop-up?
> > If so, will this affect any of the fields/values on that form. I'm not
> > performing a post back so I do not want to reset the fields.
> > If on the parent page, where should I launch this?
> >
> > would you know of a code behind method on the form that was popped up? I
> > know framewrok 2.0 has an option to access prevoius pages controls, but
> > I'm
> > using 1.1.
> >
> > thanx.
> >
> > "Steve C. Orr [MVP, MCSD]" wrote:
> >[color=darkred]
> >> This client side javascript should do the trick:
> >>
> >> window.opener.location.reload(true);
> >>
> >> --
> >> I hope this helps,
> >> Steve C. Orr, MCSD, MVP
> >> http://SteveOrr.net
> >>
> >>
> >> "Chris" <Chris@discussions.microsoft.com> wrote in message
> >> news:A234F0A9-BFDC-4777-9370-DCCE6E81040D@microsoft.com...
> >> >I pop up a Modal form on a web page that allows the user to update the
> >> > selections of a dropdownlist via adding a new item to the db (Sql
> >> > Server).The
> >> > only thing is this list is on the page beneath it. So when the user
> >> > updates
> >> > the db with a new selection, and then closes the form, the page below
> >> > must
> >> > be
> >> > refreshed to see the new option.
> >> >
> >> > Any ideas on adding the new option to the control below the modal form?
> >> >
> >> > thanx.
> >> >
> >>
> >>
> >>[/color][/color]
>
>
>[/color]
Chris
Guest
 
Posts: n/a
#10: Nov 19 '05

re: situation with need to update dropdown on another page


Back at this again. Question if I relad the page isn't that the same as
re-submitting it? I've read that if the refresh button is used it might post
the form?

Also, can you please explain how and where to add the Javascript relad you
spoke of. If the form above is model, and I close it. where would the code
run?

thanx.

"Steve C. Orr [MVP, MCSD]" wrote:
[color=blue]
> The two pages do not exist on the server at the same point in time,
> therefore you must use client side code for this situation.
> The code snippet I gave will cause the parent page to refresh as if the user
> had clicked the reload button. Using client side script you could also
> submit the parent page from the child page, or alter its controls.
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
>
>
> "Chris" <Chris@discussions.microsoft.com> wrote in message
> news:E24B455B-73F4-4532-B207-7FD14BEE3937@microsoft.com...[color=green]
> >I assume this is for the form that opened the showmodel pop-up?
> > If so, will this affect any of the fields/values on that form. I'm not
> > performing a post back so I do not want to reset the fields.
> > If on the parent page, where should I launch this?
> >
> > would you know of a code behind method on the form that was popped up? I
> > know framewrok 2.0 has an option to access prevoius pages controls, but
> > I'm
> > using 1.1.
> >
> > thanx.
> >
> > "Steve C. Orr [MVP, MCSD]" wrote:
> >[color=darkred]
> >> This client side javascript should do the trick:
> >>
> >> window.opener.location.reload(true);
> >>
> >> --
> >> I hope this helps,
> >> Steve C. Orr, MCSD, MVP
> >> http://SteveOrr.net
> >>
> >>
> >> "Chris" <Chris@discussions.microsoft.com> wrote in message
> >> news:A234F0A9-BFDC-4777-9370-DCCE6E81040D@microsoft.com...
> >> >I pop up a Modal form on a web page that allows the user to update the
> >> > selections of a dropdownlist via adding a new item to the db (Sql
> >> > Server).The
> >> > only thing is this list is on the page beneath it. So when the user
> >> > updates
> >> > the db with a new selection, and then closes the form, the page below
> >> > must
> >> > be
> >> > refreshed to see the new option.
> >> >
> >> > Any ideas on adding the new option to the control below the modal form?
> >> >
> >> > thanx.
> >> >
> >>
> >>
> >>[/color][/color]
>
>
>[/color]
Closed Thread