Results 1 to 1 of 1

Thread: [solved] Show/hide link does not work

  1. #1
    Join Date
    Apr 2006
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default [solved] Show/hide link does not work

    Code:
    		<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
    /* LONG LIST OF OTHER FUNCTIONS ARE MEANT TO BE HERE... */
    			var currentSwap = false;
    			function swapOptions()
    			{
    				document.getElementById("postMoreExpand").src = smf_images_url + "/" + (currentSwap ? "collapse.gif" : "expand.gif");
    				document.getElementById("postMoreExpand").alt = currentSwap ? "-" : "+";
    
    				document.getElementById("postMoreOptions").style.display = currentSwap ? "" : "none";
    
    				if (document.getElementById("postAttachment"))
    					document.getElementById("postAttachment").style.display = currentSwap ? "" : "none";
    				if (document.getElementById("postAttachment2"))
    					document.getElementById("postAttachment2").style.display = currentSwap ? "" : "none";
    
    				if (typeof(document.forms.postmodify) != "undefined")
    					document.forms.postmodify.additional_options.value = currentSwap ? "1" : "0";
    
    				currentSwap = !currentSwap;
    			}
    			var currentSwapFS = false;
    			function swapOptionsFS()
    			{
    				document.getElementById("postMoreExpandFS").src = smf_images_url + "/" + (currentSwap ? "collapse.gif" : "expand.gif");
    				document.getElementById("postMoreExpandFS").alt = currentSwap ? "-" : "+";
    
    				document.getElementById("postMoreOptionsFS").style.display = currentSwap ? "" : "none";
    
    				if (document.getElementById("postAttachmentFS"))
    					document.getElementById("postAttachmentFS").style.display = currentSwap ? "" : "none";
    				if (document.getElementById("postAttachment2FS"))
    					document.getElementById("postAttachment2FS").style.display = currentSwap ? "" : "none";
    
    				if (typeof(document.forms.postmodify) != "undefined")
    					document.forms.postmodify.additional_options.value = currentSwapFS ? "1" : "0";
    
    				currentSwapFS = !currentSwapFS;
    			}
    		// ]]></script>
    And then...

    *BLAH BLAH BLAH*

    Code:
    				<td valign="middle">
    					<a href="javascript:void(0);" onclick="replaceText(' :)', document.forms.postmodify.message); return false;"><img src="http://127.0.1.1/smf/Smileys/default/smiley.gif" align="bottom" alt="Smiley" title="Smiley" /></a>
    
    					<a href="javascript:void(0);" onclick="replaceText(' ;)', document.forms.postmodify.message); return false;"><img src="http://127.0.1.1/smf/Smileys/default/wink.gif" align="bottom" alt="Wink" title="Wink" /></a>
    					<a href="javascript:void(0);" onclick="replaceText(' :D', document.forms.postmodify.message); return false;"><img src="http://127.0.1.1/smf/Smileys/default/cheesy.gif" align="bottom" alt="Cheesy" title="Cheesy" /></a>
    					<a href="javascript:void(0);" onclick="replaceText(' ;D', document.forms.postmodify.message); return false;"><img src="http://127.0.1.1/smf/Smileys/default/grin.gif" align="bottom" alt="Grin" title="Grin" /></a>
    					<a href="javascript:void(0);" onclick="replaceText(' >:(', document.forms.postmodify.message); return false;"><img src="http://127.0.1.1/smf/Smileys/default/angry.gif" align="bottom" alt="Angry" title="Angry" /></a>
    					<a href="javascript:void(0);" onclick="replaceText(' :(', document.forms.postmodify.message); return false;"><img src="http://127.0.1.1/smf/Smileys/default/sad.gif" align="bottom" alt="Sad" title="Sad" /></a>
    					<a href="javascript:void(0);" onclick="replaceText(' :o', document.forms.postmodify.message); return false;"><img src="http://127.0.1.1/smf/Smileys/default/shocked.gif" align="bottom" alt="Shocked" title="Shocked" /></a>
    					<a href="javascript:void(0);" onclick="replaceText(' 8)', document.forms.postmodify.message); return false;"><img src="http://127.0.1.1/smf/Smileys/default/cool.gif" align="bottom" alt="Cool" title="Cool" /></a>
    					<a href="javascript:void(0);" onclick="replaceText(' ???', document.forms.postmodify.message); return false;"><img src="http://127.0.1.1/smf/Smileys/default/huh.gif" align="bottom" alt="Huh" title="Huh" /></a>
    					<a href="javascript:void(0);" onclick="replaceText(' ::)', document.forms.postmodify.message); return false;"><img src="http://127.0.1.1/smf/Smileys/default/rolleyes.gif" align="bottom" alt="Roll Eyes" title="Roll Eyes" /></a>
    
    					<a href="javascript:void(0);" onclick="replaceText(' :P', document.forms.postmodify.message); return false;"><img src="http://127.0.1.1/smf/Smileys/default/tongue.gif" align="bottom" alt="Tongue" title="Tongue" /></a>
    					<a href="javascript:void(0);" onclick="replaceText(' :-[', document.forms.postmodify.message); return false;"><img src="http://127.0.1.1/smf/Smileys/default/embarrassed.gif" align="bottom" alt="Embarrassed" title="Embarrassed" /></a>
    					<a href="javascript:void(0);" onclick="replaceText(' :-X', document.forms.postmodify.message); return false;"><img src="http://127.0.1.1/smf/Smileys/default/lipsrsealed.gif" align="bottom" alt="Lips sealed" title="Lips sealed" /></a>
    					<a href="javascript:void(0);" onclick="replaceText(' :-\\', document.forms.postmodify.message); return false;"><img src="http://127.0.1.1/smf/Smileys/default/undecided.gif" align="bottom" alt="Undecided" title="Undecided" /></a>
    					<a href="javascript:void(0);" onclick="replaceText(' :-*', document.forms.postmodify.message); return false;"><img src="http://127.0.1.1/smf/Smileys/default/kiss.gif" align="bottom" alt="Kiss" title="Kiss" /></a>
    					<a href="javascript:void(0);" onclick="replaceText(' :\'(', document.forms.postmodify.message); return false;"><img src="http://127.0.1.1/smf/Smileys/default/cry.gif" align="bottom" alt="Cry" title="Cry" /></a><br />
    <a href="javascript:swapOptionsFS();"><img src="http://127.0.1.1/smf/Themes/default/images/expand.gif" alt="+" id="postMoreExpandFS" /></a> <a href="javascript:swapOptionsFS();"><b>Free Smileys</b></a>
    <br />
    <div id="postMoreOptionsFS">HI</div>
    
    				</td>
    Now here's the problems:
    • I can click the hide thing ( swapOptionsFS(); ), but can't make it expand again
    • "HI" always shows


    So what have I done wrong? Be aware the links are localhost ones.
    Last edited by rctxtreme; 04-06-2007 at 12:13 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •