js to read html source
Hi, Iam a beginer in javascript in max.
I would like to include in max some daily thoughts from html site, here's the script :
Could you give me some clues to see those daylies sentences in js object ?
Thx in advance.
Ad.
anybody ?
You don't need JavaScript, but Jitter:
If you double click in jit.textfile, you'll see the file received.
As you can see, the text you want is surrounded by a html tag.
So, what we want is between and
In regexp's syntax, blahblah can be represented by .*
, which means "0 or more characters".
Then comes (.*)
, which mean: let's memorize a string with "0 or more characters" followed by
This memorized string is sent thru jit.str.regexp's third outlet.
Et voilà.
p
merci à toi.
Ad÷
As I see with today's message, there may be some extra work to do to replace the HTML character encoding (like today's "ˆ
") with ascii char (i.e. î). This can be done with regexp too, but there are a lot of char to convert... I suppose there are some JavaScript sources on the web to do that.
Hi again.
I'haven't found any js to make this, so I'm gonna use jit.regexp according to http://www.octadyne.com/html_entity_acsii_table.cfm .
I make a try with the & u c i r c ; When I want to substitute it with the ù, a backreference error occurs…although it does work with "t" for instance………
Is there a way out from this problem ?
thx you in advance.
Ad.
Patch and html source: