I am self taught in php only. now im starting to learn javascript as well. I have noticed so far that I can dynamically creat my pages, forms, validation etc... with js just like i can with php. (at least that seems true so far from what i am learning). My Q is: Is one better to use for this? if so, then why. It seems to me that page creation and other basics being dynamically created client side would be better than being created server side. Am I correct in this thinking?
fuston05
0
Junior Poster in Training
Recommended Answers
Jump to PostI'll ask a question back: how are you going to provide a full website (menu's and content) to your user, using only javascript.
Jump to PostWhich is better for your needs, a van or a 4 door sedan? Without more info, the only real answer is "it all depends".
You don't need to choose because you can use both. Some things can only be done in Javascript but having that within a PHP context …
Jump to Postphp will create pages that everybody can use as it is 'served' via your web server. js can only work if it is enabled (to varying degrees) by the user's browser. Some browsers have compatibility issues, so native js can be problematic. Thankfully js libraries/frameworks such as jQuery take out …
All 12 Replies
pritaeas
2,149
¯\_(ツ)_/¯
Moderator
Featured Poster
chrishea
182
Nearly a Posting Virtuoso
fuston05
0
Junior Poster in Training
vaultdweller123
32
Posting Pro

diafol
fuston05
0
Junior Poster in Training
jakizak
0
Light Poster
terabyte
0
Junior Poster in Training
fuston05
0
Junior Poster in Training

diafol
vaultdweller123
32
Posting Pro
chrishea
182
Nearly a Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.