Created
October 3, 2008 23:25
-
-
Save anonymous/14682 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="{$language}" xml:lang="{$language}"> | |
<head profile="http://gmpg.org/xfn/11"> | |
<title>{$page_title}</title> | |
{$head} | |
{$styles} | |
<script src="http://media.onsugar.com/static/js/scriptaculous-1.8/prototype.js?_v=19" type="text/javascript"></script> | |
<link rel="stylesheet" type="text/css" href="http://media.onsugar.com/static/css/grids.css?_v=19"> | |
<script src="http://media.onsugar.com/static/js/scriptaculous-1.8/scriptaculous.js?_v=19" type="text/javascript"></script> | |
</head> | |
<body{$onload_attributes}> | |
<div id="container"> | |
<h1>Honey, will you marry me?</h1> | |
<div id="results"></div> | |
<h2><a href="#" id="yesiwillmarryyou">Yes!</a> or <a href="#" onclick="go()">I need some more time to think about it...</a></h2> | |
</div> | |
<script type="text/javascript"> | |
{literal} | |
function go(i) { | |
new Ajax.Request('/spread/shopstyle', { | |
method: 'post', | |
parameters: { | |
terms: 'diamond ring', | |
page: 1, | |
numPerPage: 250, | |
cat: 'womens-accessories', | |
filters: '&fl=b4409&fl=b957&fl=p14&fl=p15' | |
}, | |
onSuccess: function(transport) { | |
var results = eval('('+transport.responseText+')'); | |
var thering = results[0].products[Math.floor(Math.random()*results[0].products.size())]; | |
$('results').update('<img src="' + thering.images[3].url + '" />'); | |
$('yesiwillmarryyou').href = thering.url; | |
} | |
}); | |
} | |
go(); | |
{/literal} | |
</script> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment