473,396 Members | 1,886 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,396 software developers and data experts.

tricky postback problem...

We can try writing java script function which will change mouse pointr
to Hourglass of entire document.
Means we can write two functions

1)Change cursor to hourglass
2)change back to default.

Call this function before and after your third party call,

this avoides user to click on button
Nov 19 '05 #1
8 1701
you should also add a timer to enable the button after a couple of seconds
to handle the case where the internet loses the postback this will allow the
user to try again.

-- bruce (sqlwork.com)

"Shailya" <sr*****@mahindrabt.com> wrote in message
news:7b**************************@posting.google.c om...
We can try writing java script function which will change mouse pointr
to Hourglass of entire document.
Means we can write two functions

1)Change cursor to hourglass
2)change back to default.

Call this function before and after your third party call,

this avoides user to click on button

Nov 19 '05 #2
you should also add a timer to enable the button after a couple of seconds
to handle the case where the internet loses the postback this will allow the
user to try again.

-- bruce (sqlwork.com)

"Shailya" <sr*****@mahindrabt.com> wrote in message
news:7b**************************@posting.google.c om...
We can try writing java script function which will change mouse pointr
to Hourglass of entire document.
Means we can write two functions

1)Change cursor to hourglass
2)change back to default.

Call this function before and after your third party call,

this avoides user to click on button

Nov 19 '05 #3
Thanks for the responses everyone! I would definitely like the user
to try and stay on the same page so I'm going to try to avoid the
progress page solution...

For the onchange event, my textbox and button is actually within a
user control and the user control is used in an aspx page. Therefore,
there is no Form for the textbox and button. Can someone tell me how
I can access the button from the user control page_load? for ex.)
"document.Form1.Button1.disabled =
true; "; would not work and "document.Button1.disabled =
true; "; does not work either.
Thanks!

Sharon
Nov 19 '05 #4
Thanks for the responses everyone! I would definitely like the user
to try and stay on the same page so I'm going to try to avoid the
progress page solution...

For the onchange event, my textbox and button is actually within a
user control and the user control is used in an aspx page. Therefore,
there is no Form for the textbox and button. Can someone tell me how
I can access the button from the user control page_load? for ex.)
"document.Form1.Button1.disabled =
true; "; would not work and "document.Button1.disabled =
true; "; does not work either.
Thanks!

Sharon
Nov 19 '05 #5
Assuming that the user control is rendering HTML and isn't some type of
applet or ActiveX component, you could view the page source to see what is
being rendered. Once you know the ID of the control you could use
document.getElementById(...). If no ID is rendered, you could probably get
away with document.getElementsByName(...)

For instance, if the control renders with id="processButton" you should be
able to use:
document.getElementById("processButton").disabled = true;
HTH
----------------
Dave Fancher
http://davefancher.blogspot.com

"Sharon McCarty" <ri*******@hotmail.com> wrote in message
news:c4**************************@posting.google.c om...
Thanks for the responses everyone! I would definitely like the user
to try and stay on the same page so I'm going to try to avoid the
progress page solution...

For the onchange event, my textbox and button is actually within a
user control and the user control is used in an aspx page. Therefore,
there is no Form for the textbox and button. Can someone tell me how
I can access the button from the user control page_load? for ex.)
"document.Form1.Button1.disabled =
true; "; would not work and "document.Button1.disabled =
true; "; does not work either.
Thanks!

Sharon

Nov 19 '05 #6
Assuming that the user control is rendering HTML and isn't some type of
applet or ActiveX component, you could view the page source to see what is
being rendered. Once you know the ID of the control you could use
document.getElementById(...). If no ID is rendered, you could probably get
away with document.getElementsByName(...)

For instance, if the control renders with id="processButton" you should be
able to use:
document.getElementById("processButton").disabled = true;
HTH
----------------
Dave Fancher
http://davefancher.blogspot.com

"Sharon McCarty" <ri*******@hotmail.com> wrote in message
news:c4**************************@posting.google.c om...
Thanks for the responses everyone! I would definitely like the user
to try and stay on the same page so I'm going to try to avoid the
progress page solution...

For the onchange event, my textbox and button is actually within a
user control and the user control is used in an aspx page. Therefore,
there is no Form for the textbox and button. Can someone tell me how
I can access the button from the user control page_load? for ex.)
"document.Form1.Button1.disabled =
true; "; would not work and "document.Button1.disabled =
true; "; does not work either.
Thanks!

Sharon

Nov 19 '05 #7
Thanks Dave.

I go into the properties of the textbox in the ascx page and the id is
called: "txtName"

so I go into the javascript code,

document.getElementById("txtName")

but the result is giving me a null value.

I've also tried using

var test = document.getElementsByName("txtName")
alert(test.value)

returns me a non-null value in test but the alert message is
'undefined' (even though there is some text inside the textbox)...

Am I missing something here?

Thanks!

Sharon


"Dave Fancher" <ei*****@comcast.net> wrote in message news:<Nr********************@comcast.com>...
Assuming that the user control is rendering HTML and isn't some type of
applet or ActiveX component, you could view the page source to see what is
being rendered. Once you know the ID of the control you could use
document.getElementById(...). If no ID is rendered, you could probably get
away with document.getElementsByName(...)

For instance, if the control renders with id="processButton" you should be
able to use:
document.getElementById("processButton").disabled = true;
HTH
----------------
Dave Fancher
http://davefancher.blogspot.com

"Sharon McCarty" <ri*******@hotmail.com> wrote in message
news:c4**************************@posting.google.c om...
Thanks for the responses everyone! I would definitely like the user
to try and stay on the same page so I'm going to try to avoid the
progress page solution...

For the onchange event, my textbox and button is actually within a
user control and the user control is used in an aspx page. Therefore,
there is no Form for the textbox and button. Can someone tell me how
I can access the button from the user control page_load? for ex.)
"document.Form1.Button1.disabled =
true; "; would not work and "document.Button1.disabled =
true; "; does not work either.
Thanks!

Sharon

Nov 19 '05 #8
Well, judging from your original post, it sounds like you may be looking at
the wrong control to disable. Your original post said you wanted to disable
the button so you'll want to look for the ID of the button rather than the
text box.

Could you post more of the code for your page, particularly where you're
wiring up the event handler to your text box and how you're calling the
JavaScript? This will help for giving you guidance for how to proceed.

----------------
Dave Fancher
http://davefancher.blogspot.com

"Sharon McCarty" <ri*******@hotmail.com> wrote in message
news:c4**************************@posting.google.c om...
Thanks Dave.

I go into the properties of the textbox in the ascx page and the id is
called: "txtName"

so I go into the javascript code,

document.getElementById("txtName")

but the result is giving me a null value.

I've also tried using

var test = document.getElementsByName("txtName")
alert(test.value)

returns me a non-null value in test but the alert message is
'undefined' (even though there is some text inside the textbox)...

Am I missing something here?

Thanks!

Sharon


"Dave Fancher" <ei*****@comcast.net> wrote in message
news:<Nr********************@comcast.com>...
Assuming that the user control is rendering HTML and isn't some type of
applet or ActiveX component, you could view the page source to see what
is
being rendered. Once you know the ID of the control you could use
document.getElementById(...). If no ID is rendered, you could probably
get
away with document.getElementsByName(...)

For instance, if the control renders with id="processButton" you should
be
able to use:
document.getElementById("processButton").disabled = true;
HTH
----------------
Dave Fancher
http://davefancher.blogspot.com

"Sharon McCarty" <ri*******@hotmail.com> wrote in message
news:c4**************************@posting.google.c om...
> Thanks for the responses everyone! I would definitely like the user
> to try and stay on the same page so I'm going to try to avoid the
> progress page solution...
>
> For the onchange event, my textbox and button is actually within a
> user control and the user control is used in an aspx page. Therefore,
> there is no Form for the textbox and button. Can someone tell me how
> I can access the button from the user control page_load? for ex.)
> "document.Form1.Button1.disabled =
> true; "; would not work and "document.Button1.disabled =
> true; "; does not work either.
>
>
> Thanks!
>
> Sharon

Nov 19 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Igor Belagorudsky | last post by:
Hi, i am trying to analyze data submitted in a form but the problem is that when i try to create the controls in code (which is what i want to do), it throws an obect not found exception on...
7
by: Matt | last post by:
Hello, In an aspx page i have webform with some textboxes and a simple button. When the button is clicked, there is a postback and then the code in the click event of the button is executed. ...
0
by: Xavier Osa | last post by:
Hi, I have an ASP.Net web page that you can download a file. As Fergunson's problem, it prompts twice dialog boxes only if I select Open button. If I select Save button, it prompts once. I'm...
10
by: Krista Lemieux | last post by:
I'm new to ASP.NET and I'm not use to the way things are handled with this technology. I've been told that when I have a control, I should only bind the data to it once, and not on each post back...
2
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control...
2
by: Sharon McCarty | last post by:
Hi there, I have a textbox and a save button in an aspx page. I have the textbox event handler, TextChanged, hooked up to the textbox which calls a vendor's api. The event handler method...
6
by: | last post by:
Hi all, I have a bunch of dropdownlists that are populated in client-side javascript. When i do a postback I get the following error:- Invalid postback or callback argument. Event...
1
by: Timbo | last post by:
Hi all, This is my first message here so i'll try and include all the information that will help you help me out, if possible. Basically I am using C# in ASP.NET 2.0 and have a Repeater...
2
by: jpavel | last post by:
Hello everyone. I'm having a problem with accessing components. I've looked for a solution in other forums but until now no one have given me any tiny clue about how could I solve it. I know there...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.