Jump to content

brucemand

Members
  • Content Count

    235
  • Joined

  • Last visited

Community Reputation

1 Neutral

About brucemand

  • Rank
    Member

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Location
    Cyberia
  • Interests
    maintaining a sustainable personal intake of oxygen

Previous Fields

  • Languages
    BASIC(!!), HTML, aSmatteringOfCSS, aSmudgeOfJS, aPinchOfPHP
  1. brucemand

    Can't figure out the table definition by XML DOM

    nobody has any tips how i should approach this ??
  2. brucemand

    Why is this NULL?

    i think this ; is the problem;
  3. brucemand

    change color

    i was about to say this thread is similar;http://w3schools.invisionzone.com/index.php?showtopic=38992and then realised it's the same TS !!but now i've said it anyway...
  4. brucemand

    Twitter widget problems

    i believe that difference is the problem
  5. brucemand

    Trying to use XMLHttpRequest() but not doing it right

    aren't technological advances such a beauty ?!
  6. brucemand

    Trying to use XMLHttpRequest() but not doing it right

    ahh, i see now, didn't notice it before.see, what a simple myVal would've done for clarity ?? :)and yes, "Man" ??the guy is a GOD to me !!
  7. brucemand

    jQuery fade in and out

    well yes, it's also for my own JS ability in being able to solve a third-party situation.i did disclose i was a beginner which should indicate "buyer beware" i'm not up to jQuery yet, so i can only assume that jQuery is basically JS and follows the same basic rules.that sounds interesting though. (i suppose the event handlers are all in the jQuery.js file ?)
  8. brucemand

    Book about PHP

    yes, good point - i wouldn't call them "bad" though, just outdated and inefficient relative to what the new language makes available.
  9. brucemand

    Write to a database instantly

    Create an ArrayAn array can be defined in three ways.The following code creates an Array object called myCars:1:var myCars=new Array(); // regular array (add an optional integermyCars[0]="Saab"; // argument to control array's size)myCars[1]="Volvo";myCars[2]="BMW";2:var myCars=new Array("Saab","Volvo","BMW"); // condensed array3:var myCars=["Saab","Volvo","BMW"]; // literal array
  10. brucemand

    jQuery fade in and out

    hmm... let a beginner have a crack at this...<div id="one" onmouseover="do_fade_in('one')" >menu link</div><div id="two" onmouseover="do_fade_in('two')" >menu link</div>
  11. brucemand

    Trying to use XMLHttpRequest() but not doing it right

    yes, that's better, i wasn't sure "redundant" was the right word to use. it was to find out why TheScientist didn't use POST much with XMLHttpRequest().i probably should have said using POST with XMLHttpRequest() non-asynchronously is redundant.i haven't tested it but i imagine having the <form> and <input type="submit"> in an iframe would also save the whole page from reloading ? thanks for that tip - WHAT A NIFTY in-house function !! :)saves me from making input-checks with RegExp ! is that necessarily a bad thing ?
  12. brucemand

    Trying to use XMLHttpRequest() but not doing it right

    okay, thanks ! thanks for the link.i suppose once we're dealing with server-side, PHP probably does whatever one could imagine, and AJAX would be sort of redundant ?
  13. brucemand

    initiating javascripts

    no of course not, but that's when you bring in onclick to the <a href>onmouseover/onblur/onfocus are usually "styling" events, no ?
  14. i can't seem to figure out how to display the XML file into HTML the right way.here's the XML itself; <wholelist><item> A <title>Alpha <subtit>Dog <rank>1 </rank> <pict>A1.png </pict> </subtit> <subtit>Male <rank>2 </rank> <pict>A2.png </pict> </subtit> </title> <comment>Lorem ipsum blah blah blah. </comment></item><item> B <title>Beta <subtit>Karotene <rank>1 </rank> <pict>B1.png </pict> </subtit> <subtit>Blocker <rank>2 </rank> <pict>B2.png </pict> </subtit> </title> <comment>Lorem ipsum blah blah blah. </comment></item><item> C <title>Charlie <subtit>Angel <rank>1 </rank> <pict>C1.png </pict> </subtit> <subtit>Brown <rank>2 </rank> <pict>C2.png </pict> </subtit> <subtit>Bigtime <rank>3 </rank> <pict>C3.png </pict> </subtit> </title> <comment>Lorem ipsum blah blah blah. </comment></item><item> # <title> () <subtit> * <rank>1 </rank> <pict>1.png </pict> </subtit> <subtit> ** <rank>2 </rank> <pict>2.png </pict> </subtit> <subtit> *** <rank>3 </rank> <pict>3.png </pict> </subtit> </title> <comment>awaiting new items for the lorem ipsum and the blah-blah... </comment></item></wholelist> and the script to read that file is; <html><body><script type="text/javascript"> if (window.XMLHttpRequest) // code for IE7+, Firefox, Chrome, Opera, Safari { xmlhttp=new XMLHttpRequest(); } else // code for IE6, IE5 { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","file.xml",false); xmlhttp.send(); xmlDoc=xmlhttp.responseXML; // *this* is the "soup' document.write("<table border='1'>");var x=xmlDoc.getElementsByTagName("item");for (i=0;i<x.length;i++) { var y=x[i].getElementsByTagName("subtit"); document.write("<tr><td width='100' rowspan='"+y.length+"'>"); // thisOK-DON'Tchg! document.write("<b>"+x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue+"</b></td>"); document.write("<td style='background-color:yellow'>"); // only the FIRST subtit for (j=0;j<y.length;j++) { var z1=y[j].getElementsByTagName("rank"); document.write(+z1[0].childNodes[0].nodeValue+") "); var subtit=y[j].childNodes[0].nodeValue; var z2=y[j].getElementsByTagName("pict"); document.write("<img width='100' src="+z2[0].childNodes[0].nodeValue+"'>"); document.write("</td></tr><tr><td>"); // this is the subtit, has to be new row } document.write("</td><td rowspan='"+y.length+"'>"); document.write(x[i].getElementsByTagName("comment")[0].childNodes[0].nodeValue); document.write("</td></tr>"); }document.write("</table>");</script></body></html> as it stands the <comment> gets pushed into the following <title>, whereas i want it to be on the same row as the previous <title>it should look like; can anybody give tips on how this should be tackled, it's a bit messy but am doing this from scratch and probably not in an efficient way.
  15. brucemand

    Book about PHP

    the best "book" is The Manual at php.net - but any other book can't be bad if you're away from a computer/or internet connection and need to refresh yourself on the basics.plus, if it's not too heavy you can use it to swat the flies as you sit reading it on the toilet....
×