Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

How to exit if javascript disabled ?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
shripatel
Smarty n00b


Joined: 13 Jan 2015
Posts: 3

PostPosted: Tue Feb 17, 2015 6:52 am    Post subject: How to exit if javascript disabled ? Reply with quote

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
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Tue Feb 17, 2015 6:56 am    Post subject: Reply with quote

Smarty know nothing about javascript or browsers.
Back to top
View user's profile Send private message
shripatel
Smarty n00b


Joined: 13 Jan 2015
Posts: 3

PostPosted: Tue Feb 17, 2015 7:14 am    Post subject: Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Tue Feb 17, 2015 11:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
shripatel
Smarty n00b


Joined: 13 Jan 2015
Posts: 3

PostPosted: Wed Feb 18, 2015 4:30 am    Post subject: Reply with quote

Thx, alot for tolerating me, it helped .
thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP