Ask your own question, for FREE!
Computer Science 7 Online
OpenStudy (anonymous):

What are Scripts (In reference of Web designing) and Why are they used for Web designing? Why aren't HTML and PHP enough for making a Website, they are but what I mean to ask Why do people use them?

OpenStudy (anonymous):

HTML and PHP can provide everything you need for making a website. Sometimes using scripts can help to provide additional functionality that might otherwise be more difficult or impossible using HTML and PHP alone.

OpenStudy (jagatuba):

The thing with HTML is that it is just a markup up language. That is to say that it is great for defining your content and rendering it, but it provides no interactivity or other functionality. For example you cannot process a Web form using only HTML. This is where scripting languages come into play. They can preform function that you would normally only see in a program or application.

OpenStudy (jagatuba):

*perform

OpenStudy (anonymous):

And also is Python a good language for Scripting? Can I expect same results with Pythin as with Javascript? Python is easy, it looks easy and I have some prior experience in Python.

OpenStudy (jagatuba):

Python can be used for scipting on the server side.

OpenStudy (anonymous):

Oh, so for better interactive environment.

OpenStudy (jagatuba):

Yes say you have a Web form for people to fill out with their address and what not. You can validate that form (be sure their zipcode is 5 numbers and nothing else, etc.) using JavaScript and then pass it to the server for further processing using Python (running credit card numbers or whatever).

OpenStudy (anonymous):

http://anunay.co.in/ http://madebylazar.us/ Is it possible to create site like this without Scripts?

OpenStudy (jagatuba):

Both those sites use javascript on the client side.

OpenStudy (anonymous):

I did view the page source and the page does use scripts. I was just curious about all the scripts and stuff.

OpenStudy (anonymous):

Thanks Jagatuba! and iamcorbin. I think I need to emphasize on learning stuff and stop searching for shortcuts.

OpenStudy (jagatuba):

You can make a webpage without using scripts. I have done it many times, but with scripts you can do so much more. Sites can be much cooler if you incorporate a bit of programming into them.

OpenStudy (anonymous):

dont use only javascript for data validation, because you may break it, check that in server again

OpenStudy (jagatuba):

Yes, client-side validation is going to catch simple errors (wrong number of digits on CC number, etc) but won't catch more complicated errors (wrong or invalid CC number, etc). Your server-side scripts and servlets will handle these things.

OpenStudy (anonymous):

i think you can get through with wrong number of digits too

OpenStudy (anonymous):

What is data validation?

OpenStudy (anonymous):

if you want someone to type phone number, it probably wont have any letters? so you may not accept inputs with letter by checking input

OpenStudy (jagatuba):

@ Tomas: Wrong number of digits will not get through if you preform the proper checks using conditional statements in your client-side script.

OpenStudy (anonymous):

Oh now i get it, but why are client side scripts unable to detect complicated errors is it because they are supposed to be light?

OpenStudy (jagatuba):

Another use of scripts on forms is to create a mask. For example. You have a telephone number field and you can script it so that if a person enters 1234567890 it is entered as 123-456-7890 or (123) 456-7890.

OpenStudy (jagatuba):

Because your server is the work horse that is going to handle tasks like charging the person's credit card.

OpenStudy (jagatuba):

Even with SSL handling transitions on the client-side is risky not to mention problematic.

OpenStudy (anonymous):

So when we select a username for an email account on google the script which validates our username to be unique must be server side but how does it gets the result so fast. does google have some kind of supercomputer back at HQ?

OpenStudy (anonymous):

i can make same thing right now, does it mean i have super computer? :OOO

OpenStudy (anonymous):

no, but you have supermind :-D

OpenStudy (jagatuba):

Several things must be validated when creating a user account (does the user name already exist? is the email valid? etc). These things will be handled server-side.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!