I'll try to learn the codes for RegEx and replacement soon. It's useful
RegEx might be more appropriate for this part, in case someone wants to give you a comment with a div inside it or the profile displays a certain number of comments:
[quote]View All Comment/Post a comment link(lower part)
[quote]document.getElementById('content_18').getElementsByTagName("div")[21].innerHTML="PUT ANYTHING HERE";[/quote]
[/quote]
but, of course, that is rare
I've been using this trick for a long long long long long time
But you really are something Shirow.. you're so young yet you're so bright
and you're a freakin MANIAC
now I understand a little bit more about your advanced style of coding
[/quote]
not that..
i will tell clearly..
example my friends are 2450
and i want to edit that to become what i want...
- innerHTML is a string...the DOM methods (document.createElement, appendChild etc...) is not a string, it's a hierarchal object structure...
shoving a string into an object is impure and similar to wrapping a spaghetti noodle around an orange and calling it lunch..
[b]anything good about it?[/b]
- It's faster than DOM methods
by a lot
see [url=http://www.quirksmode.org/dom/innerhtml.html][b]W3C DOM vs. innerHTML[/b][/url]
- it's less verbose than DOM methods
- it allows you to take arbitrary chunks of markup and drop them into a document without having to parse them.
anyway this function creates much faster than innerHTML
<">you can use the above as [b]el = replaceHtml(el, newHtml)[/b] instead of [b]el.innerHTML = newHtml[/b]
this function has been applied to this code --> [url=http://theftalk.com/t18202-Pop-up-Testimonial-v3.1.2.html][b]Pop-up Testimonial Box[/b][/url]
[/quote]
Umm.. then how can I use this on friendster?
Where should I place my html and the content id? [b](newbie)[/b]
wow,,, really\?? you can put anything???
nice tutorial... keep up the good work... hehe
thanks for the lecture... hehe
Last edited by blurrycloud (2008-03-23 21:24:04)
wow nice compilation
mind if i ask something... what if i want to insert a short script.. like clock...
should i include the script tag?