This should be a Mickey Mouse question.
I want to write alternative code if active content is disabled.
Something along these lines:-
{* smarty code snippet *}
<a href="{if $activeContentIsEnabled == 1}javascript:myscript(){else}stuff{/if}">stuff</a>
But I can't find out how to detect if the user's browser has active content enabled. All my googling shows me is hundreds of pages telling me how to turn it on in IE, Mozilla..., or why it should be turned off.
how do I set the value to my variable $activeContentIsEnabled?
Is active content enabled
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
or you can get crafty.
Code: Select all
<script language="JavaScript">
function mySubmit ()
{
var form = document.getElementById('myForm');
form.action = form.action + '?js=true';
form.submit();
}
</script>
<form name="myForm" action="index.php" method="post">
<input type="text" name="text" size="10" />
<input type="submit" onclick="mySubmit();return false;" />
</form>