By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,760 Members | 1,644 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,760 IT Pros & Developers. It's quick & easy.

situation with need to update dropdown on another page

P: n/a
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.

Nov 19 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
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" <Ch***@discussions.microsoft.com> wrote in message
news:A2**********************************@microsof t.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.

Nov 19 '05 #2

P: n/a
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" <Ch***@discussions.microsoft.com> wrote in message
news:A2**********************************@microsof t.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.

Nov 19 '05 #3

P: n/a
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:
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" <Ch***@discussions.microsoft.com> wrote in message
news:A2**********************************@microsof t.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.


Nov 19 '05 #4

P: n/a
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:
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" <Ch***@discussions.microsoft.com> wrote in message
news:A2**********************************@microsof t.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.


Nov 19 '05 #5

P: n/a
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" <Ch***@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
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:
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" <Ch***@discussions.microsoft.com> wrote in message
news:A2**********************************@microsof t.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.
>


Nov 19 '05 #6

P: n/a
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" <Ch***@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
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:
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" <Ch***@discussions.microsoft.com> wrote in message
news:A2**********************************@microsof t.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.
>


Nov 19 '05 #7

P: n/a
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:
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" <Ch***@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
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:
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" <Ch***@discussions.microsoft.com> wrote in message
news:A2**********************************@microsof t.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.
>


Nov 19 '05 #8

P: n/a
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:
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" <Ch***@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
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:
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" <Ch***@discussions.microsoft.com> wrote in message
news:A2**********************************@microsof t.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.
>


Nov 19 '05 #9

P: n/a
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:
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" <Ch***@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
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:
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" <Ch***@discussions.microsoft.com> wrote in message
news:A2**********************************@microsof t.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.
>


Nov 19 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.