Ajax Blog


Eval’ing with IE’s window.execScript

Posted in Ajax News by Michael Mahemoff on the January 31st, 2007

Plaxo’s Joseph Smarr has been playing with on-demand javascript, i.e. downloading extra JS code after the page has already loaded. When you grab the code via a remote call and eval() it, it doesn’t get into global scope. So here’s how he dealt with it.

Here’s a simplified version of the situation we faced:

function loadMyFuncModule() {
  // imagine this was loaded via XHR/etc
  var code = 'function myFunc() { alert(\"myFunc\"); }';
  return eval(code); // doesn’t work in FF or IE
}
	
function runApp() {
  loadMyFuncModule(); // load extra code “on demand”
  myFunc(); // execute newly loaded code
}

The thing to note above is that just calling eval() doesn’t stick the code in global scope in either browser. Dojo’s loader code solves this in Firefox by creating a dj_global variable that points to the global scope and then calling eval on dj_global if possible:

function loadMyFuncModule() {
  // imagine this was loaded via XHR/etc
  var code = 'function myFunc() { alert(\"myFunc\"); }';
  var dj_global = this; // global scope object
  return dj_global.eval ? dj_global.eval(code) : eval(code);
}

This works in Firefox but not in IE (eval is not an object method in IE). So what to do? The answer turns out to be that you can use a proprietary IE method window.execScript to eval code in the global scope (thanks to Ryan “Roger” Moore on our team for figuring this out). The only thing to note about execScript is that it does NOT return any value (unlike eval). However when we’re just loading code on-demand, we aren’t returning anything so this doesn’t matter.

The final working code looks like this:

function loadMyFuncModule() {
  var dj_global = this; // global scope reference
  if (window.execScript) {
	
    window.execScript(code); // eval in global scope for IE
    return null; // execScript doesn’t return anything
  }
  return dj_global.eval ? dj_global.eval(code) : eval(code);
}
	
function runApp() {
  loadMyFuncModule(); // load extra code “on demand”
  myFunc(); // execute newly loaded code
}

And once again all is well in the world.

Source: Ajaxian
Original Article: http://ajaxian.com/archives/evaling-with-ies-windowexecscript

The TechCrunch20 Conference

Posted in Ajax News by Michael Arrington on the January 31st, 2007

I am very excited to announce a new conference, called the TechCrunch20. This is a joint venture between us (TechCrunch) and Jason Calacanis, who broke the news about this earlier today. The format is simple: Twenty of the hottest new startups will announce and demo their products over a two day period. And they don’t pay a cent to do this.

Many tech conferences today allow startups to pitch and demo their products to their attendees, although there is almost always a hefty fee involved that ranges from thousands to tens of thousands of dollars. DEMO, where I am currently, is .probably the quintessential example of this model. The entire conference is paid startup demos. There are way too many to digest - 60 - and it is a well known secret that if you are willing to pay the $15,000+ fee, your startup will really need to suck to be turned down.

While conferences like DEMO are extremely lucrative for the organizers, I’m not sure the startups or attendees attending get much out of it other than a great networking event. There are too many startups for press to give even passing coverage to many of them, and attendees are lost in a sea of pitches that all begin to blur together.

And there is a serious conflict of interest at the conference level. The economics of the event dictate that a certain number of startups must be accepted for a certain fee. Attendees don’t know if they’re really seeing the best startups, or just the best startups that are willing to pay the exhorbitant participation fee. A few (or a lot of) duds always make their way in.

Many of the hottest startups over the last couple of years - Digg, YouTube, StumbleUpon and many others - didn’t have the money in the early days to spend on DEMO and other conferences, and so they didn’t participate. We want to give the future YouTube’s a platform to announce those products.

The TechCrunch20 Conference

Jason and I are going to do something a lot different that they pay-to-demo model. The TechCrunch20 conference will be a two day event, held this fall (more details soon), where twenty hot startups will demo their new products. And they don’t pay a dime to do this.

The startups will be invited based on the recommendation of a committee of expert analysts, entrepreneurs and journalists. Twenty companies will be invited, plus a couple of alternates. If a selected startup isn’t ready to launch ten days or so before the event, they’ll be bumped and one of the alternates will take their place.

Jason is the perfect partner for us to work with on this conference. He’s a successful entrepreneur and has held large startup-focused conferences in the past. It is our hope that his experience and our access to new startups will be a winning combination.

More details on the TechCrunch20 conference will be announced soon.

Crunch Network: MobileCrunch Mobile Gadgets and Applications, Delivered Daily.

No Tags

Source: TechCrunch
Original Article: http://feeds.feedburner.com/~r/Techcrunch/~3/84596630/

Sound with JavaScript but not Flash

Posted in Ajax News by Dion Almaer on the January 31st, 2007

Reinier Zwitserloot wanted to see if he could add sound support without embedding a Flash bridge, and shared his research in his article on Sound in Web Browsers without Flash.

Check out his test page for a Sound Check

An example API

JAVASCRIPT:
  1.  
  2.                         function sound2Play() {
  3.                                 if ( !sound2Embed ) {
  4.                                         sound2Embed = document.createElement("embed");
  5.                                         sound2Embed.setAttribute("src", "machinegun.wav");
  6.                                         sound2Embed.setAttribute("hidden", true);
  7.                                         sound2Embed.setAttribute("autostart", true);
  8.                                 } else sound2Stop();
  9.                                 sound2Embed.removed = false;
  10.                                 document.body.appendChild(sound2Embed);
  11.                         }
  12.                        
  13.                         function sound2Stop() {
  14.                                 if ( sound2Embed && !sound2Embed.removed ) {
  15.                                         document.body.removeChild(sound2Embed);
  16.                                         sound2Embed.removed = true;
  17.                                 }
  18.                         }
  19.  

Source: Ajaxian
Original Article: http://ajaxian.com/archives/sound-with-javascript-but-not-flash

[Sunspots] The intuition edition

Posted in Ajax News by 37signals on the January 31st, 2007
Business advice from David Lynch?
“Intuition is the key to everything, in painting, filmmaking, business—everything. I think you could have an intellectual ability, but if you can sharpen your intuition, which they say is emotion and intellect joining together, then a knowingness occurs. Feeling correct is a feeling I think everyone knows.”
Steve Ballmer spends one-third of his time meeting with customers
“I get energy from seeing our customers. It reminds me of the things we’re doing well and it also reminds me of the things where we need to improve.”
You only get three seconds to make an impression
“People have forgotten that the most important thing on a website is the content. Not the gradient, not the drop shadow, not even that PhotoShop brush that you thought would be cool as a background image. If your content doesn’t say interesting stuff in a concise manner, then no amount of CSS Zen will help. Writing for the web is the toughest and most important part of developing web sites/applications. Get that wrong, and every other part of the design process from your information architecture through to your IE5.5 on OSX CSS hacks just doesn’‘t matter.”
Video: Real worldish use of multi-touch driven screens
Jeff Han and Phil Davidson demonstrate how multi-touch screens “will change the way we work and play.” Examples include usage in image editing, web browsing, creating 3D animations, etc. [tx ML]
Fotolog neck and neck with Flickr
“Perhaps this is a sign that those folks trapped in the Web 2.0 bubble are not being critical enough about what is responsible for success on the Web circa-2007…Maybe tags, APIs, and Ajax aren’t the silver bullets we’ve been led to believe they are. Fotolog, MySpace, Orkut, YouTube, and Digg have all proven that you can build compelling experiences and huge audiences without heavy reliance on so-called Web 2.0 technologies. Whatever Web 2.0 is, I don’t think its success hinges on Ajax, tags, or APIs.”
SmugMug discusses Amazon S3 problems
“I can’t think of a particular vendor or service we use that doesn’t have outages, problems, or crashes. From disk arrays to networking gear, everything has bad days. Further, I can’t think of a web site that doesn’t, either. It doesn’t matter if you’re GMail or eBay, you have outages and performance problems from time to time. I knew going into this that Amazon would have problems, and I built our software and our own internal architecture to accommodate occasional issues. This the key to building good internet infrastructures anyway. Assume every piece of your architecture, including Amazon S3, will fail at some point. What will you do? What will your software do?”
Setting small goals creates sustainable change
“When someone goes from one extreme to another, the behavioral change rarely lasts. In my experience, this is true in personal finance, fitness, studying, and a bunch of other areas. When I make a change, I almost always make the most incremental change of all and work iteratively from there. This is why I just shake my head when I see personal-finance pundits giving families advice to go from a 0% savings rate to a 25% savings rate (“you can do it!!!”). Giving that kind of advice to someone is not useful if their habits have been set for years. That’s why you find articles like 8 lottery winners who lost their millions. Habits don’t change overnight, and if they do, chances are it won’t be sustainable.”
Jeff Veen's CMS suggestions (e.g. give customers quick wins)
“Make it easy to get started. Give first-time users a series of quick wins that become increasingly complex. When I first log in, I want to create a Web page. Next, I’d like to add some styles to it. Then, I’d like to make links to some other Web pages. I’ll build a navigation system after that, and start to add other features eventually. But I want to feel successful with your system within a few minutes. I don’t want to you to present the stunning power at my fingertips until I’m comfortable with my surroundings. Please save the content ranking, on-the-fly PDF creation, community forums, and user polls for later. I may eventually want that stuff, but not the first time I log in.” [tx WH]
Released: PackRat 1.0 lets you use your Backpack data when you can't be online
“Before you hit the road for the first time with PackRat, just sync up with Backpack and your data is duplicated in PackRat’s database…When you get back on the ‘net, PackRat will automatically inform Backpack of all your changes and Backpack will be up to date.”
Tech barons trying to change energy policy
“The venture capitalists could become a powerful part of the realignment of energy politics. They are lending a new voice to the debate, one that politicians are likely to listen to given the investors’ reputation as smart backers of next-generation companies.”

Source: Signal vs. Noise
Original Article: http://www.37signals.com/svn/posts/243-sunspots-the-intuition-edition

Personal Change

Posted in Ajax News by Sam Brown on the January 31st, 2007

i am drawing pictures based on titles

suggest more titles for drawings or other ideas.

Source: Signal vs. Noise
Original Article: http://www.37signals.com/svn/posts/242-personal-change

[Link It Up] Great buildings

Posted in Ajax News by 37signals on the January 31st, 2007

What’s your favorite building? Link it up.

For example…

seattle lib

angkor wat

bilbaos maria novella

falling water

Source: Signal vs. Noise
Original Article: http://www.37signals.com/svn/posts/241-link-it-up-great-buildings

[Fireside Chat] Seth Godin and Mark Hurst (Part 2 of 2)

Posted in Ajax News by 37signals on the January 31st, 2007

Continued from Part 1...

Matt
Trevor Turk 23 Jan 07 Mark: What’s your favorite part about hosting the GEL conference?
Mark
re Gel – tough to name just one favorite aspect, but
Seth
it’s the groupies!
Mark
one great thing is meeting & seeing the speakers – and i should note that both Seth and Jason gave fabulous talks last year at Gel ‘06 (thanks to both)
Mark
another is meeting the attendees – being an attendee myself, really – learning from everyone else in the room, whether on stage or not
Mark
...(to tie it into the previous thread) i’m there to create an environment, and hope that the experience that emerges is good
Matt
How do you decide who to invite to speak at GEL?
Mark
i try to find a good mix that will "gel" well together – i also like to see if a theme emerges – there’s a lot of research but a good bit of intuition and gut feel as well
Mark
though
Mark
one thing i learned from richard saul wurman years ago was one way he invited speakers to the TED conference – "invite your heroes." so often i go after people i admire (see prev. comment re seth & jason)
Matt
The TED conference always gets a really amazing roster.
Mark
TED and PopTech are titans – Gel is a very different kind of event (at least i think so)
Matt
Seth, what are zoomers and why are they important?
Seth
A zoomer is someone who changes without stress.
Seth
Human beings evolved to resist big changes. So, change triggers stress.
Seth
But we built a world that keeps changing faster and faster
Seth
SO, how to win?
Seth
Easy, teach yourself to view changes as little things, not big ones.
Seth
If you change faster than the competition, you will, by definition, be more ‘fit’ for
Seth
the new environment.
Seth
Sometimes it comes from the top, of course, but more often, it’s an individual’s choice.
Seth
and if you work with non-zoomers, get out!
Mark
all sounds good to me!
Seth
Good, but difficult.
Mark
indeed
Seth
It’s interesting to watch google
Seth
they desperately want to zoom
Seth
but as they get bigger, sooner or later they hire non-zoomers
Seth
hire enough, fail to prune, and the next thing you know…
Seth
you’re AOL.
Matt
so what’s the solution? don’t get bigger?
Seth
which is a fine solution, imho
Matt
prune ruthlessly?
Seth
also a fine solution
Seth
and the third choice is to do what msoft should have done
Seth
let the justice department split them up!
Matt
is not getting bigger a real option for Google though?
Seth
why not? what’s the point of going to work every day? to have more co workers?
Matt
Don’t shareholders expect growth?
Mark
i prefer small teams, but then that’s been my whole career
Seth
it’s a mythical man month problem.
Mark
growth of what… not employee count!
Seth
Shareholders expect growth, but always end up bitterly disappointed when the growth
Seth
fades.
Matt
Obvs we here at 37s agree small is great.
Matt
Just seems like a diff ballgame when you’re a public company.
Seth
Google could set the bar higher. Higher on what it takes to be hired, higher for what it takes to stay there, and higher for what it takes to be a viable project.
Seth
And yes, being public is a problem, but that’s not a good excuse. They’ve done a fantastic job of avoiding most public company problems… largely by completely ignoring the shareholders
Jason
Google could go private. I actually think we’ll see more companies making that move over the next 10 years.
Mark
i think another pertinent question is what people should do who are at non-Google companies
Mark
again re the Apple example – i think the Google example is instructive, but it’s a very special case
Matt
We talked about underrated earlier. How about the opposite…Is there a company you think really does NOT "get it"? One you just shake your head at?
Seth
There are industries that astound me. Airlines sure, but they’ve got problems they can’t fix. I mean folks like the cellular companies.
Seth
why do they establish expectations so aggressively and fail to meet them? Why don’t they lay a framework for their future? why don’t they reinvent the systems while the cash flow is there to support it?
Mark
health care
Matt
MH, what specifically about health care?
Mark
just listing another sector that is well-established, makes lots of money, and is comically uninterested in the user experience
Seth
Healthcare is a great example of the problem with distributed problem solving. It gets you partway, but sooner or later, you need really clear leadership
Seth
For example: who will decree electronic prescriptions? How will we finally deal with iatrogenic problems in hospitals?
Seth
or my fave, kidney transplants.
Matt
Cell companies def seem to be one area everyone can agree on as sucking.
Mark
i’d say most big sectors are like this – which is why being a leader in customer-centered business is often a matter of clearing a very low bar of service
Seth
Mark is exactly right. the bar is low, and still no one jumps it
Mark
like banking: remember the Commerce Bank speaker at Gel ‘06 last year? they’re a huge success in large part because, drum roll, they have weekend hours. what a concept
Mark
i can’t tell you how many bad – comically bad – experiences i’ve had, or directly heard about, in banks in NYC
Jason
You guys are so right about the low bar.
Jason
I see low bars everywhere.
Jason
It’s hard not to trip over them.
Mark
there are plenty of good, well-meaning people at all these banks – it’s the lack of customer-centered leadership (re the question at the beginning of this chat)
Seth
except, wait
Seth
what about the great bank manager who makes THAT bank better?
Mark
i actually saw that happen
Seth
we’re still talking about human beings interacting with other human beings
Seth
and some people refuse to blame their boss
Seth
they just do it. they treat people with respect
Mark
at bank X i had a great bank manager
Mark
but the system didn’t reward customer-centered bank managers
Mark
and so in the next re-org, out she went to another division, with another job entirely
Mark
next bank manager was standard-issue
Jason
I continue to believe the reason more bars aren’t raised is because people don’t think it’s sexy to execute on the basics beautifully.
Jason
That’s what it comes down to. Don’t give me the airplane with the fancy screens in the seats, give me the airplane with a comfy seat and more legroom. Those are the basics.
Mark
basics basics basics – but jason, it just doesn’t make for sexy press pieces :)
Jason
It has for us ;)
Mark
i’m doing something wrong then ;)
Jason
But yeah, you’re right. It’s generally not sexy.
Seth
If I had to close this thing with one message to the 37s reader who is reading at work when she should be reading, and who is busy blaming her boss for the low bar and lousy service and the Dilbert world she lives in, it would be this:
Seth
TAKE RESPONSIBILITY! If there’s a problem, fix it. If your job can’t be fixed, quit. How dare you waste your life in exchange for a paycheck. You have high speed internet access, bub, you’ve got no excuse. You don’t live a hovel in Ghana. Go do it!! Pick up the phone and call someone.
Seth
There.
Seth
I feel better now.
Jason
I like it Seth.
Mark
watch this to see seth give that message http://video.google.com/videoplay?docid=-4…
Matt
Good stuff. How about you Mark…If you could give our readers only one piece of advice, what would it be?
Mark
oh, for me…
Mark
i’d say just try to become more aware of experience – whether at work, while using technology, while in a store, in a bank, or wherever. i think the more people are aware of good and bad experiences, the better they are at taking responsibility (re seth’s comment) for creating good experiences where they can
Matt
I think Paco Underhill’s book Why We Buy is a great example of this.
Matt
Nothing to do with web sites yet teaches you so much about how to think about experiences.
Matt
Mark
SVN teaches you a lot
Matt
Great stuff in this chat guys. Thanks so much for participating. Any final thoughts to share or should we wrap up?
Mark
this was fun! campfire worked great
Seth
Thanks for having us. And even better, thanks for showing the way. The stuff you guys do raises the bar every single day.
Jason
Go to GEL would be my recommendation. And that’s not ass kissing.
Jason
GEL is the best conference I’ve ever attended.
Mark
thx
Matt
JF, for readers, why do you think GEL is great?
Jason
GEL is great for a variety of reasons… Here are a few
Jason
1. High production values. It’s taken seriously and tastefully executed.
Jason
2. A wide variety of speakers from a wide variety of industries.
Jason
3. Information and education and entertainment all in one. There’s no better way to learn.
Jason
4. Inspiration abound. The speakers and the attendees are fascinating.
Jason
5. It’s comfortable, kind, and focused on the things that I think really matter.
Mark
thx, j!
Jason
That’s enough. ;)
Mark
whew
Jason
But really, it’s a great show and you’ll hear things at GEL you haven’t heard anywhere else.
Jason
You’ll actually learn something. You’ll be inspired.
Jason
And inspiration and motivation is everything.
Jason
Seek out inspiration and motivation and you can go far.

Source: Signal vs. Noise
Original Article: http://www.37signals.com/svn/posts/238-fireside-chat-seth-godin-and-mark-hurst-part-2-of-2

Synchronous Calls and Browser Freezes

Posted in Ajax News by Dion Almaer on the January 31st, 2007

Mark Pruett did some experimenting with a hypothesis:

After launching a synchronous call, other browser windows or tabs will be frozen, and the asynchronous calls will not be serviced until the sync call completes.

For my experiment, I open up a browser window, then open a second browser window using the “New Window” menu option. This will (hopefully) assure that both windows are part of the same browser process.

In window #1, I load my synchronous test and start a server request with a delay of 60 seconds. In window #2, I load the asynchronous test with each of the five tests set to three seconds.

The results showed that browsers are playing nicely. Almost. Firefox didn’t past the test in the current stable versions, but the nightly build was later tested and it was happy.

Source: Ajaxian
Original Article: http://ajaxian.com/archives/synchronous-calls-and-browser-freezes

Yahoo’s Brand Universe Launches

Posted in Ajax News by Michael Arrington on the January 31st, 2007

Yahoo’s brand-centric sites, announced in November 2006 and dubbed “Brand Universe”, have started to go live. These sites each revolve around a single popular brand - like this one on the Nintendo Wii - and have almost no original content. Instead, Yahoo is taking content from Flickr, Del.icio.us, Yahoo Answers and other Yahoo properties, along with some slick graphics, and hoping for page views.

Yahoo says to expect 100 or so brand-based sites by the end of the year, and will include sites for popular movies, TV shows, bands, celebrities, games, etc. The next sites to be launched will include the Sims, Halo, Lost, the Office, Transformers, and Harry Potter, says GigaOm.

Yahoo doesn’t seem too concerned with monetization of these pages yet, and they aren’t working directly with the brands themselves. Chances are both of those policies may change in the near future.

Crunch Network: CrunchBoard because it’s time for you to find a new Job2.0

Source: TechCrunch
Original Article: http://feeds.feedburner.com/~r/Techcrunch/~3/84416358/

Technorati’s Mysterious Disappearing WTF Product

Posted in Ajax News by Michael Arrington on the January 31st, 2007

Steve Rubel somehow came across a new Digg-like Technorati product called “WTF,” which stands for “Where’s the Fire?” It was briefly live at technorati.com/wtf, but is no longer available.

From the screen shots (see below, care of Rubel), it appears to have very similar features as Digg, where users can vote for stories they find interesting and force them higher in results.

I’ve emailed Technorati for a comment but haven’t heard back yet. This may be a product that they did not intend be available for public scrutiny quite yet, and Rubel’s post may have resulted in them removing it.

Technorati launched a TechMeme-like site called Technorati Explore in early 2006. I just checked it on a whim to see if it was still live - and it’s been removed as well. I can’t find any announcement of the product going dark, so it may have been any time in the last few months.


Crunch Network: MobileCrunch Mobile Gadgets and Applications, Delivered Daily.

Source: TechCrunch
Original Article: http://feeds.feedburner.com/~r/Techcrunch/~3/84408626/

Next Page »