How do i make a Hide until reply box?
3 posters
Page 1 of 1
How do i make a Hide until reply box?
How would i create a hidden content code, that says You must Repy to reveal hidden content? im assuming javascript would do the trick and a little bit off CSS
Re: How do i make a Hide until reply box?
I think you're talking about "hidden"
Sir Chivas™- Helper
- Posts : 6965
Reputation : 457
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||
Re: How do i make a Hide until reply box?
Yes Chivas thats what he means. I created a code like this, but its not the same thing, i do not know the variable for when reply only onClick which i used for my hidden content
- Code:
<script language="javascript" type="text/javascript">
//<!--
function showRow(row1){
if (document.getElementById(row1)) {
document.getElementById(row1).style.display = '';
}
}
function hideRow(row1){
if (document.getElementById(row1)) {
document.getElementById(row1).style.display = 'none';
}
}
function toggleRow(row1){
if (document.getElementById(row1)) {
if (document.getElementById(row1).style.display == 'none') {
showRow(row1)
} else {
hideRow(row1)
}
}
}
//-->
</script>
<script type="text/javascript">
window.onload=function('hideRow';) {
toggleRow('row1');
};
</script>
Last edited by nextlevelgaming on August 2nd 2012, 4:56 am; edited 1 time in total (Reason for editing : found code i created)
Re: How do i make a Hide until reply box?
yeah im not very good with javascript either, it took me about two days to make this work correctly. I learned from www.w3schools.com and stackoverflow.com its tought dude. but ill explain a little to you.
firstly function showRow showRow is a variable for the document.getElementById. row1 is the class...
so in the html i would write
the onClick="javascript:toggleRow('row1')" cuz the caller is from javascript, the toggleRow is from the variable list and row1 is the class.
tr id="row1" is so that the javascript knows thats what i am controlling.
The rest of it such as
showRow
hideRow
put in the factors of that same class. Im probably confussing you since im not a big js guy either. i kind of understand it after i took the time to write and understand each word being written out. maybe someone on here can help you a little more. what are you trying to hide? cuz maybe theres another way you make it appear rather than reply.
- Code:
function showRow(row1){
if (document.getElementById(row1)) {
document.getElementById(row1).style.display = '';
}
}
firstly function showRow showRow is a variable for the document.getElementById. row1 is the class...
so in the html i would write
- Code:
<input type="button" Value="Open Form" onClick="javascript:toggleRow('row1')"></center>
the onClick="javascript:toggleRow('row1')" cuz the caller is from javascript, the toggleRow is from the variable list and row1 is the class.
- Code:
<tr id="row1" style="display:none;">
tr id="row1" is so that the javascript knows thats what i am controlling.
The rest of it such as
showRow
hideRow
put in the factors of that same class. Im probably confussing you since im not a big js guy either. i kind of understand it after i took the time to write and understand each word being written out. maybe someone on here can help you a little more. what are you trying to hide? cuz maybe theres another way you make it appear rather than reply.
Re: How do i make a Hide until reply box?
Links/ codes, i want my site to be active and make people post in order to unlock something, cause i have 1200 members and only 7000 posts, ridiculous, 900 of them are leachers, so i want them to actually post to unlock something
Re: How do i make a Hide until reply box?
Well what you could do is make a new group, auto assign it, make post count maybe 1,5,or 10 whatever you want it. Or make it different for each thing you dont want that group set to see only. Thats how i do it
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum