473,748 Members | 5,232 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Given that some browsers dont have javascript enabled....

Given that some browsers dont have javascript enabled.... do developers try
to avoid using javascript when a php alternative can be used? What sort of
alternative php scripts are often used?

Jul 16 '05 #1
2 3576
"ChronicFatigue " <NO*********@ch ronic-fatigue.co.uk> writes:
Given that some browsers dont have javascript enabled.... do developers try
to avoid using javascript when a php alternative can be used? What sort of
alternative php scripts are often used?


Yes, people do (or at least *should* if they don't) use PHP (or
another server-side language) instead of Javascript if possible.

As far as what PHP does, that depends what Javascript is doing. I
suppose a common example would be handling form submission, which can
be done in either Javascript or PHP, but can only be *sensibly* done
server-side in PHP.

If you give specific examples of things done with Javascript then it's
easy enough to say whether there's an obvious PHP alternative.

--
Chris
Jul 16 '05 #2
"ChronicFatigue " <NO*********@ch ronic-fatigue.co.uk> wrote in message news:<bg******* ***@sparta.btin ternet.com>...
Given that some browsers dont have javascript enabled.... do developers try
to avoid using javascript when a php alternative can be used? What sort of
alternative php scripts are often used?


Everything you *need* to do should be done in PHP. Javascript is only
for fancy cosmetic stuff therefore it is not *necessary*. Any
client-side validation you want to do with javascript should always be
done server-side within your PHP script just in case the client has
javascript disabled. Also remember that it is possible for someone to
get your HTML source, edit or remove the javascript then submit the
page. This could potentially lead to a disaster if you did not
double-check everything within your PHP script.

Tony Marston
http://www.tonymarston.net/
Jul 16 '05 #3

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

Similar topics

53
5738
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is difficult to know what is going on. One of these Order Forms you can see here... http://www.cardman.co.uk/orderform.php3
111
14418
by: Retlak | last post by:
The recommended (on dozens of websites) and effective (works in Netscape, MSIE, Mozilla, probably others) way to detect if a browser has Javascript turned off is to put this in the <head>: <noscript> <meta http-equiv="refresh" content="1;url=http://yourURL/nojscript.html"> </noscript> This redirects to a doc which typically says "You need to enable
5
6753
by: William Krick | last post by:
I did a little searching for javascript code that will make a page "jump out" of frames when the page is loaded. There seems to be many, many ways to do this and I've added the ones I found to the end of this post. Which one should I use? Is there a generally accepted "best" way to do this that works will all browsers? .... Krick
5
6772
by: niftyhawk | last post by:
Hi, Can anybody give me a simple example of how to Call Web Services from Mozilla based Browsers ? I can call web services from IE browser using web service behavior file, without any problems. Just wanted to know an easy way to call them from Firefox or Netscape. Thanks, Nifty.
2
2022
by: Wysiwyg | last post by:
Has anyone found a reasonable way to emulate smartnavigation functionality for any browser? I'd really like to avoid creating history entries when posting back to the same page. SmartNavigation takes care of the annoying problem caused by creating a new history entry when a page posts to itself. Only Internet Explorer will support this functionality. When SmartNavigation is enabled the client executes javascript code from the SmartNav.js...
4
1127
by: Samba | last post by:
Hi, I'm having a very genuine problem: I'm developing an ASP.NET web application. Since I'm using a lot of Javascripts in my pages, I want to ensure that my clients do not disable Script in settings. If they do so, I need to give them a warning. Any insight into this is higly appreciated. Thanks very much in advance. -- Samba!
5
1132
by: vsr | last post by:
is there any way to remove some information from trace, tracing by default displays session , application variables, but i need to remove these two from trace.can any let me know how can i do it?
7
2993
by: Roman | last post by:
I am wondering if anybody can provide statistics what is percentage of visitors with disabled JavaScript. Even more interesting would be statistics of users with disabled JavaScript making a purchase. I am more likely to purchase from my home than from work and I think the disabled JS is mostly result of IT dept. policies. Is e-commerce site missing much if requires JavaScript ?
51
4146
by: Ojas | last post by:
Hi!, I just out of curiosity want to know how top detect the client side application under which the script is getting run. I mean to ask the how to know whether the script is running under Command Prompt or Browser or some other application? Ojas.
0
8991
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8831
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9548
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9249
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8244
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.