Javascript script execution in innerHTML: another round

May 27th, 2007

More than one year ago I was play­ing with AJAX, and I was facing a prob­lem with scripts con­tained in doc­u­ments loaded through XML­HttpRe­quest. So, at that time, I wrote two blog posts talk­ing about this issue. The first was just a modify to the well known AHAH tech­nique, while the second post was a script I entirely wrote by myself: “Javascript script exe­cu­tion in inner­HTML: the revenge”.

Now more than a year has passed and tech­nolo­gies are evolved. Now the web is full of very pow­er­ful AJAX frame­works and much prob­a­bly, for medium/big projects you won’t need this kind of “hack” any­more. But there are few devel­op­ers across the world that still hand-​code their little ajax tricks and needs this. So, since I received a lot of com­ments about that, I’m writ­ing here again to update you about the mod­i­fies that have been done to that script.

That script suf­fered of a (rel­a­tively) big prob­lem: if you had a document.write() call in the exter­nal script you loaded, well, it won’t work. Jeremy Bell has mod­i­fied that script in order to have this func­tion­al­ity included. You can see it work­ing at http://​www.​black​outweb​de​sign.​com/​a​j​a​x​.​d​e​m​o.php.

For other dis­cus­sion about the topic, look at the com­ments in the post, they have been very help­ful to me to cor­rect var­i­ous com­pat­i­bil­ity issues.

0 Comments, tagged with Coding, Javascript, Web

phbook

May 11th, 2007

gphone was an exist­ing name, and google didn’t allowed me to create it (because there was another project with same name hosted on source­forge), so I called it phbook.

Actu­ally, it misses sev­eral func­tions yet, but it is quite usable (although you can’t delete num­bers from the phone­book). You can down­load it only from svn at the moment.

It’s home­page is: http://​code.​google.​com/​p​/​p​hbook/

I will write down some doc­u­men­ta­tion as soon as I’ll have some more spare time :)

0 Comments, tagged with Coding, Python

Phonebook

May 6th, 2007

It hap­pens to me very fre­quently: I have to send an SMS by using the free SMS ser­vices you can find all over inter­net. I click on the web page, “send SMS”, then there’s a textbox saying to me “Phone number”. The most obvi­ous thing is to take the cell­phone and look for the number in the address book, but this is a very boring operation.

So that’s why (mainly) I made - ehm… I’m making - gphone. It is a simple phone­book with a copy & paste func­tion :) I’m still fin­ish­ing it but I will release it as soon as pos­si­ble (I’d give it right now but I’m still look­ing for a place where to store the sources).

The curi­ous thing is that, while I was begin­ning to code it, I noticed that it could be more useful than how much I believed ini­tially. By the way, here there are some screenshots:

gphone in action
gphone in action
Editing contacts
edit­ing con­tacts
Adding new contacts
Adding new con­tacts
Filtering
Fil­ter­ing

1 Comment, tagged with Coding

Microblogging

  • Funny thing: yesterday night I had an idea about a good blog post I could make. But now I completely forgot what that idea was about. 13 hours ago #
  • I think pownce has a little issue with caching since if I delete a message and I write a new one, it doesn't appear in my homepage. Nov 16, 6:34pm #
  • I didn't know that something like [(x,y) for x in range(10) for y in range(x)] was possible in Python. Nov 16, 3:45pm #
  • I'm about to go to the local LUG dinner: pizza for everyone. Nov 14, 9:15pm #
  • Lately I've been very interested in fast data structures with minimum memory usage. Just surprised to find out that list comprehension in Python are sometimes slower for large quantities of data than classic for loops. Still trying to understand why (if someone has a clue, please let me know). Nov 12, 12:44pm #
  • So wordpress was silently modifying HTTP request headers and I was getting a 400 when fetching Pownce RSS. Now everything works as expected on my blog, shame on WP. Nov 9, 3:58pm #
  • Experimenting with document language identification. Nov 6, 10:23pm #
  • So looks like I finally found an interesting topic apart from web development: information retrieval. Nov 3, 5:13pm #
  • Planning a trip to Bologna in December Nov 1, 5:24pm #
  • After today, I want to go as far as I can from Italy. Oct 29, 11:49am #

Search


« Authored by Giuliani Vito Ivan »