Well, this would work but would select all <a> of the Dom,

getElementsByName() will only select every a in the DOM if every A
element has the same name, which would play havoc with anchors anyway.


The thing is i don't want to select all a in the DOM because when i am currently viewing #test, i don't care about all a in #about or others. If the DOM is huge, your code will parse the whole DOM for all a elements. That could cost latency, and anyway, is not needed. When i press on an anchor link, i usually only care about what i have rendered on the screen, not all hidden divs contents.

$(anchorvalue) just ask for one DOM element if exists or not. That's pretty quick, even for bad JS engines (i keep in mind one day to support QMDs, which stay pretty popular)


not the actual screen only so you would first need to limit the search to it + this code.

I think you've misunderstood the code I posted.

Don't think so but history proves that i'm often wrong :)


On the other hand, only
if($(anchorvalue))
would do the job.

I don't know what that would do.

last lines of iui.js:
function $(id) { return document.getElementById(id); }

But I see from your other posts that you've got the idea that you can detect links to anchors using the existing, standards compliant naming scheme rather than introducing a customised system.

--
Rob

Right, thanks for that


Anyone else to debate?

R.

--
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.

Reply via email to