Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Question on Ajax vs. plain javascript

Reply
Thread Tools

Question on Ajax vs. plain javascript

 
 
Bill Gower
Guest
Posts: n/a
 
      07-30-2007
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


 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      07-30-2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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
>
>



 
Reply With Quote
 
 
 
 
Bill Gower
Guest
Posts: n/a
 
      07-30-2007
So you are saying to just use Javascript to disable the controls that need
to be?

Bill

"Eliyahu Goldin" <(E-Mail Removed)> wrote in
message news:%(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>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
>>
>>

>
>



 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      07-30-2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> So you are saying to just use Javascript to disable the controls that need
> to be?
>
> Bill
>
> "Eliyahu Goldin" <(E-Mail Removed)> wrote in
> message news:%(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>>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
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
chenhong
Guest
Posts: n/a
 
      07-30-2007
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" <(E-Mail Removed)> 写入消息新闻:(E-Mail Removed) ...
>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
>
>



 
Reply With Quote
 
Bill Gower
Guest
Posts: n/a
 
      07-30-2007
Because they are not applicable if the checkbox is checked.

Bill

"Eliyahu Goldin" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> So you are saying to just use Javascript to disable the controls that
>> need to be?
>>
>> Bill
>>
>> "Eliyahu Goldin" <(E-Mail Removed)> wrote in
>> message news:%(E-Mail Removed)...
>>> 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" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>>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
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      07-30-2007
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Because they are not applicable if the checkbox is checked.
>
> Bill
>
> "Eliyahu Goldin" <(E-Mail Removed)> wrote in
> message news:(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> So you are saying to just use Javascript to disable the controls that
>>> need to be?
>>>
>>> Bill
>>>
>>> "Eliyahu Goldin" <(E-Mail Removed)> wrote in
>>> message news:%(E-Mail Removed)...
>>>> 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" <(E-Mail Removed)> wrote in message
>>>> news:(E-Mail Removed)...
>>>>>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
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
Guest
Posts: n/a
 
      07-30-2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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
>
>


 
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
how can I get plain text assigned through innerHTML to work as real Javascript? Should I use eval()? Jake Barnes Javascript 3 09-10-2007 03:59 AM
ASP.NET and AJAX: JavaScript files from the Microsoft AJAX Library Nathan Sokalski ASP .Net 2 06-02-2007 12:07 AM
AJAX IDE and AJAX TOOL--The Release of JoyiStar AJAX WebShop 3 Beta minnie Java 1 12-13-2006 06:29 AM
How to display plain text files containing javascript code? hoke ASP General 4 01-29-2004 08:04 PM
plain paper for Canon i950 Re: slightly OT printer question what to do Digital Photography 1 07-11-2003 09:34 PM



Advertisments