473,399 Members | 3,603 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,399 software developers and data experts.

Question on Ajax vs. plain javascript

I have a asp.net form where if the user checks a check box I need to disable
some of the fields. I don't need to make a trip to the server for anything
at this point so is this is a case of using javascript to disable the fields
or should I be using Ajax do that? As probably can be seen from my post I
have never used Ajax yet.

Bill
Jul 30 '07 #1
7 1307
Bill,

You may consider Ajax only if you need to immediately react to the checks.
Since you don't, all you need to do is to make sure that the checkbox's
AutoPostBack property is not set to true and your server-side app will pick
up the values on the next postback.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Bill Gower" <bi*******@charter.netwrote in message
news:OI**************@TK2MSFTNGP02.phx.gbl...
>I have a asp.net form where if the user checks a check box I need to
disable some of the fields. I don't need to make a trip to the server for
anything at this point so is this is a case of using javascript to disable
the fields or should I be using Ajax do that? As probably can be seen from
my post I have never used Ajax yet.

Bill


Jul 30 '07 #2
So you are saying to just use Javascript to disable the controls that need
to be?

Bill

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:%2****************@TK2MSFTNGP06.phx.gbl...
Bill,

You may consider Ajax only if you need to immediately react to the checks.
Since you don't, all you need to do is to make sure that the checkbox's
AutoPostBack property is not set to true and your server-side app will
pick up the values on the next postback.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Bill Gower" <bi*******@charter.netwrote in message
news:OI**************@TK2MSFTNGP02.phx.gbl...
>>I have a asp.net form where if the user checks a check box I need to
disable some of the fields. I don't need to make a trip to the server for
anything at this point so is this is a case of using javascript to disable
the fields or should I be using Ajax do that? As probably can be seen
from my post I have never used Ajax yet.

Bill



Jul 30 '07 #3
What do you want to disable the controls for?

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Bill Gower" <bi*******@charter.netwrote in message
news:OP**************@TK2MSFTNGP04.phx.gbl...
So you are saying to just use Javascript to disable the controls that need
to be?

Bill

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:%2****************@TK2MSFTNGP06.phx.gbl...
>Bill,

You may consider Ajax only if you need to immediately react to the
checks. Since you don't, all you need to do is to make sure that the
checkbox's AutoPostBack property is not set to true and your server-side
app will pick up the values on the next postback.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Bill Gower" <bi*******@charter.netwrote in message
news:OI**************@TK2MSFTNGP02.phx.gbl...
>>>I have a asp.net form where if the user checks a check box I need to
disable some of the fields. I don't need to make a trip to the server
for anything at this point so is this is a case of using javascript to
disable the fields or should I be using Ajax do that? As probably can be
seen from my post I have never used Ajax yet.

Bill




Jul 30 '07 #4
as you mentioned you dont need to make a trip to the server to disable some
fields.so dont.
here partial update will make no sense.

"Bill Gower" <bi*******@charter.netдÈëÏûÏ¢ÐÂÎÅ:OI************* *@TK2MSFTNGP02.phx.gbl...
>I have a asp.net form where if the user checks a check box I need to
disable some of the fields. I don't need to make a trip to the server for
anything at this point so is this is a case of using javascript to disable
the fields or should I be using Ajax do that? As probably can be seen from
my post I have never used Ajax yet.

Bill


Jul 30 '07 #5
Because they are not applicable if the checkbox is checked.

Bill

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:uR**************@TK2MSFTNGP04.phx.gbl...
What do you want to disable the controls for?

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Bill Gower" <bi*******@charter.netwrote in message
news:OP**************@TK2MSFTNGP04.phx.gbl...
>So you are saying to just use Javascript to disable the controls that
need to be?

Bill

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:%2****************@TK2MSFTNGP06.phx.gbl...
>>Bill,

You may consider Ajax only if you need to immediately react to the
checks. Since you don't, all you need to do is to make sure that the
checkbox's AutoPostBack property is not set to true and your server-side
app will pick up the values on the next postback.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Bill Gower" <bi*******@charter.netwrote in message
news:OI**************@TK2MSFTNGP02.phx.gbl...
I have a asp.net form where if the user checks a check box I need to
disable some of the fields. I don't need to make a trip to the server
for anything at this point so is this is a case of using javascript to
disable the fields or should I be using Ajax do that? As probably can
be seen from my post I have never used Ajax yet.

Bill




Jul 30 '07 #6
Then yes, your best option is client-side disabling with javascript.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Bill Gower" <bi*******@charter.netwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Because they are not applicable if the checkbox is checked.

Bill

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:uR**************@TK2MSFTNGP04.phx.gbl...
>What do you want to disable the controls for?

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Bill Gower" <bi*******@charter.netwrote in message
news:OP**************@TK2MSFTNGP04.phx.gbl...
>>So you are saying to just use Javascript to disable the controls that
need to be?

Bill

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:%2****************@TK2MSFTNGP06.phx.gbl...
Bill,

You may consider Ajax only if you need to immediately react to the
checks. Since you don't, all you need to do is to make sure that the
checkbox's AutoPostBack property is not set to true and your
server-side app will pick up the values on the next postback.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Bill Gower" <bi*******@charter.netwrote in message
news:OI**************@TK2MSFTNGP02.phx.gbl...
>I have a asp.net form where if the user checks a check box I need to
>disable some of the fields. I don't need to make a trip to the server
>for anything at this point so is this is a case of using javascript to
>disable the fields or should I be using Ajax do that? As probably can
>be seen from my post I have never used Ajax yet.
>
Bill
>
>




Jul 30 '07 #7
I'd suggest using JavaScript in this case.
No need for AJAX here.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
"Bill Gower" <bi*******@charter.netwrote in message
news:OI**************@TK2MSFTNGP02.phx.gbl...
>I have a asp.net form where if the user checks a check box I need to
disable some of the fields. I don't need to make a trip to the server for
anything at this point so is this is a case of using javascript to disable
the fields or should I be using Ajax do that? As probably can be seen from
my post I have never used Ajax yet.

Bill

Jul 30 '07 #8

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

Similar topics

1
by: Gaffar | last post by:
Hello. My name is Gaffar. I am handling an module in a Project. This application interface is slow and inefficient. So Client told "implement an AJAX Solution which will increase speed and...
6
by: Joel Byrd | last post by:
I want a website that works in the following way: It has a main content div, and of course menu items. When you click a menu item, it should use AJAX to change the main content div to the content...
4
by: evgenyg | last post by:
Hello ! We have the following situation - when Ajax request is sent what's being returned by the server is usually an XML (which is used for DOM updates) but sometimes it's HTML which is a whole...
9
by: GTi | last post by:
I have a bizare Ajax POST problem. I use Ajax POST to send data to the server. The server get the POST and answer back. BUT if I POST the data once again I recieve the same answer that the first...
5
by: petermichaux | last post by:
Hi, Some servers return JavaScript as the response to an AJAX request. When the response JavaScript is eval'ed it calls other JavaScript functions already in the browser to update elements, etc....
1
by: Pugi! | last post by:
I want to create a virtual filesystem. When you open page you see a number of 'folders' represented by a name and an icon. When you click on the icon an xmlhttprequest is send retrieving the...
3
by: HarryA | last post by:
Hello all, what would be a good book or article to learn AJAX with HTML/CSS/javascript on the client side and Perl on the server side? I am NOT interested in XML, PHP, CGI:: AJAX or other...
1
by: geevaa | last post by:
http://www.phpbuilder.com/columns/kassemi20050606.php3 XMLHttpRequest and AJAX for PHP programmers James Kassemi Introduction: Although the concept isn't entirely new, XMLHttpRequest...
11
by: =?Utf-8?B?R2VyaGFyZA==?= | last post by:
I have run into a situation that if a page/tab that uses the Ajax toolkit (using .net version 3.5) is closed before the Ajax enable controls complete loading, then IE locks up. Does it in both IE7...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
agi2029
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,...
0
isladogs
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 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.