Jump to content

midnite

Members
  • Content Count

    179
  • Joined

  • Last visited

Everything posted by midnite

  1. can i access the DOM tree (or raw html) in a frame (not iframe)? i mean i just want to get information from the remote sites, not changing (not it's nothing different, i guess)
  2. Hi there,is it that what u want is only get your site displayed fullscreen? i did work on this topic too. but it was quite a long time ago and i cannot remember how it worked now. but my in memory, there is a way. not necessary to bother with popups. using js onload to set it fullscreen or something similar. i will dig into my old files and find the way out after my current project has finished. or someone may have solved your problem beforehand =)enjoy =)
  3. ?? <span id="mySpan">give me 5 XDD</span><script>document.getElementById("mySpan").onmouseover = five(5);function five2(num) { alert(num);}function five(num) { return five2(num);}</script> ?? <span id="mySpan">give me 5 XDD</span><script>document.getElementById("mySpan").onmouseover = five(5);function five(num) { return five;}</script> ??both my scripts do not work...do you have any ideas?thanks =)
  4. haha, my friend. i am not saying which method is good and which it bad. all codes that work are good codes =)
  5. oh, COOL!!!i m idiot that i have never think about this ><
  6. thanks Ingolme. yes, i did try this. but if JS really need us to do this, it is too stupid and it violated my original intention - shorten and keep the code neat.but i tried valid = valid && true; it still remains as a Number (by typeof) ... so i compromised. i used valid = valid && ...it does not work even if i valid = new Boolean(valid); sigh.... (an Object is true to the form onsubmit too)i think JS do well with this, just the HTML form accept only "false" and regard any other stuffs as true.
  7. using "false" can trap the form of course. what are you talking about?use <form onsubmit="return validate();" ...> ?it is because i would like to separate JS from HTML totally =)why i have such a problem of 0 (zero)?because i have different checking functions in validate()for instant:function validate() { var valid = true; valid &= checkName(); valid &= checkPhone(); valid &= checkOtherThingsElse(); return valud;} i know using &= is not so proper as it means valid = valid & ... (a bitwise one)but it makes the code shorter.and it means sense to use a bitwise &a
  8. at the topic says, i was just bothered for hours on debugging this stuff!! i bet no other stuff can be more weird than this!!i put here for a caution or reminder for those who are working on form validations.i dont want anyone spending their life on this foolish stuff again.i use clear HTML (no inline JS) andwindow.onload = function (){ document.getElementById("youFormId").onsubmit = validate; };to add the event handlerto be easy, u may trywindow.onload = function (){ document.getElementById("youFormId").onsubmit = function() { return 0; }; };the form WILL SUBMIT regardless your ZERO!!!i belie
  9. that's cool!But, i dont get it with useCapture. Can anyone give me some examples?
  10. consider <span id="mySpan" onmouseover="changeBg(this)">change me =P</span><script>function changeBg(obj){ obj.style.backgroundColor = "#FF0000";}</script> if i want to separate JS from HTML totally, i can do something like the following: <span id="mySpan">change me =P</span><script>document.getElementById("mySpan").onmouseover = changeBg;function changeBg(){ this.style.backgroundColor = "#FF0000";}</script> when i want to pass some parameters into the function i can write in this way: <span id="mySpan" onmouseover="five(5)">give me
  11. why your page, without the <link rel="shortcut icon" href="/favicon.ico" /> stuff, can also display a favicon? so strange??
  12. midnite

    W3C

    oh... i tried. it rocks amazingly!!!what is your case? can you give more details that how it failed?
  13. midnite

    W3C

    http://www.w3.org/People/Raggett/tidy/i know now. But in fact, before "cleaning", those are invalid XHTML, right? So, is it the case that the W3C validator will automatically correct your errors, and mark your "cleaned" page valid?
  14. midnite

    W3C

    in fact, what is the different between before and after cleaning? That is, what it has cleaned?
  15. this would be cool enough.i do understand that opening a new window is annoying and can make people lost sometime. But what i was (originally) talking about is1. for pop up tips2. for external linksi still think that pop up tips is best to be opened in new windows. They should be smaller than a normal window, such that users can have a clear picture that it is a pop up, and the main content is just beneath. it will be even better if i add a "Close Tips" button in it.For external links, i may compromise. Because a site is opening, no matter in terms of weight, or the size of the window, would b
  16. if the server is set up properly, they will send a head consist of eTag for every resources, html, php, images are no exceptions. The eTag is determined by the iNode, size of your file, and the last modified time. When ever the eTag has been changed, it will download again. No, otherwise. So you probably need not the worry about this if you have found a properly (normal) host
  17. Yes, you have your point. But i see the other way round.For some sites, those links are supposed to open in another browser, or pop up, but they open in the same browser that makes me inconvenient. For example, the Google search. Most likely not every result matches exactly what i want. Or my research needs to combine several website results. So i need to "Ctrl+click" to open them in new browsers/tags. Otherwise, i will keep on going to-and-fro which makes me dizzy. It is still fine with Google because i am used to it and i know i have to keep my finger on the Ctrl button. What if i encounter
  18. cool!! longed for CSS3!!! is it that i still cannot use it now? * but i bet, although CSS3 is damn cool, but not support in old browsers (where most people are using IE6/7 these days) will also no help :)why on* are going to be deprecated? so, how can we capture mouse/keyboard events??
  19. excuse me, u mean rel or window.open() is deprecated?i think, using javascript for target="_blank" is quite handy. Although just target="_blank" is much shorter than onclick="return !window.open(this.href)", it is still acceptable. But here comes the headache is, it works only if the client's browser get JS enabled. But i bet there is no way to open things in a new window without target="_blank" _and_ JavaScript. Of course, if anyone can suggest one, it will be great!!
  20. try <body onload="func();">i think searching for links with rel="external" in DOM tree is a bit over to achieve just a pop up/open in a new browser. Is there any benefit that make us to write so many codes instead of just window.open()?
  21. in fact, i would like to ask why XHTML 1.1 ban target?
  22. is it because the problem that IE runs window.onload = externallinks; before everything is really loaded, especially the DOM tree?
  23. XHTML 1.1 does not allow the <a> tag to have "target" attribute. So how can we open something in a new browser?http://validator.w3.org/
  24. i have installed Gobby. How can i "join" u or u "join" me ??Why MS VPC will help, for my problem?
×
×
  • Create New...