Jump to content

The Praetorian

Members
  • Posts

    333
  • Joined

  • Last visited

Everything posted by The Praetorian

  1. I should start by saying that I know very little about JavaScript. I'm using a script to make div's expandable and collapseable, and it's working fine. I'm just trying to get the page I'm using it on to validate.Here's the script I'm using.. var enablepersist="on" //Enable saving state of content structure using session cookies? (on/off)var collapseprevious="no" //Collapse previously open content when opening present? (yes/no)var contractsymbol='- 'var expandsymbol='+ 'function getElementbyClass(rootobj, classname){var temparray=new Array()var inc=0var rootlength=rootobj.lengthfor (i=0; i<rootlength; i++){if (rootobj[i].className==classname)temparray[inc++]=rootobj[i]}return temparray}function sweeptoggle(ec){var thestate=(ec=="expand")? "block" : "none"var inc=0while (ccollect[inc]){ccollect[inc].style.display=thestateinc++}revivestatus()}function contractcontent(omit){var inc=0while (ccollect[inc]){if (ccollect[inc].id!=omit)ccollect[inc].style.display="none"inc++}}function expandcontent(curobj, cid){var spantags=curobj.getElementsByTagName("SPAN")var showstateobj=getElementbyClass(spantags, "showstate")if (ccollect.length>0){if (collapseprevious=="yes")contractcontent(cid)document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"if (showstateobj.length>0){ //if "showstate" span exists in headerif (collapseprevious=="no")showstateobj[0].innerHTML=(document.getElementById(cid).style.display=="block")? contractsymbol : expandsymbolelserevivestatus()}}}function revivecontent(){contractcontent("omitnothing")selectedItem=getselectedItem()selectedComponents=selectedItem.split("|")for (i=0; i<selectedComponents.length-1; i++)document.getElementById(selectedComponents[i]).style.display="block"}function revivestatus(){var inc=0while (statecollect[inc]){if (ccollect[inc].style.display=="block")statecollect[inc].innerHTML=contractsymbolelsestatecollect[inc].innerHTML=expandsymbolinc++}}function get_cookie(Name) { var search = Name + "="var returnvalue = "";if (document.cookie.length > 0) {offset = document.cookie.indexOf(search)if (offset != -1) { offset += search.lengthend = document.cookie.indexOf(";", offset);if (end == -1) end = document.cookie.length;returnvalue=unescape(document.cookie.substring(offset, end))}}return returnvalue;}function getselectedItem(){if (get_cookie(window.location.pathname) != ""){selectedItem=get_cookie(window.location.pathname)return selectedItem}elsereturn ""}function saveswitchstate(){var inc=0, selectedItem=""while (ccollect[inc]){if (ccollect[inc].style.display=="block")selectedItem+=ccollect[inc].id+"|"inc++}document.cookie=window.location.pathname+"="+selectedItem}function do_onload(){uniqueidn=window.location.pathname+"firsttimeload"var alltags=document.all? document.all : document.getElementsByTagName("*")ccollect=getElementbyClass(alltags, "switchcontent")statecollect=getElementbyClass(alltags, "showstate")if (enablepersist=="on" && ccollect.length>0){document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0" firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page loadif (!firsttimeload)revivecontent()}if (ccollect.length>0 && statecollect.length>0)revivestatus()}if (window.addEventListener)window.addEventListener("load", do_onload, false)else if (window.attachEvent)window.attachEvent("onload", do_onload)else if (document.getElementById)window.onload=do_onloadif (enablepersist=="on" && document.getElementById)window.onunload=saveswitchstate And here are the errors I'm getting from the xhtml validator.Errors
  2. My question is.. can search-engine crawlers still navigate my website if all my links are local? ( folder/filename.shtml rather than the full url. )
  3. You can't use styles in an img element. Put <center></center> around the block that you want to be centered.
  4. The image thing I know. I've got that set to the right width now. But my problem is that IE is ignoring the units of measure I'm giving it for my table widths. In css and in the table attributes. I've tried px, just numbers, and %'s, but it seems to ignore all of these..
  5. Okay... *Is about ready to beat IE to death*I'm trying to get the widths right, but IE is ignoring px. And %'s aren't working either... what measures does IE like?
  6. Well honestly I would rather not have to code for 600x800 at all, but I'm trying to get my site into a coding contest at a RPG database, and one of their requirements is that it be 600x800. So, you think it's my banner, then?
  7. I can't for the life of me figure out how to code tables to work for any resolution. Changing the % doesn't seem to do anything but mess up my design. Is this something that needs to be done in css? Or in the table attributes?WebsiteCSS
  8. 1024x768 has been the standard computer resolution for 6 years now. So.. why are we still being asked to go through all the pain of having to make sure our web sites are compatible with outdated resolutions? How many people even use anything smaller than the standard?Thus.. the poll...<<Edited the poll>>
  9. Well I was doing it the hard way originally, but since the other way didn't seem to change anything (until now) I didn't see the problem. But I'll go back to the other way, I guess.( And never mind about the font changes. Apparently I'd left a px off the end of my font size in my css. )
  10. Well, I guess I will then. On my original design I had the <p> tags, but the person that made the new template didn't use them and it still worked fine, and was one less thing that I had to do. So I didn't use them.
  11. Well, I'm going through and adding the doctype. I still don't understand why IE is ignoring the <br /> tag though... it reads the first one, obviously, but the second one it's ignoring.
  12. That didn't work. I already had a doc type for xhtml, I thought, but the one you gave me is longer, I see. Anyway, it didn't work, and on FF it changed the font of the page I added it to...
  13. Okay, here's a new one. Take a look at this page on IE. I'm not using <p> within those div's, so I need two br's. One to drop down, and one to make another line break. Except that I just noticed that IE seems to be ignoring the fact that I have two of them...Anyone had this problem? Anyone know if theres a way around it?
  14. "The Smack"... that's a new one. *Ponders adding that to his sig.* Glad I could help.
  15. I'll start by saying that I'm not sure how to fix this, but at least telling you what's happening will point you in the right direction. The page is shifting because on your index and other pages, you don't have enough content to fill the page, which makes the scroll bar disappear. On pages where there is a scroll bar, you get the shift as it pops out.On a side note, very lovely website.I take that back. I do know how to fix it. For firefox and IE least. (Doesn't work for Opera, but I don't know why.) Add this to your css. html { min-height: 100%; margin-bottom: 1px;}
  16. Thanks RahXephon. Funny enough, I figured that out just a few minutes ago. heh. So yea. Too many columns on my text-areas. That's what was pushing the menu in. Thanks for the help though guys.
  17. That's the thing, though. I've checked the code, and I cannot for the life of me see any differences. In fact, I pretty much copy/pasted the code to each page, since all the menu's are the same.
  18. My server does support SSI. I'm actually using it for my meta tags. Someone in the other thread said that shtml would work for the php include thing. Is that not true?
  19. I'm using FF.And wouldn't you know it... the problem doesn't appear in IE. Weird...
  20. Switch back and forth between the two pages, and pay attention to the width of the column where the menu links are. Between the first page and the second page, the width changes.
  21. Help please!Take a look at this page and compare it to this page. I can't for the life of me figure out why the menu column is smaller on the first one than it is on the second one. I've looked at the code, and except for the php I'm using for the form, everything is the same... so far as I can see anyway.Can anyone help me?
  22. Okay, thanks. Just a few questions about that though. It says the php method will work with pages that are .shtml. Would everything else be the same?IE..The menu file would be menu.php, and the include would be <?php include("menu.php"); ?> ?EDIT: Tried this, and it didn't work. Saved the menu file as a php, and used the php include in a .shtml file, but nothing happened.
  23. I may be asking this in the wrong section. Not sure if the whole <!-- INCLUDE --> thing is html or not. Anyway, I've been working alot lately with phpbb, for my forums, and alot of the pages are built by using <!-- INCLUDE --> to paste several pieces together into one page. Header, three or four different files for the middle, and footer.My question is... is that possible to do with html? Specifically on any of these pages. Would it be possible for me to put my menu into a separate file and use <!-- INCLUDE menu.html --> or something to that effect, to put the menu in without having to repeat the same text over and over on each page?If it is possible, how exactly would I do that?
  24. Yea, I fixed it. It was just a brain dead moment where I didn't see the very simple problem. heh. There were a couple nbsp;'s out of place.
×
×
  • Create New...