-
Posts
132 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by raimo
-
-
To know how many checkboxes You have You shoud do something like:To know how many checkbox there are in my array of checkbox, I use :var c = document.AlterarExcluirForm.checkbox;var tam = c.length;But, my array is dynamic, and when I have just one checkbox in the array, the command c.length doesn´t works.How can I resolve that ?Thanks.<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>
-
Without knowing what sFrameName is in Your case, I think:GreetingsI've been fussing and researching this all night. What is the syntax for including a variable (sFrameName) in the following:var oDiv = top.+sFrameName+.getElementById('divXX');
Thanks
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
-
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.What's wrong with php syntax? I find it very similar to JavaScript and c++ so it came naturally. -
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/
-
I'm using only Perl, not PHP at all .. don't like syntax of PHP, but Perl is beautiful and cool.
-
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.I have a CSS menu that uses background images instead of just colors. In FF it works just fine, but in IE there is a hesitation once the mouse rolls over the link. And when you are navigating the sub menus, the parent menu image changes every time you roll over a sub menu link. Is there a way around this problem in IE? Here's a link to the site so you can see what I mean. -
"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
-
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/#summaryBut that only applies if you don't send 1.1 as text/html but as xml/application or something. -
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)
-
HTML
in HTML/XHTML
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:not sure why but if you look closer at the user agent property it clearly states it is FireFoxif (navigator.userAgent.toLowerCase().indexOf('firefox') != -1) alert('Oh yes, FIREFOX!');
-
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:It's not part of the W3C DOM, but i'd say it's the best supported and yes the most preferred way of text change.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.
-
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:I'm not sure if I'm completely understanding you however when you are setting percentages you can't also specify a pixel amount. You would position it and then set the height to something like 75% and it would resize the height when you changed the height of the page, but you can't ever make it look exactly how you want because the size will be unique based off of how big each person sets their browser window. If you want them to enter your site and have it look a certain way you can change the size of their browser window and then they can resize it if they want and the percentages will take over.<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?)
-
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.you don't need to use the hex identifier (#) in making your statement:<span style="color:c0c0c0"><p>test</p></span>will get you where you want to go. -
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.htmlI'm currently working with forms and want to add a 'browse' button to upload a file from your (local) harddisk. I've used the <input type=file> option but that way I can't change the caption on the button. The thing I want to do is create a custom 'browse' button from which I can edit the caption and after clicking opens a similar dialog to the one from <input type=file>. How can I do this? -
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..Thanks in advance,Frosty.<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!
-
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 linkwell, I guess it's cause I'm using a older version of opera.Version: 8.52 Build: 7721 Platform: Win32 System: Windows XPI know it's not a padding or margin problem, I just can't get the right cell tovertically align to the top.I already tried that. Infact, that's is the way I have it right now... but it's still not working.This is how I see things in Opera (just a piece of the page), the Contents on the rightsite are suppose to be aligned to the top:http://i7.photobucket.com/albums/y268/HYPNOTOAD000/img13.jpg -
1st one is begin of the document, and the 2nd is inside of nav div:I only see one head section, can you point it out to me?The problem in IE is the delay on mouseover and mouseout. There doesn't seem to be this problem in FF.<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.
-
You just added style block to the head part of Your document.Now, add to that block more classes:ok, heres my next question, how do I change the color of the text in the box that comes up? I need to be able to keep the middle text white, but change parts of it to multiple other colors. What do I need to do to change that?Thanks.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/
-
CSS Validator
in CSS
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.I don't get any errors, but it doesn't say my css is validated. -
Sorry! :)I think setTimeout is just OK now, but move it inside of Your function,and call function straight with onmouseover.no, the function receives 3 parameters: 1) this 2) event 3) the menu nameas i said, it works when outside the setTimeout procedure.and just to make sure i tested your suggestion, didn't work -
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:Can someone please explain to me whats different? what it means? and how can I use similar coding to get the same "popup" effect?thanks so much<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.
-
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.
-
should be this.event not this,eventchange , to .
-
CSS Validator
in CSS
use:background-color: inherit;.. now background color is inherited from parent elementAnd the css validator doesn't recognise "transparent" as a background-color.
XHTML will not validate
in HTML/XHTML
Posted