|
Post by pm on May 8, 2009 19:38:09 GMT -8
Wormopolis, is it possible to join my welcome table to my nav tree table? I don't want to show the link to my site just yet but I can pm it to you. I'm using this code to add a table to my nav tree. <script type="text/javascript"> <!-- /*Navigation Mod - By iAlex - Open Source*/ var iLink=document.getElementsByTagName('a'); for(i=0;i<iLink.length;i++){ if(iLink.item(i).className.match(/^nav$/)){ var iKay=iLink.item(i).parentNode.innerHTML.split(/<table/i)[0].split(/<br \/?>/i)[0]; var iDiv=document.createElement('div'); iDiv.innerHTML='<table width="100%" class="bordercolor" cellspacing="1" cellpadding="2"><tr><td class="windowbg">'+iKay.replace(/<br\s?\/?>/i, '')+'</td></tr></table>'; while(!iLink.item(i).nextSibling.nodeName.match(/(table|script|tr|td|div)/i)){ iLink.item(i).parentNode.removeChild(iLink.item(i).nextSibling); } iLink.item(i).parentNode.replaceChild(iDiv, iLink.item(i)); break; } } //--> </script> Thanks man if you can help. I'm in No hurry.
|
|
|
Post by Wormopolis on May 8, 2009 21:25:38 GMT -8
like that?
|
|
|
Post by pm on May 8, 2009 21:42:38 GMT -8
If you mean this page Hell Yes! Thank you!
|
|
|
Post by Wormopolis on May 8, 2009 23:57:03 GMT -8
did you get it from the source or do you need the line I added?
|
|
|
Post by pm on May 9, 2009 0:19:27 GMT -8
I need help. Thanks man! I tried from the source, did'nt attach. Removed by PM (link) Thank you! Need anything let me know!
|
|
|
Post by Wormopolis on May 9, 2009 0:51:36 GMT -8
well you wouldnt have been able to take the entire code from my source because I had to modify the code to only work in THIS thread.
basically, at the very end of the code, above the // -->, add this line:
iDiv.insertBefore(document.getElementsByTagName('table')[0],iDiv.firstChild);
|
|
|
Post by pm on May 9, 2009 1:14:12 GMT -8
You're close man. It adjoined but did'nt match in width.
I do want to say thanks again!
This is in FF by the way, I have'nt tried IE Yet! ;D
Thank you!
Edit: to say it may be where I edited ialex's code? I been out there for a few days forgive me.
|
|
|
Post by Wormopolis on May 9, 2009 1:54:06 GMT -8
do you have a resize running in the global header affecting the welcome table width?
PM me that link again since you removed it.
|
|
|
Post by pm on May 9, 2009 11:31:06 GMT -8
I don't have a resize code but have a lot of CSS up there.
PM sent (link).
Thanks man!
|
|
|
Post by Wormopolis on May 9, 2009 14:14:15 GMT -8
interesting..
above the line I added, add this one as well:
document.getElementsByTagName('table')[0].size="100%";
|
|
|
Post by pm on May 9, 2009 14:35:54 GMT -8
That line alone did not help so I tried this in global headers and it fixed it!
<script type="text/Javascript"> <!-- document.getElementsByTagName('table')[0].width = '100%'; //--> </script>
Thanks Worm!
|
|
|
Post by Wormopolis on May 9, 2009 16:34:44 GMT -8
yah.. Im a retard .. I MEANT .width instead of .size
apparently the headache is screwing with my cognitive abilities...
which might also be the reason I cant get deadend's link code to frickin work...
|
|
|
Post by pm on May 9, 2009 16:48:21 GMT -8
Hell, I did'nt even notice size in that line, I remember having the width code from another site. So I tried it. Bam! Sorry for you're headache. Drink a beer? You are not a retard by the way! Thanks for everything!! Edit: I tried the line with width instead of size and removed the width code. Works Great! ;D
|
|