WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You

WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1Hide/View Code Empty Hide/View Code Mon Mar 29, 2010 4:16 pm

shamzblueworld

shamzblueworld
Registered Member
Registered Member
Hi guys, Here is a Code
Code:
<html>
<head>   
<script type="text/javascript">
        function toggleDiv()
        {
          if (document.getElementById("myDivBox").style.display == "block")
        {
            document.getElementById("myDivBox").style.display = "none";
          }
          else
          {
          document.getElementById("myDivBox").style.display = "block";
          }
}   
</script> 
</head>
<body>
<img src="IMAGEURL.JPG" value="Show/Hide Affiliates" onclick="toggleDiv()">
<div id="myDivBox" style="display:none;">

CONTENT HERE

</div> 
</body>
</html>
Now i know how we can use it under a forum, but I want to use it under a topic, how can we do this?
Also I want to put those cricinfo widgets in it, so a user can click on them to view the latest scores etc.
How can I do that?

2Hide/View Code Empty Re: Hide/View Code Tue Mar 30, 2010 8:59 am

ankillien

ankillien
Administrator
Administrator
Hi sham!

I think you can put the codes from <sript.... to </script> in your overall_header template inside the <head>...</head> tags.

Now you can use this code to put any hide/show content anywhere in your forum (widgets, posts, or anywhere else)
Code:
<img src="IMAGEURL.JPG" value="Show/Hide Affiliates" onclick="toggleDiv()">
<div id="myDivBox" style="display:none;">

CONTENT HERE

</div> 

3Hide/View Code Empty Re: Hide/View Code Tue Mar 30, 2010 10:00 am

shamzblueworld

shamzblueworld
Registered Member
Registered Member
Okay, here is the code for a cricinfo widget
Code:
<object type="application/x-shockwave-flash" data="http://www.widgets.cricinfo.com/o/482c264908cd8b29/4baf509598933bd4/482c264908cd8b29/cefbd1eb" id="W482c264908cd8b294baf509598933bd4" width="300" height="250"><param name="movie" value="http://www.widgets.cricinfo.com/o/482c264908cd8b29/4baf509598933bd4/482c264908cd8b29/cefbd1eb" /><param name="wmode" value="transparent" /><param name="allowNetworking" value="all" /><param name="allowScriptAccess" value="always" /></object>
Now I want them in Topic List page, They should be like topic titles and if thats not possible then I want them below a topic's title as we can put them in forum's description and that looks is that possible in a topic? Can we put the above code in Topics description?

4Hide/View Code Empty Re: Hide/View Code Wed Mar 31, 2010 4:53 pm

ankillien

ankillien
Administrator
Administrator
I am not sure about it. You can try putting the code in topic description.

5Hide/View Code Empty Re: Hide/View Code Wed Mar 31, 2010 5:36 pm

shamzblueworld

shamzblueworld
Registered Member
Registered Member
Well the code is not working now. The code I gave in the topic for show/hide isn't working. Can you please tell me whats wrong with it?
Actualy its I had it in my computer so I am not sure about it. I know I have used it and it used to work for me but now its not even working in the forum's description.

6Hide/View Code Empty Re: Hide/View Code Wed Mar 31, 2010 6:45 pm

ankillien

ankillien
Administrator
Administrator
The code is fine, I think. All you need to do is put this code in overall_header template right before the </head> tag...

Code:
<script type="text/javascript">
        function toggleDiv()
        {
          if (document.getElementById("myDivBox").style.display == "block")
        {
            document.getElementById("myDivBox").style.display = "none";
          }
          else
          {
          document.getElementById("myDivBox").style.display = "block";
          }

</script> 

And then put this code wherever you want the show/hide content...

Code:
<img src="IMAGEURL.JPG" value="Show/Hide Affiliates" onclick="toggleDiv()">
<div id="myDivBox" style="display:none;">

CONTENT HERE

</div> 

It should work anywhere in the forum.

7Hide/View Code Empty Re: Hide/View Code Thu Dec 16, 2010 11:19 pm

blade99

blade99
Registered Member
Registered Member
Spoiler:

http://dreamland.canadianforum.net/

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

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