HeyShopping produce this I'm a Mac T-shirt for a while and now I decide to buy one. However, when I click the "Add to cart" item, it pops me this javascript error:

Error: missing ) after argument list Source File: javascript:add_to_cart('3729','I'm a Mac (XL%E8%99%9F)','399',myform.buy_number_3729_2) Line: 1, Column: 22 Source Code: add_to_cart('3729','I'm a Mac (XL號)','399',myform.buy_number_3729_2)

Ok... looks like somebody doesn't handle string quoting at all. So what should I do now ? Contact them to fix this bug ? No. I hit the "shell bookmarklet" that has always been there on my Firefox personal toolbar, and type:

add_to_cart('3729',"I'm a Mac (XL號)",'399',myform.buy_number_3729_2)

Right, just change the bad string in the second argument to use double quote, and call that function. Alrighty, now the T-shirt is in my cart!

Ponder, didn't they ever wondering why the T-shirt doesn't sell as well as it should be ?

Labels: javascript, shopping