|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
shripatel Smarty n00b
Joined: 13 Jan 2015 Posts: 3
|
Posted: Tue Feb 17, 2015 6:52 am Post subject: How to exit if javascript disabled ? |
|
|
Hi, Newbie for smarty,
Please guide ideally how do i exit or stop processing further if javascript is disabled on user's browser? |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Tue Feb 17, 2015 6:56 am Post subject: |
|
|
Smarty know nothing about javascript or browsers. |
|
Back to top |
|
shripatel Smarty n00b
Joined: 13 Jan 2015 Posts: 3
|
Posted: Tue Feb 17, 2015 7:14 am Post subject: |
|
|
how do convert following code to smarty? pl. guide
<?php
$jsSupport='true'; ?>
<noscript><?php $jsSupport='false'; ?></noscript>
<?php
if ($jsSupport == 'false') {
include ('no-script-layout.php');
} else {
include ('regular-layout.php');
}
?>
do not want to include php in .tpl . |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Tue Feb 17, 2015 11:10 pm Post subject: |
|
|
This can't work because the <noscript>... </noscript> tags are interpreted in clients browser. This is after PHP/Smarty processing when the content is already sent to browser.
This is not a Smarty, but general problem.
Search in the WEB for 'noscript redirect'. |
|
Back to top |
|
shripatel Smarty n00b
Joined: 13 Jan 2015 Posts: 3
|
Posted: Wed Feb 18, 2015 4:30 am Post subject: |
|
|
Thx, alot for tolerating me, it helped .
thank you. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|