I'm using a DHTML dialog to present a pick-list to a user.
I've got the dialog working using some client side vbscript with a
call to window.ShowModalDialog.
I can see that the result is being returned to the main form, but I can't
figure out how to get it into the textbox the user is trying to populate.
The textbox is a server control. I tried setting the Text property of the
textbox to the result of the
dialog, but it just errors out claiming that an object is required.
Thoughts and ideas...? Please?
Jerry 4 2142
Hi, Jerry Camel,
Your problem should be solved completely on the client side.
Pass the document object when calling ShowModalDialog and then access it to
modify the value of the textbox:
showModalDialog("some.aspx", document, ...)
After that (in the modal dialog):
dialogArguments.forms[0].Textbox1.value = ...
The code is in javascript, but in vbscript you should only replace the []
with () and it will work.
Hope this helps
Martin
"Jerry Camel" <rl*****@msn.com> wrote in message
news:ue*************@TK2MSFTNGP10.phx.gbl... I'm using a DHTML dialog to present a pick-list to a user. I've got the dialog working using some client side vbscript with a call to window.ShowModalDialog.
I can see that the result is being returned to the main form, but I can't figure out how to get it into the textbox the user is trying to populate. The textbox is a server control. I tried setting the Text property of the textbox to the result of the dialog, but it just errors out claiming that an object is required.
Thoughts and ideas...? Please?
Jerry
Thank you, Martin - Got exactly what I needed from that.
"Martin Dechev" <de*******@hotmail.com> wrote in message
news:eE**************@TK2MSFTNGP10.phx.gbl... Hi, Jerry Camel,
Your problem should be solved completely on the client side.
Pass the document object when calling ShowModalDialog and then access it
to modify the value of the textbox:
showModalDialog("some.aspx", document, ...)
After that (in the modal dialog):
dialogArguments.forms[0].Textbox1.value = ...
The code is in javascript, but in vbscript you should only replace the [] with () and it will work.
Hope this helps Martin "Jerry Camel" <rl*****@msn.com> wrote in message news:ue*************@TK2MSFTNGP10.phx.gbl... I'm using a DHTML dialog to present a pick-list to a user. I've got the dialog working using some client side vbscript with a call to window.ShowModalDialog.
I can see that the result is being returned to the main form, but I
can't figure out how to get it into the textbox the user is trying to
populate. The textbox is a server control. I tried setting the Text property of
the textbox to the result of the dialog, but it just errors out claiming that an object is required.
Thoughts and ideas...? Please?
Jerry
Alright... Now I'm just confused.
Simple testing:
This worked just fine in testing when I set the return value equal to a hard
coded string. But when I try to set the return value equal to the value of
a textbox on the dialog form, nothing seems to get back to the original
form. No error, just no result returned.
Problems with more detailed testing included buttons, etc. that would cause
a postback of the dialog form: When the postback occurred, I ended up with
a third IE window with a duplicate of the dialog. What's happening?
Thanks
Jerry
"Martin Dechev" <de*******@hotmail.com> wrote in message
news:eE**************@TK2MSFTNGP10.phx.gbl... Hi, Jerry Camel,
Your problem should be solved completely on the client side.
Pass the document object when calling ShowModalDialog and then access it
to modify the value of the textbox:
showModalDialog("some.aspx", document, ...)
After that (in the modal dialog):
dialogArguments.forms[0].Textbox1.value = ...
The code is in javascript, but in vbscript you should only replace the [] with () and it will work.
Hope this helps Martin "Jerry Camel" <rl*****@msn.com> wrote in message news:ue*************@TK2MSFTNGP10.phx.gbl... I'm using a DHTML dialog to present a pick-list to a user. I've got the dialog working using some client side vbscript with a call to window.ShowModalDialog.
I can see that the result is being returned to the main form, but I
can't figure out how to get it into the textbox the user is trying to
populate. The textbox is a server control. I tried setting the Text property of
the textbox to the result of the dialog, but it just errors out claiming that an object is required.
Thoughts and ideas...? Please?
Jerry
Hi, Jerry,
see inline ->
"Jerry Camel" <rl*****@msn.com> wrote in message
news:ea**************@tk2msftngp13.phx.gbl... Alright... Now I'm just confused.
Simple testing: This worked just fine in testing when I set the return value equal to a
hard coded string. But when I try to set the return value equal to the value
of a textbox on the dialog form, nothing seems to get back to the original form. No error, just no result returned.
Most probably you don't reference the objects properly. Try alert-ing the
values until you find out the solution. Problems with more detailed testing included buttons, etc. that would
cause a postback of the dialog form: When the postback occurred, I ended up
with a third IE window with a duplicate of the dialog. What's happening?
It is by design, I think (I haven't seen it documented though). All you have
to do is add the following tag in the head section of the html:
<base target="_self">
Other solution is to work in a frame or iframe thus posting inside it. It
requires more coding, but the titlebar text doesn't change after a postback.
It does change in the first solution.
Greetings
Martin Thanks
Jerry
"Martin Dechev" <de*******@hotmail.com> wrote in message news:eE**************@TK2MSFTNGP10.phx.gbl... Hi, Jerry Camel,
Your problem should be solved completely on the client side.
Pass the document object when calling ShowModalDialog and then access it to modify the value of the textbox:
showModalDialog("some.aspx", document, ...)
After that (in the modal dialog):
dialogArguments.forms[0].Textbox1.value = ...
The code is in javascript, but in vbscript you should only replace the
[] with () and it will work.
Hope this helps Martin "Jerry Camel" <rl*****@msn.com> wrote in message news:ue*************@TK2MSFTNGP10.phx.gbl... I'm using a DHTML dialog to present a pick-list to a user. I've got the dialog working using some client side vbscript with a call to window.ShowModalDialog.
I can see that the result is being returned to the main form, but I can't figure out how to get it into the textbox the user is trying to populate. The textbox is a server control. I tried setting the Text property of the textbox to the result of the dialog, but it just errors out claiming that an object is required.
Thoughts and ideas...? Please?
Jerry
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Scott Holmes |
last post by:
I'm at a point in developing a user interface where I need to provide
functionality for picking a date and for picking start and stop times
for events. I've only done a brief google and found...
|
by: CrystalQuery |
last post by:
Is there any way I can put those two together, so users can pick a
value in the list if they find the value that they are looking for;
otherwise, they can simply type any valuea within the pick...
|
by: Kieran Simkin |
last post by:
Hi all,
I'm having some trouble with a linked list function and was wondering if
anyone could shed any light on it. Basically I have a singly-linked list
which stores pid numbers of a process's...
|
by: Mark Winter |
last post by:
Hello,
I am wondering if someone could point me in the right direction to
figure out how to create a dynamic form. I have been developing
programs in perl and oracle and have recently switched...
|
by: Ville Vainio |
last post by:
I tried to clear a list today (which I do rather rarely, considering
that just doing l = works most of the time) and was shocked, SHOCKED
to notice that there is no clear() method. Dicts have it,...
| |
by: not_a_commie |
last post by:
Here is a list of features I've wanted in .NET as pulled from my lab
notebook. If some of them are already there, maybe somebody could point
them out to me. If you have an opinion positive or...
|
by: David Longnecker |
last post by:
I'm working to create a base framework for our organization for web and client-side
applications. The framework interfaces with several of our systems and provides
the business and data layer...
|
by: jerry.teshirogi |
last post by:
I have the following class and main:
//////////////////////////////////////////////////////////
#include <iostream.h>
class myVector
{
public:
double x, y, z:
|
by: phiefer3 |
last post by:
Ok, first of all I'm not sure if this is the correct forum for this question or not. But hopefully someone can help me or at least point me in the direction of the forum this belongs.
First of...
|
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,...
|
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: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |