My goal is to conditionally hide text/ links etc. based on whether the user is logged in or not. TO be more specific, i want the login text to change into a "Hi user..... Logout" link whenever he has logged in.
In my datapage i have enabled parameters and writting the following code in an HTML block
<br /> <script> var type_user='[@field:Resume]'; </script>
where Resume is a Yes/no field in the same dataset, it is a Yes for all users.
On my website, i have an HTML code which goes like
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
josephstanley
Hi,
My goal is to conditionally hide text/ links etc. based on whether the user is logged in or not. TO be more specific, i want the login text to change into a "Hi user..... Logout" link whenever he has logged in.
In my datapage i have enabled parameters and writting the following code in an HTML block
<br />
<script>
var type_user='[@field:Resume]';
</script>
where Resume is a Yes/no field in the same dataset, it is a Yes for all users.
On my website, i have an HTML code which goes like
<script>
if (type_user=='Yes') {
document.getElementById("uniquename").style.display = "none";
}
else {
document.getElementById("uniquename").style.display = "block";
}
</script>
<div id="uniquename" style="display:block;">
<p>I am something.</p>
</div>
Please help!
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.