Results 1 to 2 of 2
-
6th Dec 2010, 09:00 AM #1OPMember
Help About JavaScript
Hello all,
I need help about java script. For example: i have some text and users must click "see hidden" to show that.
I need script called by div, becouse that will only work im my casemacypro Reviewed by macypro on . Help About JavaScript Hello all, I need help about java script. For example: i have some text and users must click "see hidden" to show that. I need script called by div, becouse that will only work im my case :) Rating: 5
-
7th Dec 2010, 12:23 AM #2Respected Member
TRy this:
<script language="javascript">
<!--
var state = 'none';
function showhide(layer_ref) {
if (state == 'block') {
state = 'none';
}
else {
state = 'block';
}
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.display = state");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].display = state;
}
if (document.getElementById &&!document.all) {
hza = document.getElementById(layer_ref);
hza.style.display = state;
}
}
//-->
</script>
<p><a href="#" onclick="showhide('div1');">Show/hide me</a></p>
<div id="div1" style="display: none;">This is the content</div>
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
[WordPress] How to do this in javascript/php?
By thizzladen in forum Web Application/Script SupportReplies: 0Last Post: 16th Mar 2012, 12:05 AM -
Need Javascript Help
By Netguy in forum Web Development AreaReplies: 7Last Post: 19th Mar 2011, 03:24 PM -
JavaScript Kit
By Daniel in forum Useful SitesReplies: 0Last Post: 7th Mar 2011, 06:48 PM -
javascript help
By jokerhacker in forum Web Development AreaReplies: 4Last Post: 27th Dec 2010, 11:02 AM -
help with some javascript
By bumilad20 in forum Web Application/Script SupportReplies: 2Last Post: 3rd Jun 2010, 05:01 AM
themaLeecher - leech and manage...
Version 4.94 released. Open older version (or...