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

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 3563
"ChronicFatigue" <NO*********@chronic-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*********@chronic-fatigue.co.uk> wrote in message news:<bg**********@sparta.btinternet.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
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...
111
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>: ...
5
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...
5
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....
2
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...
4
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...
5
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
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...
51
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.