The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

How do i make a Hide until reply box?

View previous topic View next topic Go down

How do i make a Hide until reply box?

Post by xDroiidx on August 2nd 2012, 4:24 am

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

xDroiidx
Forumember

Posts : 95
Reputation : 2
Language : English

http://www.epicstep.forumotion.com

Back to top Go down

Re: How do i make a Hide until reply box?

Post by Sir Chivas™ on August 2nd 2012, 4:30 am



I think you're talking about "hidden"

Sir Chivas™
Support Moderator
Support Moderator

Male Posts : 6783
Reputation : 430
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||

Back to top Go down

Re: How do i make a Hide until reply box?

Post by xDroiidx on August 2nd 2012, 4:42 am


xDroiidx
Forumember

Posts : 95
Reputation : 2
Language : English

http://www.epicstep.forumotion.com

Back to top Go down

Re: How do i make a Hide until reply box?

Post by nextlevelgaming on August 2nd 2012, 4:54 am

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>
is the code that i used. maybe you can manipulate this my friend


Last edited by nextlevelgaming on August 2nd 2012, 4:56 am; edited 1 time in total (Reason for editing : found code i created)

nextlevelgaming
Forumember

Male Posts : 989
Reputation : 38
Language : English|CSS|HTML5|javascript|
Location : New York

http://www.easybbtutorials.forumotion.com

Back to top Go down

Re: How do i make a Hide until reply box?

Post by xDroiidx on August 2nd 2012, 6:12 am

Well im a noob at Javascript so i wouldnt know how Razz

xDroiidx
Forumember

Posts : 95
Reputation : 2
Language : English

http://www.epicstep.forumotion.com

Back to top Go down

Re: How do i make a Hide until reply box?

Post by nextlevelgaming on August 2nd 2012, 6:36 am

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.

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.


nextlevelgaming
Forumember

Male Posts : 989
Reputation : 38
Language : English|CSS|HTML5|javascript|
Location : New York

http://www.easybbtutorials.forumotion.com

Back to top Go down

Re: How do i make a Hide until reply box?

Post by xDroiidx on August 2nd 2012, 7:09 am

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

xDroiidx
Forumember

Posts : 95
Reputation : 2
Language : English

http://www.epicstep.forumotion.com

Back to top Go down

Re: How do i make a Hide until reply box?

Post by nextlevelgaming on August 2nd 2012, 4:55 pm

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

nextlevelgaming
Forumember

Male Posts : 989
Reputation : 38
Language : English|CSS|HTML5|javascript|
Location : New York

http://www.easybbtutorials.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum