Jump to content

Need Help with a script


Mysticwizard2005

Recommended Posts

First I want to say this is all new to me. I have an invisionfree site with a shoutbox on it. I placed the shoutbox in a code to open and close it and have it remembered with cookies. Now this works fine but I have a problem with the centering of it. The code puts a "." on the left site so that when I center it, it is actually off center because of the dot showing up. Can anybody help me or show me a better way to do this? It would need to go into my board wrappers.Here is the coding I am currently using. I'm sure that it is a mess under your standards and that is why I am here :) Hopefully somebody can help me :)

<center><script type="text/javascript"><!--var aPrefix = 'pr';function getCurrentState(mID) {// returnvalues: 1 (closed), 2 (opened)return document.cookie.substr(document.cookie.indexOf(mID+'=') + mID.length +1, 1);}function initMenu(mID) {// make the header clickable, assign an IDvar kids = document.getElementById(mID).childNodes;for (var i = 0; i < kids.length; i++) {if (kids.className == 'shoutbox') {kids.onclick = toggleMenu;kids.id = aPrefix + mID;}}// show or hide the menushowMenu(mID);}function showMenu(mID) {var currentState = getCurrentState(mID);document.getElementById(aPrefix+mID).title = (currentState == 1? 'show' : 'hide') + ' this menu';document.getElementById(aPrefix+mID).style.cursor = 'pointer';var kids = document.getElementById(mID).childNodes;for (var i = 0; i < kids.length; i++) {if (kids.tagName == 'LI' && kids.className!= 'shoutbox') {kids.style.display = currentState == 1? 'none' : 'block';}}}function toggleMenu(e) {if (window.event) e = window.event;var mID = e.srcElement? e.srcElement.id : e.target.id;mID = mID.substr(aPrefix.length);// write the cookievar oneyear = new Date(); oneyear.setFullYear(oneyear.getFullYear() + 1);document.cookie = mID + '=' + (getCurrentState(mID) == 1? 2 : 1) + '; expires=' + oneyear.toGMTString() + '; path=/';// show or hide the menushowMenu(mID);}// --></script><ul id="menu2"><li class="shoutbox">Open - Shoutbox - Close</li><li><center><table width="800"><tr> <divclass='maintitle'>Shoutbox</div> <td id="ucpcontent" valign="top"><input type='hidden' name='act' value='Msg' /> <input type='hidden' name='CODE' value='04' /><input type='hidden' name='MODE' value='01' /> <input type='hidden' name='OID' value='' /> <input type='hidden'name='reply_to' value='' /> <table width="100%" cellspacing="0"><tr><center><table border="0" cellpadding="0" cellspacing="0" summary="shoutbox" align="center"><tr><td align="center">My Shoutbox Code Is Here</span></td></tr></table></div> </table></center></li></ul><script type="text/javascript">initMenu('menu2');</script></center>
Link to comment
Share on other sites

The dot is probably in the shoutbox code, or the list marker on the <li> is showing up.
I beleive it is the <li> causing it. Is there a way to get rid of it?Thanks for your help so far :)
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...