473,387 Members | 1,464 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.

situation with need to update dropdown on another page

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
9 1803
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: jason | last post by:
Is there a way - possibly a disconnected rs? - to update the contents of an existing pulldown on a page without having to re-submit the page for the user to see the pulldown populated with an...
1
by: Joseph Barron | last post by:
Here is a SIMPLE problem that I'm trying to solve. It works in Netscape 6.2, but IE6 gives ""No such interface supported." Below are page1.htm and page2.htm . In page1.htm, there are two...
0
by: Henke | last post by:
Hi, I have done some research about my problem I have when using the "back button" in IE to go back to a page with two dropdown lists. The both dropdown lists are populated with data. The...
0
by: Nithin | last post by:
My code as an txt attachment. I have 2 drop down list boxes that on selection populate text boxes from my database table. I am able to display the correct values in these text boxes. I have 2...
0
by: Chris | last post by:
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...
1
by: Oleg | last post by:
Hi, I'm having a problem with page caching and therefore reusing dropdown box contents. Scenerio: user1 has security to see list of three items(.aspx populates it with three items only) in...
6
by: Hannibal111111 | last post by:
I am getting a strange situation with a .NET 1.1 web application that we have deployed. I have made an update to a code behind page in 1 file, and then made an update to another code behind page. ...
2
by: William Youngman | last post by:
We are developing an application that presents data to the user in a gridview and we are using the dropdown extender to give the user a SharePoint 2007 type dropdown menu attached to the cells of a...
16
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
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.