Jump to content

Kosher Kid

  • Posts

  • Joined

  • Last visited

Everything posted by Kosher Kid

  1. very cool, scott...i must say you are very generous with your time and with you willingness to create and share code.but, i have a question...i noticed that your game array had two values per index...does that make it a 2-dimensional array?how is your code: game[val][0] working?or this code: onChange='get_selected(this.value,2)?could you pick the 2nd element of a given index value without picking the first?i'm somewhat familiar with mutiple-dimension arrays from other programming experience but have never heard of them for javascript, that's why i'm asking.
  2. yes, you do have a point... a very valid point... i'll just put on my dunce cap and go sit quietly in the corner... please don't fail me, prof...a D will be a sufficient lesson...
  3. well, duh...width is deprecated and i should have used style instead. this code is xhtml 1.0 strict: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title>Table Test</title></head><body><table border="1"><tr> <td style="width:48"></td> <td style="width:48"></td> <td style="width:48"></td> <td style="width:48"></td> <td style="width:48"></td></tr><tr> <td colspan="2">a</td> <td colspan="2">b</td> <td>c</td></tr><tr> <td>d</td> <td colspan="3">e</td> <td>f</td></tr></table></body></html>
  4. i noticed a few omisions in my code, cleaned it up and ran it through the xhtml validator. it didn't complain about the blank rows. the only error it cited was the use of the width attribute.however, i didn't see anything in the xhtml tutorial that would indicated that was illegal.here's the html i validated: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title>Table Test</title></head><body><table border="1"><tr> <td width="48"></td> <td width="48"></td> <td width="48"></td> <td width="48"></td> <td width="48"></td></tr><tr> <td colspan="2">a</td> <td colspan="2">b</td> <td>c</td></tr><tr> <td>d</td> <td colspan="3">e</td> <td>f</td></tr></table></body></html> here's the reply i got:Result: Failed validation, 1 errorFile: upload://Form SubmissionEncoding: utf-8Doctype: XHTML 1.0 StrictRoot Namespace: http://www.w3.org/1999/xhtmlNote: The Validator XML support has some limitations.This page is not Valid XHTML 1.0 Strict!Below are the results of checking this document for XML well-formedness and validity. 1. Error Line 9 column 13: there is no attribute "width". <td width="48"></td>can anyone explain the problem?
  5. consider it as a problem of proportions...create a blank top row of appropriate portions and then span as needed...i think this is roughly the shape you were looking for: <html><head><title>Table Test</title></head><body><table border="1"><tr><td width="48"></td><td width="48"></td><td width="48"></td><td width="48"></td><td width="48"></td><tr><td colspan="2">a</td><td colspan="2">b</td><td>c</td></tr><tr><td>d</td><td colspan="3">e</td><td>f</td></td></table></body></html> maybe yes/maybe no???
  6. scott,i've been following the thread...it's interesting.could you please post your solution?thanks in advance.
  7. as a minor correction to justsomeguy's post...the effects of the various settings are only cumulative in nested divs...for example:<div></div><div><div/>will not have a cumulative effect.but:<div> <div></div><div>will.also, you may want to avoid specifying pixels for large containers as you do not know the screen resolution of those who will be visiting your site. probably better to use % in most cases unless it will be small enough to not create a problem regardless of the screen resolution of a visitor.
  8. to justsomeguy: while i know there are many viruses which can capture key strokes, i am not aware of any malware which can read a document opened in an application such as word. am i underinformed?to numbertwo: my solution to the vast number of passwords problem is to minimize the number of unique passwords i have to deal with. i have two that i use on the vast majority of sites and those that vary are because of the individual site's requirement. therefore, i rarely need to refer to my file...it's only for the rarely visited sites that have special password requirements.and, yes, i have heard the of the dangers of using the same password over and over, but the two that i have chosen are very obscure and would be virtually impossible for anyone to guess. they have a meaning for me but would be meaningless for anybody else.
  9. One thing to consider: You had better be sure your computer is completely secure both inside and out or you could be yielding some very damaging information to various parties...someone using your computer could accidentally stumble across a password and later use it for their own purposes...or, if there is a rootkit or other virus sitting on your system, it may be able to read information displayed to you unencoded.be very very careful is my suggestion.btw: i have a word document that i use as a reference if i can't remember a given password. probably takes all of 10 seconds.
  10. Kosher Kid

    perl & cgi

    i've been away from web stuff for a while an am just coming back...am not seeing anything that deals with perl and/or cgi.are these still useful? have php and like fully supplanted?what's the buzz, cuz?
  11. you just call the functions as you require them...they can be done on page load within the body tag as you sawthey can be an onclick event:<a onClick="OpenPopup('hours_shift_example.htm')" href="#">Example</a>they can be called by other user action such as mouseover, etc.explore the javascript tutorial.
  12. oops...sorry, had a brain hiccup on my reply.here's what your files should look like:test.htm <html><head><script type=text/javascript src="test.js"></script></head><body onload="javascript:display()"></body><html> and here's test.js: function display(){document.write("this is a test");}
  13. Your post is a little confusing.Do you have separate html and js files or is the js contained in the html file?If the former is the case and you want the function to load when the page does, then put this in your head section:<script type=text/javascript src="test.js">display()</script>
  14. what do you mean by cooler stuff?
  15. Kosher Kid

    Ordered Lists...

    i've been following the discussion thread because I've been trying to do the same thing myself.the code johneva posted worked fine for me in firefox but when i opened the page in i.e, the list displayed inline but the numbers weren't there. it's i.e. 6 bty.is there something i'm missing?
  16. boen:bingo...it works in ie6 but it won't in firefox because it doesn't support data islands.and you are absolutely right about good coding practices.if there were an icon for it, i'd give you a gold star!
  17. jonas is kerrect...the css validator did complain about the lack of a hex identifier.i guess this should be a warning to be careful if you specify css styles within an html page or inline within an element. if you don't use the hex your colors will not be blest.coder beware!
  18. as a follow up, i was using span and color in a different way. interestingly enough, i validated the following code on w3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><title>Title</title></head><body><h1>test <span style="color:00ff00">test this phrase</span> head</h1></body></html> and it passed just fine. however, it did not display properly in either firefox or i.e. once the hex identifier was added, it displayed as expected.interesting.
  19. for me, it works with both ie and firefox so i just straightlined it from there. if it's required for other browers, then it is. my bad, i guess. thanks for the correction.
  20. 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.
  21. even with the fix, the code doesn't work in ie. i've checked the microsoft msdn and the code appears to be right but it just won't display the data in the table rows.any clues?
  22. it's been a slow day so i've been fooling around with the code.fixed the various quote problems and == problems and added a line to write the results to the output box.see what you think. <html><head><title>XML Builder</title><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" /><style type="text/css">body {background-color : #eeeeee;color : #002f88;font-family : verdana, sans-serif;font-size : 12px;}a {background-color : #eeeeee;color : #0000ff;}a:visited {background-color : #eeeeee;color : #0000ff;}a:hover {color : #000000;background-color : #ddddff;}h1 {font-size : 30px;text-align : center;font-weight : 900;}h2 {font-size : 25px;text-align : center;font-weight : 700;}h3 {font-size : 22px;font-weight : 600;}h4 {font-size : 20px;font-weight : 300;}h5 {font-size : 17px;font-weight : 200;}h6 {font-size : 16px;font-weight : 150;}ul.nomarkers {list-style-type : none;} img {border : 0;}th{background-color:#404040;color:#00FF00}</style><script src="onerror.js" type="text/javascript"></script><script type="text/javascript"><!--function errorMessage(doesExist, caption){this.doesExist = doesExist;this.caption = caption;}function doXml(){// get valuesvar element = document.XmlForm.element.value;var attr1 = document.XmlForm.attr1.value;var attr2 = document.XmlForm.attr2.value;var attr3 = document.XmlForm.attr3.value;var attr4 = document.XmlForm.attr4.value;var attr5 = document.XmlForm.attr5.value;var value1 = document.XmlForm.value1.value;var value2 = document.XmlForm.value2.value;var value3 = document.XmlForm.value3.value;var value4 = document.XmlForm.value4.value;var value5 = document.XmlForm.value5.value;var inner = document.XmlForm.inner.value;// validate elementif(element == ""){ errorMessage.doesExist = 1 errorMessage.caption = "Your Xml element is not correct: \nYou have no element name!"}else if(element == "xml" || element == "XML" || element == "xMl" || element == "XMl" || element == "xmL" || element == "Xml" || element == "xMl" || element == "xML" || element == "XmL") // phew pretty long eh?{ errorMessage.doesExist = 1 errorMessage.caption = "Your Xml element is not correct: \nYou shall not use \"" + element + "\" in your element name"}if(errorMessage.doesExist == 1){ alert(errorMessage.caption);}var attrnbr = new Array();// let the comparation beginif(attr1 != ""){ attrnbr[1] = "true"}else{ attrnbr[1] = "false"}if(attr2 != ""){ attrnbr[2] = "true"}else{ attrnbr[2] = "false"}if(attr3 != ""){ attrnbr[3] = "true"}else{ attrnbr[3] = "false"}if(attr4 != ""){ attrnbr[4] = "true"}else{ attrnbr[4] = "false"}if(attr5 != ""){ attrnbr[5] = "true"}else{ attrnbr[5] = "false"}var str;str = "<" + elementif(attrnbr[1] == "true"){ str = str + " " str = str + attr1 + '="' str = str + value1 + '\"'}if(attrnbr[2] == "true"){ str = str + " " + attr2 + '=\"' + value2 + '\"'}if(attrnbr[3] == "true"){ str = str + " " + attr3 + '=\"' + value3 + '\"'}if(attrnbr[4] == "true"){ str = str + " " + attr4 + '=\"' + value4 + '\"'}if(attrnbr[5] == "true"){ str = str + " " + attr5 + '=\"' + value5 + '\"'}str = str + "></" + element + ">"document.XmlForm.output.value=str}// --></script></head><body><h1>XML Builder</h1><form name="XmlForm"><table border="1" ><tr><th colspan="4"><p>Please fill in the form</p></th></tr><tr><td><input type="text" name="element" /></td><td colspan="3"><p>Element</p></td></tr><tr><td><input type="text" name="attr1" /></td><td><p>Attribute 1</p></td><td><input type="text" name="value1" /></td><td><p>Value 1</p></td></tr></tr><tr><td><input type="text" name="attr2" /></td><td><p>Attribute 2</p></td><td><input type="text" name="value2" /></td><td><p>Value 2</p></td></tr></tr><tr><td><input type="text" name="attr3" /></td><td><p>Attribute 3</p></td><td><input type="text" name="value3" /></td><td><p>Value 3</p></td></tr></tr><tr><td><input type="text" name="attr4" /></td><td><p>Attribute 4</p></td><td><input type="text" name="value4" /></td><td><p>Value 4</p></td></tr></tr><tr><td><input type="text" name="attr5" /></td><td><p>Attribute 5</p></td><td><input type="text" name="value5" /></td><td><p>Value 5</p></td></tr><tr><td><input type="text" name="inner" /></td><td colspan="2"><p>InnerHtml</p></td><td><input type="button" onclick="doXml()" value="Submit" /></td></tr><tr><td colspan="4"><input type="text" name="output" size="70" /></td></tr></table></form></body></html>
  23. you are missing closing brackets. function allcheck() { if (document.getElementById('capture1').checked) { document.getElementById('capture').value = 450 } if (document.getElementById('capture2').checked) { document.getElementById('capture').value = 730 }}function couplingcheck() { if (document.getElementById('couplingcheckbox').checked) { document.getElementById('couplingtotal').value = 200 document.getElementById('stops1').disabled = false }} and i'm not sure why you put the commas after the last statements. i don't believe they are necessary and ie objected to having a comma after the last statement.also, i'm not sure what you are looking for with only one radio button. but whatever value i entered in the stops total box, i got 200 in the total box when i checked the "check for coupling" box.what are you looking for?
  24. sorry to reply to my own reply but here's the behavior i'm getting in both firefox and ie:when i copied scott's original code, right click on the logo still worked.when i added the oncontext menu to the body tag, the right click did not work.when i added the last piece of code to disable the context menu but enable right click on the image, right click still did not work in firefox and produced a "right click is not permitted" message in ie.i guess i'm confused. btw, it's firefox and ie 6.0 w/sp1
  • Create New...