![]() | |
![]() |
| | Thread Tools | Display Modes |
#41
| |||
| |||
|
#42
| ||||||
| ||||||
|
|
On Aug 31, 4:07 am, Randy Webb <HikksNotAtH... (AT) aol (DOT) com> wrote: How do you debug code that doesn't exist anymore? There are more reasons to leave it than there are to remove it. It is a choice. I choose to leave mine. my debugger works fine and DOM is not persintently incremented Say again? How is me putting script blocks inside a sole div element obtrusive for every other script? just think about document.getElementsByTagName("script") ... and just think about DOM incrementation |
|
The only possible problem that could *ever* be caused by it is if a div element happened to be duplicated in which case the script (mine) could be modified to create it's own div element to use. there are more problems than one ... but leave your personal DIV there if You feel lucky. Use this practice at your own risk if You use third party libraries. |
|
What is foolproof on a PC is to set the .text property of a script element. Trying to do that on other OS'es is a recipe for disaster. disaster ... LOL!!! |
|
But it does *not* work in 7 mac browsers (and that is only the ones I know about). as I've said, I don't have Mac and I don't care, usually, on browser used by 0.01% of net surfers. |
|
However, thank You for your link, it seems that my basic proposal, that I've never called perfect but I called them *proposal*, need just a simple try catch or to be wrote differenlty for iCab and others using TextNode, really simple, isn't it? |
|
Well done, I'll update my code ... so, at this point, totally amount of 2 hours against 7 years? :P |
#43
| |||
| |||
|
|
Ok Randy, You have a credit inside my code update. |
|
Last line, that doesn't require above clear function and it should be cross-browser enough to forget this problem, could You confirm it? http://www.devpro.it/code/163.html |
|
Sorry for my self-packing obsession, however if someone is interested about source, just indent (beautyfing) them, it should be quite clear to read / understand :-) |
#44
| |||
| |||
|
|
On Aug 31, 1:51 am, andrea.giammar... (AT) gmail (DOT) com wrote: Ok Randy, You have a credit inside my code update. I'm curious if he wants credit in your code. |
|
In addition to the brittle dependence on navigator.userAgent, I see at least two superficial bugs. |

#45
| |||||
| |||||
|
|
On Aug 31, 4:16 pm, Peter Michaux <petermich... (AT) gmail (DOT) com> wrote: I'm curious if he wants credit in your code. Since He spent much more time than me to try to solve this problem, I add his credits in my code. If He doesn't want its credits, I'll remove instantly ... He should just tell me ... I don't need his name in my little, personal, site ... so I can't see where the problem is and credits was add just for that "big" browser list and their behaviour ![]() |
|
In addition to the brittle dependence on navigator.userAgent, I see at least two superficial bugs. I found one, bad replacement (function(e) instead of E) ... now, please tell me where's the other. P.S. brittle dependence, rotlf, sounds like Randy "disaster with text" ... I write code for Web surfers, do You write code for crackers? |
|
as I've said, I don't have Mac and I don't care, That is an unexpected attitude for a professional. come on guys, I wrote JSL many times ago ... so please don't teach me how much could be cross-browser a script. |
|
I'm simply realistic, in real life/job/world, 0.01% of bad browser choice can't be my problem. |
|
But where did your two hours get you? two hours to: write code, do few tests with "every day" browsers, write post on personal blog, read here (thanks You Peter) ... and finally, create self-packed cross-browser version. Can You do better? I hope so ![]() |
#46
| |||
| |||
|
|
ooops, just last note about external JavaScript injection .... I wrote this post many months ago. What kind of browser doesn't support them? http://webreflection.blogspot.com/20...ic-import.html |
#47
| ||||||||||||
| ||||||||||||
|
|
I have already responded to that in two other replies, but please remove my name from that, ummm, "code". done, however, thank You for that table |
|
You don't write code for "web surfers", you write code for "web surfers that use a UA that fits into my little world of browser scripting ability". |
|
Why? You could learn a lot based on what you have written so far. And You could learn a lot on what I written too ;-) |
|
I am curious where you got that 0.01%. Did it come off the top of your head or out of your posterior as it would be about as reliable from one place as the other. http://www.w3schools.com/browsers/browsers_stats.asp |
|
I already have, and will continue to make it even better. That can't be said for your code at the present time because you have already decided that it is as good as it needs to be (even though it isn't even close). I've decieded anything about my code ... it is a proposal, just |
|
My script code is no more obtrusive than any other script block. Do you remove the script element that you use to contain your script block also? And, if you know that the script element is there (because you put it there) then you know you have to deal with it. of course ... but don't You never think about other developers that |
|
I don't. Most are written by the kind of people that believe that your script is a solution to the problem at hand. because it's a solution for 98% (ok, ok ... 99.9 is too much ...) of |
|
You mean that garbage, err code, that relies on navigator.userAgent that sends Safari3 on Windows down the wrong path? Uh? last script (and probably first one too) works with Safari 2 too, |
|
And I have code that is 99% fail proof, you have code that is 50% fail proof. 50% of browsers ... but 98% of surfers |
|
If you want to know if something works or not, you could test it yourself. That's what I do everytime |
|
Since you don't care about any non-PC browser what does it matter? This is your opinion, not my way to code (and I've recently bought
|
|
Besides, it would be trivial to answer you if you would make all the code for it easily available rather than having to wade through 4 or 5 pages to find it. No thanks. eh eh ... ok Randy, You are the one! |
#48
| ||||||||||||||
| ||||||||||||||
|
|
On Aug 31, 11:54 pm, Randy Webb <HikksNotAtH... (AT) aol (DOT) com> wrote: I have already responded to that in two other replies, but please remove my name from that, ummm, "code". done, however, thank You for that table |
|
You don't write code for "web surfers", you write code for "web surfers that use a UA that fits into my little world of browser scripting ability". Hey Randy, I do my work as you do your one. At the same time, I don't think I code better than You ... and I don't think You code better than me too. |
|
Why? You could learn a lot based on what you have written so far. And You could learn a lot on what I written too ;-) |
|
I am curious where you got that 0.01%. Did it come off the top of your head or out of your posterior as it would be about as reliable from one place as the other. http://www.w3schools.com/browsers/browsers_stats.asp http://www.upsdell.com/BrowserNews/stat.htm |
|
I already have, and will continue to make it even better. That can't be said for your code at the present time because you have already decided that it is as good as it needs to be (even though it isn't even close). I've decieded anything about my code ... it is a proposal, just modified, and last modified version works with probably every row present in your table (but if a browser is buggy, it can't be my problem) |
|
My script code is no more obtrusive than any other script block. Do you remove the script element that you use to contain your script block also? And, if you know that the script element is there (because you put it there) then you know you have to deal with it. of course ... but don't You never think about other developers that uses third libraries? I code like You, everything is "mine" and everything is under my control ... but if I publish something publicly it should care about every other library (do You know Open Ajax and similar projects?). |
|
So, do You code only for yourself? I think this is not an error, but this is not a good practice too, expecially if You public your code over the net. |
|
I don't. Most are written by the kind of people that believe that your script is a solution to the problem at hand. because it's a solution for 98% (ok, ok ... 99.9 is too much ...) of *USED* browsers ... I usually prefere small "quite totally cross browser" scripts instead of "totally cross browser" big size scripts. |
|
You mean that garbage, err code, that relies on navigator.userAgent that sends Safari3 on Windows down the wrong path? Uh? last script (and probably first one too) works with Safari 2 too, should I care about Safari 1 and 0.1 beta too? I remember a WebKit 0.1 alpha, should I test them too? |
|
And I have code that is 99% fail proof, you have code that is 50% fail proof. 50% of browsers ... but 98% of surfers ![]() |
|
Since you don't care about any non-PC browser what does it matter? This is your opinion, not my way to code (and I've recently boughta Nintento Wii too to code for dedicated Opera version ... do You test your code for new browsers too or only for "not-so-used" one?) |
|
Besides, it would be trivial to answer you if you would make all the code for it easily available rather than having to wade through 4 or 5 pages to find it. No thanks. eh eh ... ok Randy, You are the one! I didn't know this "place" and probably, if You're one "boss" here, I'll never come back again. |
|
Good luck with your unique and perfect way to code and find solutions (really, "only" 7 years for this simple problem? ...) |
|
I went here to talk about my proposal and possible problems but You talk only about your way to "perfectly" code and your friends agree with your ego. |
#49
| |||
| |||
|
#50
| |||||
| |||||
|
|
Richard Cornford said the following on 8/26/2007 12:10 PM: Peter Michaux wrote: snip if ( data ) { if ( window.execScript ) window.execScript( data ); else if ( jQuery.browser.safari ) // safari doesn't provide a synchronous global eval window.setTimeout( data, 0 ); else eval.call( window, data ); We have already seen the setting the - this - value is not sufficient for this issue, and that is what the - call - method does. In this case the code appears to be trying to use the deprecated feature of JavaScript(tm) where each object has an - eval - method, though even executing - eval - as a method of an object may be expected to do no more than influence the value of - this -. How is using .call trying to depend on executing eval as a method of an object? |
|
Other than that, I don't see anything that even comes close to what you are describing (I am more curious than anything). |
|
That window.setTimeout(data, 0) call seems like an easy solution to the scope problem. The easiest solution is not to design a system where the problem exists. While that is always the "easiest" solution, it is not always the most feasible solution. I have always said that an "AJAX type" site should have the backend designed to be handled by AJAX on the client side. The fact remains though that not all sites are easily reconfigured to be an AJAX Site without a complete re-write of the entire site. |
|
If your boss comes to you and says "I want our HTML4.01 Strict script infested site turned into an AJAX site by next Friday", you have two choices: 1) Find another job. 2) Kill yourself to please the person signing the check. |
|
Very very few people will take Option 1 in the Real World. It is trivially simple to take Option 1 in a Theoretical World. |
![]() |
| Thread Tools | |
| Display Modes | |
| |