waider: (Default)
waider ([personal profile] waider) wrote2004-04-15 12:58 pm
Entry tags:

stupid javascript tricks

Prompted inadvertently by ajd, a javascript currency conversion bookmark (works in Mozilla, no guarantees for anyone else): Convert Me, Baby! As it stands, it defaults to converting 1 unit of the source currency to USD.

Update: lj doesn't like it as it stands. here's what the URL looks like: javascript:frm=prompt('source currency');amt=prompt('amount');to=prompt('dest currency');if(!amt)amt=1;if(!to)to='USD';location.href='http://finance.yahoo.com/m5?a='+amt+'&s='+frm+'&t='+to

Post a comment in response:

This account has disabled anonymous posting.
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org