This question already has answers here:
What is the difference between client-side and server-side programming?
(3 answers)
Closed 8 years ago.
Hello I was wondering if the noscript tag could be used in a php action? I want the user to be stoped if the action finds that the user has no java script enabled
Noscript is a standard html tag. PHP occurs before html is executed so the page will stop and not get to the closing portion of the noscript tag at all. So no that will not work.
Related
This question already has answers here:
How to detect if JavaScript is disabled?
(39 answers)
Closed 3 years ago.
I had opened my browser setting and blocked Javascript for all websites. But when I tried to access Facebook, it says
"We're sorry, but Facebook doesn't work properly without JavaScript enabled."
My question is, how they have detected that my browser is not allowing Javascript?
They use the noscript element to selectively redirect.
<noscript><meta http-equiv="refresh" content="0; URL=/?_fb_noscript=1" /></noscript><
First – you can display this message by default and remove it with JS.
Seconds – there is a HTML <noscript> tag.
This question already has answers here:
Node.js : How to embed Node.js into HTML?
(3 answers)
Closed 3 years ago.
Is there some way to embed node.js (i.e. server-side) code into HTML, like <?php does for PHP? What I'm aiming for is a pretty looking page, which will still have back-end functionality of whatever kind (say printing stuff from a database).
Thanks.
With node, you can use <?js tags
Hope this helps
This question already has answers here:
How to prevent your JavaScript code from being stolen, copied, and viewed? [closed]
(10 answers)
Closed 5 years ago.
I have inserted my javascripts in the header.php file, but I noticed the whole code can be stolen by simply lookin at the source from within any single post or homepage...
May you suggest me a simple way to hide my javascripts in wordpress somehow to prevent being copied/stolen?
You can't hide javascript. Client always need to access it.
You can minify and uglyfy your code, so it will be hard to read it
This question already has answers here:
Why pass parameters to CSS and JavaScript link files like src="../cnt.js?ver=4.0"?
(9 answers)
Closed 7 years ago.
On some webpages I meet the following script tag:
<script type="text/javascript" src="../../Scripts/view-item-details.js?v1"></script>
what does ?v1 really stand for and why is it used?
Everything behind the question mark is a parameter that is delivered to the JavaScript.
In the given case a change in the version number prevents the browser from using the cached file and instead getting it from the server.
This question already has answers here:
Include another HTML file in a HTML file
(41 answers)
including one html file into another [closed]
(2 answers)
Closed 8 years ago.
I need to create a navigation menu that can be edited separately and inserted into many html pages. Is there a way to do this using javascript / jQuery or does one have to use php? How can this be achieved?
This can be achieved with ajax, but It's easier, quicker and cleaner to do it in php.
with jquery:
$( "#navigation-container" ).load( "navigation.html" );
with php:
<? php include 'navigation.php'; ?>
To make php work you'll need a web server (such as XAMPP, MAMP, or similar)