Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > ajax but disable javascript

Reply
Thread Tools

ajax but disable javascript

 
 
jpaul
Guest
Posts: n/a
 
      04-12-2006
Hi I am very new to this two

If the browser disable the javascript, what happen to Ajax? can i slove
the problem by using server side script? any suggestion for this?

i currently do some dirty projects with perl/cgi, and I would like to
add more client side features which relate to ajax, and do some
validation on the client side with javascript. but it is possible that
the javascript may be disable with some browsers. what can i do if the
client's broweer disable the javascript.

thank you

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      04-12-2006
jpaul wrote:
> Hi I am very new to this two
>
> If the browser disable the javascript, what happen to Ajax? can i slove
> the problem by using server side script? any suggestion for this?
>

You're SOL if JavaScript is disabled.

> i currently do some dirty projects with perl/cgi, and I would like to
> add more client side features which relate to ajax, and do some
> validation on the client side with javascript. but it is possible that
> the javascript may be disable with some browsers. what can i do if the
> client's broweer disable the javascript.
>

Fall back to conventional server side processing.

--
Ian Collins.
 
Reply With Quote
 
 
 
 
optimistx
Guest
Posts: n/a
 
      04-12-2006

"Ian Collins" <(E-Mail Removed)> kirjoitti viestissä
news:(E-Mail Removed)...
> You're SOL if JavaScript is disabled.
> --
> Ian Collins.


SOL? google gave over one million hits.


 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      04-12-2006
optimistx wrote:
> "Ian Collins" <(E-Mail Removed)> kirjoitti viestissä
> news:(E-Mail Removed)...
>
>>You're SOL if JavaScript is disabled.
>>--
>>Ian Collins.

>
>
> SOL? google gave over one million hits.
>

Sorry, I think it's an Americanism, the last two letters are Out of Luck.

--
Ian Collins.
 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      04-12-2006
jpaul wrote:
> If the browser disable the javascript, what happen to Ajax?


Ajax is a buzzword that basically means "Using JavaScript to make
requests to the server and process the response".

If JavaScript is disabled you can't use it to make such requests.

> can i slove the problem by using server side script?


That depends what the problem is. Ajax is just a technology. It might
be used in a solution to a problem, but it isn't a solution in and of
itself.

> i currently do some dirty projects with perl/cgi, and I would like to
> add more client side features which relate to ajax, and do some
> validation on the client side with javascript.


Never ever depend on the client to ensure data integrity / sanity. You
are effectively asking the user to police themselves. By all means use
it as a convienience to the user, but check the data again when it gets
to the server.

> but it is possible that the javascript may be disable with some browsers.
> what can i do if the client's broweer disable the javascript.


If its fluff, just forget about it, the user will get a slightly less
nice experience (well, depending on the fluff, sometimes things work
better without the JS).

If it does something useful, have a server side fallback.

 
Reply With Quote
 
jpaul
Guest
Posts: n/a
 
      04-12-2006
I usually code javascript which embed in Html form before I call the
server side script, I do all the validation in client side before it
goes to Server side. But it isn't possible for me to know if the client
already disable javascript. What method should I use to check for
browser and javascript, so incase I will not send the Html form with
Javascript that can not run in the client? The answer that I already
think off is, using server side script to check and if the client isn't
disable the javascript, then print the html form with javascript embed,
else I should use all the server side script.

 
Reply With Quote
 
Dylan Parry
Guest
Posts: n/a
 
      04-12-2006
Pondering the eternal question of "Hobnobs or Rich Tea?", jpaul finally
proclaimed:

> I do all the validation in client side before it goes to Server side.
> But it isn't possible for me to know if the client already disable
> javascript.


I'd just have the server-side scripting re-validate the user input
anyway. That way people with Javascript support will have their input
validated quickly without them having to wait for the server to respond,
but as a fall back users without scripting enabled will still have their
input validated, but in a slightly longer process.

I wouldn't waste time trying to figure out whether the client supports
scripting or not, and sending different pages. That's just counter
productive.

--
Dylan Parry
http://electricfreedom.org -- Where the Music Progressively Rocks!
 
Reply With Quote
 
The Magpie
Guest
Posts: n/a
 
      04-12-2006
jpaul wrote:
> Hi I am very new to this two
>
> If the browser disable the javascript, what happen to Ajax? can i slove
> the problem by using server side script? any suggestion for this?
>

Simple answer: AJAX stands for "Asynchronous Javascript and XML".
Therefore, without Javascript there can be no AJAX.
 
Reply With Quote
 
Rich
Guest
Posts: n/a
 
      04-12-2006
On Wed, 12 Apr 2006 16:52:18 +0100, Dylan Parry wrote...
>
>Pondering the eternal question of "Hobnobs or Rich Tea?", jpaul finally
>proclaimed:
>
>> I do all the validation in client side before it goes to Server side.
>> But it isn't possible for me to know if the client already disable
>> javascript.

>
>I'd just have the server-side scripting re-validate the user input
>anyway. That way people with Javascript support will have their input
>validated quickly without them having to wait for the server to respond,
>but as a fall back users without scripting enabled will still have their
>input validated, but in a slightly longer process.
>
>I wouldn't waste time trying to figure out whether the client supports
>scripting or not, and sending different pages. That's just counter
>productive.
>


As a task of getting a project complete it can be counter productive, but as an
end result the javascript validation can make the experience more polished and
professional if done right.

Client-side validation can make the experience a little prettier for folks that
have javascript enabled, but in either case I would not rely on the submitted
data itself. It's pretty easy to bypass javascript form validation, so you
always want to error check it on the server before doing anything with the
submitted data.

Rich


--
Newsguy Bandwidth Blowout April-18-2006
Unlimited downloads all day long
http://newsguy.com/nolimits.htm
 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      04-12-2006
Rich wrote:

>>I wouldn't waste time trying to figure out whether the client supports
>>scripting or not, and sending different pages. That's just counter
>>productive.


> As a task of getting a project complete it can be counter productive, but
> as an end result the javascript validation can make the experience more
> polished and professional if done right.


So? Write one page that degrades gracefully if JavaScript isn't supported.


--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
 
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
An Ajax Dictionary... My first AJAX project... GreatDomainz@gmail.com HTML 20 03-31-2008 01:24 PM
Ajax call in Javascript to request on same server but different port Jimmy Javascript 3 08-13-2007 06:55 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



Advertisments