Jump to content

raimo

Members
  • Posts

    132
  • Joined

  • Last visited

Everything posted by raimo

  1. The reason is input is NOT valid child element of form in XHTML 1.1But input IS valid child element of div.Check valid child elements of form element:http://learningforlife.fsu.edu/webmaster/r.../forms/form.cfmNo input there.And then check valid child elements of div element:http://learningforlife.fsu.edu/webmaster/r...gs/text/div.cfmYes, there is input.
  2. To know how many checkboxes You have You shoud do something like:<form id="AlterarExcluirForm" action="#"><input type="checkbox" /><input type="checkbox" /><input type="checkbox" /></form><script type="text/javascript">var cnt = 0;var inp = document.getElementById("AlterarExcluirForm").elements; // all inputsfor (var i = 0; i < inp.length; i++) if (inp[i].getAttribute("type") == "checkbox") cnt++;alert(cnt); //there is 3 checkboxes now</script>
  3. Without knowing what sFrameName is in Your case, I think:var oDiv = top.sFrameName.document.getElementById('divXX'); but can't be sure without seeing more code. if sFrameName is parent window try: var oDiv = window.opener.document.getElementById('divXX'); Anyway, it must allways be document.getElementById
  4. raimo

    perl & cgi

    I don't like it that's the reason I'm not using it. By the way, Perl is very similar to C++, borned from it.PHP is borned from Perl actually http://fi2.php.net/historyPerl is part of Linux-OS so I can build programs with it, or what ever needed to www-pages. PHP has some good things, but Perl is filled with beuatiful stuff.
  5. You can view and edit the source with Firefox. install Web Developer extension.Push Options button of WD toolbar and select View source -> programs (notepad )can be added there.http://chrispederick.com/work/webdeveloper/
  6. raimo

    perl & cgi

    I'm using only Perl, not PHP at all .. don't like syntax of PHP, but Perl is beautiful and cool.
  7. There is STILL 2 head sections in Your page! Days are gone, and otherone is still there.If You wonder why it wont work as it should work You should first fix that thing, in my opinnion... If You include with PHP, don't include that other head part (or other harmful things), only part of text or code needed.1st. advice: if there is something seeing "wrong way" anytime with some browser check Your code is in good condition, now it is not.
  8. "The editor" is Tea http://tea.linux.kiev.ua/Tons of features, but still very fast and very lightweight. I think it's best evermade Linux HTML etc. editor.Try it: apt-get install tea
  9. MSIE is getting confused somehow with application/xhtml+xml and application/xml (if I remember correct?),but try text/xml, I think it should work better with MSIE and it can be used with XHTML 1.1Look what W3C says:http://www.w3.org/TR/xhtml-media-types/#summary
  10. thirdly, here is very simple but good script to do it var elms = document.getElementsByTagName('a'); for (var i = 0; i < elms.length; i++){ elms[i].target = elms[i].getAttribute('rel'); } Save code to external javascript file (name as target.js or something) and include that JS-file just before </body> tag. (after last a-element of Your document).Include tag:<script src="target.js" type="text/javascript"></script>modify Your links like:<a rel="_blank" href="http://www.google.ru">Google</a>and Your links will open in new window. (rel = target)
  11. raimo

    HTML

    If user agent is not changed to MSIE or "My Browser". You can change it whatever You want. :)With this extension it's easy to do: http://chrispederick.com/work/useragentswitcher/Anyway:if (navigator.userAgent.toLowerCase().indexOf('firefox') != -1) alert('Oh yes, FIREFOX!');
  12. I think it depends of what we need to get changed, only value of one text node or array of html tags.innerHTML is very good if there is many tags or should I say nodes. But if only need is change text value of one element DOM is not bad at all.innerHTML:document.getElementById('id').innerHTML = 'gerbils are not rats!'; DOM: document.getElementById('id').firstChild.nodeValue = 'me tarzan you jane?'; OK, with DOM firstChild must exists, innerHTML wrotes is there nodes inside of element or not,but that is not a big problem, I think.
  13. Look CSS max-width, min-width, max-height and min-height.I'd just tested those yesterday with Opera 9 (and Firefox 1.5.0.2) .. works fine with both.edit:<style type="text/css">#ifr1{width: 100%;height: 50%;max-width: 800px;min-width: 500px;min-height: 150px;}</style><iframe id="ifr1"></iframe> iframe is "scaling" to 100% only if width of it is between 500px and 800px.And height will stay in 50% until 150px height limit comes, that point it will stop scaling. Cool, I think? (but quessing here .. it won't work with MSIE?)
  14. Where You get that? Hex idtenfier MUST be there! It does not mean if it works with MSIE without that identifier, it can be throwed out of the code! Test it by pushing hereInvalid number : color c0c0c0 is not a color value : c0c0c0If HEX colors are used there MUST be always # -mark with value.
  15. raimo

    Open file dialog

    You can do it only by hide original file-input field and then create visible "fake input field" with text input and button or image.Look: http://www.quirksmode.org/dom/inputfile.html
  16. Your welcome! I think this will open Your eyes? I'd change spans to better tags.By the way in HTML we are using basicly "big quotes" in attributes, not those small ' 'updots' or whatever they are called in english..<div class="section_2"><!-- Sidebar --><div class="section_2a"><p class="sidebarlink"><a href="link.htm" class="sidebarlinkanchor">Clan Art</a></p><p class="sidebarlink"><a href="link.htm" class="sidebarlinkanchor">FrostbiteXIII Art</a></p><p class="sidebarlink"><a href="link.htm" class="sidebarlinkanchor">Barcodes</a></p><p class="sidebarlink"><a href="link.htm" class="sidebarlinkanchor">Super Yous</a></p><p class="sidebarlink"><a href="link.htm" class="sidebarlinkanchor">Lightning Sigs</a></p><p class="sidebarlink"><a href="link.htm" class="sidebarlinkanchor">Custom Art</a></p></div><!-- Main --><div class="section_2b"><h2>Main Section</h2><p>This is the main section</p></div></div> Set section_2a width to needed menu width in CSSin CSS file:line 23vertical-align: center;vertical align can't be center, but it can be middle. look: http://www.w3.org/TR/REC-CSS2/visudet.html...-vertical-alignedit:RahXephon IS still faster than I!
  17. Very strange, but 8.52 is quite old (February 17, 2006).You can install any count of Operas (different versions), just install each to own directory. I mean if You need to test is it fixed in newer Opera.Here is a shot how Opera 9 is seeing Your page:http://raimo.atspace.org/rahxephon.htmlAll looks good, I think?Different Opera versions can be found:http://snapshot.opera.com/windows/edit:aaarggh! fixed link
  18. 1st one is begin of the document, and the 2nd is inside of nav div: <div class="content"> <div class="nav"> <!DOCTYPE htmlPUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title>Navigation Menu</title><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><meta name="description" content="" /><meta name="author" content="Mike Saylor" /><!-- Last updated 4/10/2006 --></head><body> <div id="menu"> <ul> <li><h2>Home</h2> edit: I can't test it with IE I'm living in Linux, I have no IE at all, luckily. :)But for(i = 0; i < p; i++){ should be: for(var i = 0; i < p; i++){No other JS errors found. But I think, the 2nd head part can get IE a bit confused.
  19. raimo

    Help on coding

    You just added style block to the head part of Your document.Now, add to that block more classes:.red{color: red;background-color: inherit;}.blue{color: #0000FF;background-color: inherit;}.bold{font-weight: bold;} And then in body part, where ever You need color (or other style):Some text <span class="red">this is red</span><span class="blue>this is blue</span> and again, original colorized text. <span class="bold">this is bold</span>Can be used with all tags.Look more:http://www.w3schools.com/css/
  20. raimo

    CSS Validator

    It will say: No error or warning foundIt means it is validated.If there is warnings it will list them.I'd check Your code and there is no errors or warnings, so it is very validated now! :)Copypaste code there:http://jigsaw.w3.org/css-validator/#validate-by-input(Validate by direct input) and You can see it Yourself.
  21. Sorry! :)I think setTimeout is just OK now, but move it inside of Your function,and call function straight with onmouseover.
  22. raimo

    Help on coding

    They are calling different kind of functions. thats the difference, I think.Lets do the same as they have done, but we do it better, faster and cleaner! Add this to head part of Your document:<script type="text/javascript"><!--function showLayer(e, obj){var x = (e.clientX) ? e.clientX : window.event.clientX;var y = (e.clientY) ? e.clientY : window.event.clientY;var elm = document.getElementById(obj);elm.style.left = x + 10 + 'px';elm.style.top = y + 'px';elm.style.display = 'block';}function hideLayer(obj){var elm = document.getElementById(obj);elm.style.display = 'none';}//--></script><style type="text/css"><!--.hidden{position: absolute;width: 250px;display: none;border: solid 2px #FF6060;background-color: #600000;color: #F0D0D0;}--></style> And this to the body part: <div id="layer1" class="hidden">This is the first hidden div.<br />Add something nice here.</div><div id="layer2" class="hidden">This is the second on</div><p onmouseover="showLayer(event, 'layer1')" onmouseout="hideLayer('layer1')">Move mouse here</p><p onmouseover="showLayer(event, 'layer2')" onmouseout="hideLayer('layer2')">Move mouse here</p> So we have 2 hidden divs (display none) and when mouse is lurking over p tag display attribute is changed to block and selected div appears to visible. When the mouse goes out of p-tag, display will be setted as none again. Mouse position is looked from event and div is moved near mouse before showing. Try that, and please feel free ask more if needed.
  23. float: left;to Your CSS file or CSS block in head part: .left{float: left;}.right{float: right;} and body: <div class="searchbox"><div class="left">By Productsearch <select name="Searchbyproduct" onchange="MM_jumpMenu('parent', this, 0)"> <option>Router</option> <option>Server</option> <option>Switch</option> <option>Network</option> <option>Backups</option> </select></div><div class="right"> <select name="Bymanuf" onchange="MM_jumpMenu('parent', this, 0)"> <option>HP</option> <option>Cisco</option> <option>Brocade</option> <option>Sun</option> <option>More...</option> </select></div></div> You can remove those forms if You are not sending with them.
  24. should be this.event not this,eventchange , to .
  25. raimo

    CSS Validator

    use:background-color: inherit;.. now background color is inherited from parent element
×
×
  • Create New...