Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > capturing messagebox OK/cancel event

Reply
Thread Tools

capturing messagebox OK/cancel event

 
 
=?Utf-8?B?QW5kcmV3?=
Guest
Posts: n/a
 
      09-05-2005
Hi,

I have a messagebox that pops up due to an event. I did it in javascript.
ie. alert("Time's up. Assessment Ended");

I want to capture the OK and Cancel events of this alert messagebox. My code
is in C#/ASP.NET.

TIA.
Andrew.

 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      09-05-2005
Andrew,

You need to pass the message box return value to the server side in the
value property of a hidden input control:

<input type=hidden id=inhTimeUp runat=server>

Eliyahu

"Andrew" <> wrote in message
news:04E6B579-DFD1-48C3-ADBA-...
> Hi,
>
> I have a messagebox that pops up due to an event. I did it in javascript.
> ie. alert("Time's up. Assessment Ended");
>
> I want to capture the OK and Cancel events of this alert messagebox. My

code
> is in C#/ASP.NET.
>
> TIA.
> Andrew.
>



 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      09-05-2005
Here's some server side code that uses javascript to display a confirmation
message.

myDeleteButton.Attributes.Add("onclick", _
"return confirm('Are you sure you want to delete?');")

In this example, the Delete button will post back only if the person
confirms they want to delete. Otherwise the server code is never called in
response to the button click.

Here's more info:
http://SteveOrr.net/articles/ClientSideSuite.aspx

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


"Andrew" <> wrote in message
news:04E6B579-DFD1-48C3-ADBA-...
> Hi,
>
> I have a messagebox that pops up due to an event. I did it in javascript.
> ie. alert("Time's up. Assessment Ended");
>
> I want to capture the OK and Cancel events of this alert messagebox. My
> code
> is in C#/ASP.NET.
>
> TIA.
> Andrew.
>



 
Reply With Quote
 
=?Utf-8?B?QW5kcmV3?=
Guest
Posts: n/a
 
      09-07-2005
I seem to have a problem capturing the id="inhTimeUp" of the hidden input
control.

As I understand it, I put the code:
<input type=hidden id=inhTimeUp runat=server>
onto the parent file's html page, then I want to access this "inhTimeUp"
from the iFrame (child) page, is that possible ? coz the parent aspx page
just displays the top part of my page, while the child displays the bottom
and majority of the code in C#.

Am I making sense ?
TIA.
Andrew.

"Steve C. Orr [MVP, MCSD]" wrote:

> Here's some server side code that uses javascript to display a confirmation
> message.
>
> myDeleteButton.Attributes.Add("onclick", _
> "return confirm('Are you sure you want to delete?');")
>
> In this example, the Delete button will post back only if the person
> confirms they want to delete. Otherwise the server code is never called in
> response to the button click.
>
> Here's more info:
> http://SteveOrr.net/articles/ClientSideSuite.aspx
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
>
> "Andrew" <> wrote in message
> news:04E6B579-DFD1-48C3-ADBA-...
> > Hi,
> >
> > I have a messagebox that pops up due to an event. I did it in javascript.
> > ie. alert("Time's up. Assessment Ended");
> >
> > I want to capture the OK and Cancel events of this alert messagebox. My
> > code
> > is in C#/ASP.NET.
> >
> > TIA.
> > Andrew.
> >

>
>
>

 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      09-07-2005
Andrew,

What's the reason for putting the control on the parent form? Which form
produces the messagebox and which form is interested in the value clicked?

Eliyahu

"Andrew" <> wrote in message
news:685E4CAC-7C36-4E35-9CD0-...
> I seem to have a problem capturing the id="inhTimeUp" of the hidden input
> control.
>
> As I understand it, I put the code:
> <input type=hidden id=inhTimeUp runat=server>
> onto the parent file's html page, then I want to access this "inhTimeUp"
> from the iFrame (child) page, is that possible ? coz the parent aspx page
> just displays the top part of my page, while the child displays the bottom
> and majority of the code in C#.
>
> Am I making sense ?
> TIA.
> Andrew.
>
> "Steve C. Orr [MVP, MCSD]" wrote:
>
> > Here's some server side code that uses javascript to display a

confirmation
> > message.
> >
> > myDeleteButton.Attributes.Add("onclick", _
> > "return confirm('Are you sure you want to delete?');")
> >
> > In this example, the Delete button will post back only if the person
> > confirms they want to delete. Otherwise the server code is never called

in
> > response to the button click.
> >
> > Here's more info:
> > http://SteveOrr.net/articles/ClientSideSuite.aspx
> >
> > --
> > I hope this helps,
> > Steve C. Orr, MCSD, MVP
> > http://SteveOrr.net
> >
> >
> > "Andrew" <> wrote in message
> > news:04E6B579-DFD1-48C3-ADBA-...
> > > Hi,
> > >
> > > I have a messagebox that pops up due to an event. I did it in

javascript.
> > > ie. alert("Time's up. Assessment Ended");
> > >
> > > I want to capture the OK and Cancel events of this alert messagebox.

My
> > > code
> > > is in C#/ASP.NET.
> > >
> > > TIA.
> > > Andrew.
> > >

> >
> >
> >



 
Reply With Quote
 
=?Utf-8?B?QW5kcmV3?=
Guest
Posts: n/a
 
      09-07-2005
I am writing an online assessment. The duration of the test 90 minutes.

Originally I had put everything on one page, but I discovered that whenever
the user clicks on NEXT question, the countdown re-starts. Obviously I don't
want that to happen.

I had to put the countdown (in javascript) textfield on the parent page, and
the question is displayed in the child page (iframe). The child form wants to
capture when the user clicks on the OK button of the:
alert("Time's up. Assessment Ended");

I hope this explains what I am trying to do. Is my design correct ?
TIA
Andrew.

"Eliyahu Goldin" wrote:

> Andrew,
>
> What's the reason for putting the control on the parent form? Which form
> produces the messagebox and which form is interested in the value clicked?
>
> Eliyahu
>
> "Andrew" <> wrote in message
> news:685E4CAC-7C36-4E35-9CD0-...
> > I seem to have a problem capturing the id="inhTimeUp" of the hidden input
> > control.
> >
> > As I understand it, I put the code:
> > <input type=hidden id=inhTimeUp runat=server>
> > onto the parent file's html page, then I want to access this "inhTimeUp"
> > from the iFrame (child) page, is that possible ? coz the parent aspx page
> > just displays the top part of my page, while the child displays the bottom
> > and majority of the code in C#.
> >
> > Am I making sense ?
> > TIA.
> > Andrew.
> >
> > "Steve C. Orr [MVP, MCSD]" wrote:
> >
> > > Here's some server side code that uses javascript to display a

> confirmation
> > > message.
> > >
> > > myDeleteButton.Attributes.Add("onclick", _
> > > "return confirm('Are you sure you want to delete?');")
> > >
> > > In this example, the Delete button will post back only if the person
> > > confirms they want to delete. Otherwise the server code is never called

> in
> > > response to the button click.
> > >
> > > Here's more info:
> > > http://SteveOrr.net/articles/ClientSideSuite.aspx
> > >
> > > --
> > > I hope this helps,
> > > Steve C. Orr, MCSD, MVP
> > > http://SteveOrr.net
> > >
> > >
> > > "Andrew" <> wrote in message
> > > news:04E6B579-DFD1-48C3-ADBA-...
> > > > Hi,
> > > >
> > > > I have a messagebox that pops up due to an event. I did it in

> javascript.
> > > > ie. alert("Time's up. Assessment Ended");
> > > >
> > > > I want to capture the OK and Cancel events of this alert messagebox.

> My
> > > > code
> > > > is in C#/ASP.NET.
> > > >
> > > > TIA.
> > > > Andrew.
> > > >
> > >
> > >
> > >

>
>
>

 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      09-07-2005
This is fine, but why can't you put the control in the child form? Anyway,
whatever your reason is, you can always access the control in the parent
page as

parent.document.getElementById("inhTimeUp");

and submit the parent form as

parent.myForm.submit();

Eliyahu

"Andrew" <> wrote in message
news:6BCD8ACF-3477-4E91-9984-...
> I am writing an online assessment. The duration of the test 90 minutes.
>
> Originally I had put everything on one page, but I discovered that

whenever
> the user clicks on NEXT question, the countdown re-starts. Obviously I

don't
> want that to happen.
>
> I had to put the countdown (in javascript) textfield on the parent page,

and
> the question is displayed in the child page (iframe). The child form wants

to
> capture when the user clicks on the OK button of the:
> alert("Time's up. Assessment Ended");
>
> I hope this explains what I am trying to do. Is my design correct ?
> TIA
> Andrew.
>
> "Eliyahu Goldin" wrote:
>
> > Andrew,
> >
> > What's the reason for putting the control on the parent form? Which form
> > produces the messagebox and which form is interested in the value

clicked?
> >
> > Eliyahu
> >
> > "Andrew" <> wrote in message
> > news:685E4CAC-7C36-4E35-9CD0-...
> > > I seem to have a problem capturing the id="inhTimeUp" of the hidden

input
> > > control.
> > >
> > > As I understand it, I put the code:
> > > <input type=hidden id=inhTimeUp runat=server>
> > > onto the parent file's html page, then I want to access this

"inhTimeUp"
> > > from the iFrame (child) page, is that possible ? coz the parent aspx

page
> > > just displays the top part of my page, while the child displays the

bottom
> > > and majority of the code in C#.
> > >
> > > Am I making sense ?
> > > TIA.
> > > Andrew.
> > >
> > > "Steve C. Orr [MVP, MCSD]" wrote:
> > >
> > > > Here's some server side code that uses javascript to display a

> > confirmation
> > > > message.
> > > >
> > > > myDeleteButton.Attributes.Add("onclick", _
> > > > "return confirm('Are you sure you want to delete?');")
> > > >
> > > > In this example, the Delete button will post back only if the person
> > > > confirms they want to delete. Otherwise the server code is never

called
> > in
> > > > response to the button click.
> > > >
> > > > Here's more info:
> > > > http://SteveOrr.net/articles/ClientSideSuite.aspx
> > > >
> > > > --
> > > > I hope this helps,
> > > > Steve C. Orr, MCSD, MVP
> > > > http://SteveOrr.net
> > > >
> > > >
> > > > "Andrew" <> wrote in message
> > > > news:04E6B579-DFD1-48C3-ADBA-...
> > > > > Hi,
> > > > >
> > > > > I have a messagebox that pops up due to an event. I did it in

> > javascript.
> > > > > ie. alert("Time's up. Assessment Ended");
> > > > >
> > > > > I want to capture the OK and Cancel events of this alert

messagebox.
> > My
> > > > > code
> > > > > is in C#/ASP.NET.
> > > > >
> > > > > TIA.
> > > > > Andrew.
> > > > >
> > > >
> > > >
> > > >

> >
> >
> >



 
Reply With Quote
 
=?Utf-8?B?QW5kcmV3?=
Guest
Posts: n/a
 
      09-07-2005
sorry, I do not really understand what you are saying. It's probably because
my javascript isn't great. Let me explain further.

I have IStartAss.aspx (parent) and StartAss.aspx (child iframe) to be
displayed.
On the parent page, there is the javascript code, and the hidden input text.

PARENT: The javascript looks like this (not sure if I am right):

<input type="hidden" id="inhTimeUp" runat="server" NAME="inhTimeUp">

<iframe id="Child_StartAss" src="StartAss.aspx" frameBorder="0"
runat="server"></iframe>

<SCRIPT language="Javascript">
....
alert("Time's up. Assessment Ended")
parent.document.getElementById("inhTimeUp") = true;
document.Form_IStartAss.submit();
</SCRIPT>

CHILD: There is some C# code.
I want to capture the event when the user clicks on the OK button and
proceed on.
How do I do this capturing ?

The reason why I am fussing about this capture is because later on I will
probably need to know how to do this in another part of the application
anyway.

TIA.
Andrew.

"Eliyahu Goldin" wrote:

> This is fine, but why can't you put the control in the child form? Anyway,
> whatever your reason is, you can always access the control in the parent
> page as
>
> parent.document.getElementById("inhTimeUp");
>
> and submit the parent form as
>
> parent.myForm.submit();
>
> Eliyahu
>
> "Andrew" <> wrote in message
> news:6BCD8ACF-3477-4E91-9984-...
> > I am writing an online assessment. The duration of the test 90 minutes.
> >
> > Originally I had put everything on one page, but I discovered that

> whenever
> > the user clicks on NEXT question, the countdown re-starts. Obviously I

> don't
> > want that to happen.
> >
> > I had to put the countdown (in javascript) textfield on the parent page,

> and
> > the question is displayed in the child page (iframe). The child form wants

> to
> > capture when the user clicks on the OK button of the:
> > alert("Time's up. Assessment Ended");
> >
> > I hope this explains what I am trying to do. Is my design correct ?
> > TIA
> > Andrew.
> >
> > "Eliyahu Goldin" wrote:
> >
> > > Andrew,
> > >
> > > What's the reason for putting the control on the parent form? Which form
> > > produces the messagebox and which form is interested in the value

> clicked?
> > >
> > > Eliyahu
> > >
> > > "Andrew" <> wrote in message
> > > news:685E4CAC-7C36-4E35-9CD0-...
> > > > I seem to have a problem capturing the id="inhTimeUp" of the hidden

> input
> > > > control.
> > > >
> > > > As I understand it, I put the code:
> > > > <input type=hidden id=inhTimeUp runat=server>
> > > > onto the parent file's html page, then I want to access this

> "inhTimeUp"
> > > > from the iFrame (child) page, is that possible ? coz the parent aspx

> page
> > > > just displays the top part of my page, while the child displays the

> bottom
> > > > and majority of the code in C#.
> > > >
> > > > Am I making sense ?
> > > > TIA.
> > > > Andrew.
> > > >
> > > > "Steve C. Orr [MVP, MCSD]" wrote:
> > > >
> > > > > Here's some server side code that uses javascript to display a
> > > confirmation
> > > > > message.
> > > > >
> > > > > myDeleteButton.Attributes.Add("onclick", _
> > > > > "return confirm('Are you sure you want to delete?');")
> > > > >
> > > > > In this example, the Delete button will post back only if the person
> > > > > confirms they want to delete. Otherwise the server code is never

> called
> > > in
> > > > > response to the button click.
> > > > >
> > > > > Here's more info:
> > > > > http://SteveOrr.net/articles/ClientSideSuite.aspx
> > > > >
> > > > > --
> > > > > I hope this helps,
> > > > > Steve C. Orr, MCSD, MVP
> > > > > http://SteveOrr.net
> > > > >
> > > > >
> > > > > "Andrew" <> wrote in message
> > > > > news:04E6B579-DFD1-48C3-ADBA-...
> > > > > > Hi,
> > > > > >
> > > > > > I have a messagebox that pops up due to an event. I did it in
> > > javascript.
> > > > > > ie. alert("Time's up. Assessment Ended");
> > > > > >
> > > > > > I want to capture the OK and Cancel events of this alert

> messagebox.
> > > My
> > > > > > code
> > > > > > is in C#/ASP.NET.
> > > > > >
> > > > > > TIA.
> > > > > > Andrew.


 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      09-07-2005
Ok, I hope now I understand it better.

Your javascript is in the parent. the parent takes care of counting down the
assessment time. When the time is up, the parent want to notify the form in
the iframe. Is that correct?

If that is, the parent itself is not interested in the inhTimeUp value, it
just needs to pass this value to the form in the iframe and get that form to
sibmit with passing the value to the server-side c# code.

To make it happen, you need to move the inhTimeUp to the child, since the
the value should go to the child form server-side code. The message box is
produced on the parent and the parent will pass the value to the child as

document.getElementById("Child_StartAss").contentW indow.document.getElementB
yId("inhTimeUp").value=true;

and submit the child as

document.getElementById("Child_StartAss").contentW indow.myChildForm.submit()
;

where myChildForm is the id of the form in the iframe.

Eliyahu

"Andrew" <> wrote in message
news:838576E3-0EA5-46F4-B925-...
> sorry, I do not really understand what you are saying. It's probably

because
> my javascript isn't great. Let me explain further.
>
> I have IStartAss.aspx (parent) and StartAss.aspx (child iframe) to be
> displayed.
> On the parent page, there is the javascript code, and the hidden input

text.
>
> PARENT: The javascript looks like this (not sure if I am right):
>
> <input type="hidden" id="inhTimeUp" runat="server" NAME="inhTimeUp">
>
> <iframe id="Child_StartAss" src="StartAss.aspx" frameBorder="0"
> runat="server"></iframe>
>
> <SCRIPT language="Javascript">
> ...
> alert("Time's up. Assessment Ended")
> parent.document.getElementById("inhTimeUp") = true;
> document.Form_IStartAss.submit();
> </SCRIPT>
>
> CHILD: There is some C# code.
> I want to capture the event when the user clicks on the OK button and
> proceed on.
> How do I do this capturing ?
>
> The reason why I am fussing about this capture is because later on I will
> probably need to know how to do this in another part of the application
> anyway.
>
> TIA.
> Andrew.
>
> "Eliyahu Goldin" wrote:
>
> > This is fine, but why can't you put the control in the child form?

Anyway,
> > whatever your reason is, you can always access the control in the parent
> > page as
> >
> > parent.document.getElementById("inhTimeUp");
> >
> > and submit the parent form as
> >
> > parent.myForm.submit();
> >
> > Eliyahu
> >
> > "Andrew" <> wrote in message
> > news:6BCD8ACF-3477-4E91-9984-...
> > > I am writing an online assessment. The duration of the test 90

minutes.
> > >
> > > Originally I had put everything on one page, but I discovered that

> > whenever
> > > the user clicks on NEXT question, the countdown re-starts. Obviously I

> > don't
> > > want that to happen.
> > >
> > > I had to put the countdown (in javascript) textfield on the parent

page,
> > and
> > > the question is displayed in the child page (iframe). The child form

wants
> > to
> > > capture when the user clicks on the OK button of the:
> > > alert("Time's up. Assessment Ended");
> > >
> > > I hope this explains what I am trying to do. Is my design correct ?
> > > TIA
> > > Andrew.
> > >
> > > "Eliyahu Goldin" wrote:
> > >
> > > > Andrew,
> > > >
> > > > What's the reason for putting the control on the parent form? Which

form
> > > > produces the messagebox and which form is interested in the value

> > clicked?
> > > >
> > > > Eliyahu
> > > >
> > > > "Andrew" <> wrote in message
> > > > news:685E4CAC-7C36-4E35-9CD0-...
> > > > > I seem to have a problem capturing the id="inhTimeUp" of the

hidden
> > input
> > > > > control.
> > > > >
> > > > > As I understand it, I put the code:
> > > > > <input type=hidden id=inhTimeUp runat=server>
> > > > > onto the parent file's html page, then I want to access this

> > "inhTimeUp"
> > > > > from the iFrame (child) page, is that possible ? coz the parent

aspx
> > page
> > > > > just displays the top part of my page, while the child displays

the
> > bottom
> > > > > and majority of the code in C#.
> > > > >
> > > > > Am I making sense ?
> > > > > TIA.
> > > > > Andrew.
> > > > >
> > > > > "Steve C. Orr [MVP, MCSD]" wrote:
> > > > >
> > > > > > Here's some server side code that uses javascript to display a
> > > > confirmation
> > > > > > message.
> > > > > >
> > > > > > myDeleteButton.Attributes.Add("onclick", _
> > > > > > "return confirm('Are you sure you want to delete?');")
> > > > > >
> > > > > > In this example, the Delete button will post back only if the

person
> > > > > > confirms they want to delete. Otherwise the server code is never

> > called
> > > > in
> > > > > > response to the button click.
> > > > > >
> > > > > > Here's more info:
> > > > > > http://SteveOrr.net/articles/ClientSideSuite.aspx
> > > > > >
> > > > > > --
> > > > > > I hope this helps,
> > > > > > Steve C. Orr, MCSD, MVP
> > > > > > http://SteveOrr.net
> > > > > >
> > > > > >
> > > > > > "Andrew" <> wrote in message
> > > > > > news:04E6B579-DFD1-48C3-ADBA-...
> > > > > > > Hi,
> > > > > > >
> > > > > > > I have a messagebox that pops up due to an event. I did it in
> > > > javascript.
> > > > > > > ie. alert("Time's up. Assessment Ended");
> > > > > > >
> > > > > > > I want to capture the OK and Cancel events of this alert

> > messagebox.
> > > > My
> > > > > > > code
> > > > > > > is in C#/ASP.NET.
> > > > > > >
> > > > > > > TIA.
> > > > > > > Andrew.

>



 
Reply With Quote
 
=?Utf-8?B?QW5kcmV3?=
Guest
Posts: n/a
 
      09-07-2005
Hi,

I need to clarify some stuff.

1) What does "Child_StartAss" signify ?
2) Also what code should i put in the child c# page to capture the
value=true send by the parent page ? Do i need to
"ClientScriptBlockRegistered" it ?

TIA.
Andrew

"Eliyahu Goldin" wrote:

> Ok, I hope now I understand it better.
>
> Your javascript is in the parent. the parent takes care of counting down the
> assessment time. When the time is up, the parent want to notify the form in
> the iframe. Is that correct?
>
> If that is, the parent itself is not interested in the inhTimeUp value, it
> just needs to pass this value to the form in the iframe and get that form to
> sibmit with passing the value to the server-side c# code.
>
> To make it happen, you need to move the inhTimeUp to the child, since the
> the value should go to the child form server-side code. The message box is
> produced on the parent and the parent will pass the value to the child as
>
> document.getElementById("Child_StartAss").contentW indow.document.getElementB
> yId("inhTimeUp").value=true;
>
> and submit the child as
>
> document.getElementById("Child_StartAss").contentW indow.myChildForm.submit()
> ;
>
> where myChildForm is the id of the form in the iframe.
>
> Eliyahu
>
> "Andrew" <> wrote in message
> news:838576E3-0EA5-46F4-B925-...
> > sorry, I do not really understand what you are saying. It's probably

> because
> > my javascript isn't great. Let me explain further.
> >
> > I have IStartAss.aspx (parent) and StartAss.aspx (child iframe) to be
> > displayed.
> > On the parent page, there is the javascript code, and the hidden input

> text.
> >
> > PARENT: The javascript looks like this (not sure if I am right):
> >
> > <input type="hidden" id="inhTimeUp" runat="server" NAME="inhTimeUp">
> >
> > <iframe id="Child_StartAss" src="StartAss.aspx" frameBorder="0"
> > runat="server"></iframe>
> >
> > <SCRIPT language="Javascript">
> > ...
> > alert("Time's up. Assessment Ended")
> > parent.document.getElementById("inhTimeUp") = true;
> > document.Form_IStartAss.submit();
> > </SCRIPT>
> >
> > CHILD: There is some C# code.
> > I want to capture the event when the user clicks on the OK button and
> > proceed on.
> > How do I do this capturing ?
> >
> > The reason why I am fussing about this capture is because later on I will
> > probably need to know how to do this in another part of the application
> > anyway.
> >
> > TIA.
> > Andrew.
> >
> > "Eliyahu Goldin" wrote:
> >
> > > This is fine, but why can't you put the control in the child form?

> Anyway,
> > > whatever your reason is, you can always access the control in the parent
> > > page as
> > >
> > > parent.document.getElementById("inhTimeUp");
> > >
> > > and submit the parent form as
> > >
> > > parent.myForm.submit();
> > >
> > > Eliyahu
> > >
> > > "Andrew" <> wrote in message
> > > news:6BCD8ACF-3477-4E91-9984-...
> > > > I am writing an online assessment. The duration of the test 90

> minutes.
> > > >
> > > > Originally I had put everything on one page, but I discovered that
> > > whenever
> > > > the user clicks on NEXT question, the countdown re-starts. Obviously I
> > > don't
> > > > want that to happen.
> > > >
> > > > I had to put the countdown (in javascript) textfield on the parent

> page,
> > > and
> > > > the question is displayed in the child page (iframe). The child form

> wants
> > > to
> > > > capture when the user clicks on the OK button of the:
> > > > alert("Time's up. Assessment Ended");
> > > >
> > > > I hope this explains what I am trying to do. Is my design correct ?
> > > > TIA
> > > > Andrew.
> > > >
> > > > "Eliyahu Goldin" wrote:
> > > >
> > > > > Andrew,
> > > > >
> > > > > What's the reason for putting the control on the parent form? Which

> form
> > > > > produces the messagebox and which form is interested in the value
> > > clicked?
> > > > >
> > > > > Eliyahu
> > > > >
> > > > > "Andrew" <> wrote in message
> > > > > news:685E4CAC-7C36-4E35-9CD0-...
> > > > > > I seem to have a problem capturing the id="inhTimeUp" of the

> hidden
> > > input
> > > > > > control.
> > > > > >
> > > > > > As I understand it, I put the code:
> > > > > > <input type=hidden id=inhTimeUp runat=server>
> > > > > > onto the parent file's html page, then I want to access this
> > > "inhTimeUp"
> > > > > > from the iFrame (child) page, is that possible ? coz the parent

> aspx
> > > page
> > > > > > just displays the top part of my page, while the child displays

> the
> > > bottom
> > > > > > and majority of the code in C#.
> > > > > >
> > > > > > Am I making sense ?
> > > > > > TIA.
> > > > > > Andrew.
> > > > > >
> > > > > > "Steve C. Orr [MVP, MCSD]" wrote:
> > > > > >
> > > > > > > Here's some server side code that uses javascript to display a
> > > > > confirmation
> > > > > > > message.
> > > > > > >
> > > > > > > myDeleteButton.Attributes.Add("onclick", _
> > > > > > > "return confirm('Are you sure you want to delete?');")
> > > > > > >
> > > > > > > In this example, the Delete button will post back only if the

> person
> > > > > > > confirms they want to delete. Otherwise the server code is never
> > > called
> > > > > in
> > > > > > > response to the button click.
> > > > > > >
> > > > > > > Here's more info:
> > > > > > > http://SteveOrr.net/articles/ClientSideSuite.aspx
> > > > > > >
> > > > > > > --
> > > > > > > I hope this helps,
> > > > > > > Steve C. Orr, MCSD, MVP
> > > > > > > http://SteveOrr.net
> > > > > > >
> > > > > > >
> > > > > > > "Andrew" <> wrote in message
> > > > > > > news:04E6B579-DFD1-48C3-ADBA-...
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I have a messagebox that pops up due to an event. I did it in
> > > > > javascript.
> > > > > > > > ie. alert("Time's up. Assessment Ended");
> > > > > > > >
> > > > > > > > I want to capture the OK and Cancel events of this alert
> > > messagebox.
> > > > > My
> > > > > > > > code
> > > > > > > > is in C#/ASP.NET.
> > > > > > > >
> > > > > > > > TIA.
> > > > > > > > Andrew.

> >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Capturing event when closing web form xiahmi Software 0 07-17-2007 01:21 AM
Problem:made Modal MessageBOx @ some event become modaless saxenavaibhav17@gmail.com C++ 1 04-27-2007 03:15 AM
Capturing event from other custom control within another custom control Jonah Olsson ASP .Net 1 04-05-2005 01:39 PM
Web: Capturing the current cell values on double-click event of a datagrid Tony Fields ASP .Net 0 12-09-2004 04:09 PM
Capturing an event within a template column sqlboy2000 ASP .Net 0 11-24-2003 06:05 PM



Advertisments