Created
April 8, 2010 11:16
-
-
Save ryantss/359994 to your computer and use it in GitHub Desktop.
This file contains 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
<html> | |
<head> | |
<title>[NEAT] Sample AFS Javascript Page</title> | |
<style> | |
body{ font-family:arial; } | |
.search_header{ background:#eee; padding:4px; font-size:15px; font-weight:bold; } | |
.wide_ads { background:#ddf8cc; padding:10px; } | |
.narrow_ads { background:#e5ecf9; padding:10px; } | |
/* WEGO AFS */ | |
div.ad_slot .ad .blurb { color:#333333; } | |
div.ad_slot a { color:#0071BA; text-decoration:none; } | |
div.ad_slot { font-size:12px; } | |
</style> | |
<script language="JavaScript"> | |
function renderWegoAFS(wideAds, narrowAds){ | |
document.getElementById("wide_ad_unit").innerHTML = '<div class="ad_slot">'+wideAds.join('<br>')+'</div>'; | |
document.getElementById("narrow_ad_unit").innerHTML = '<div class="ad_slot">'+narrowAds.join('<br>')+'</div>'; | |
} | |
function renderNext(wideAds, narrowAds){ | |
document.getElementById("wide_ad_unit2").innerHTML = '<div class="ad_slot">'+wideAds.join('<br>')+'</div>'; | |
document.getElementById("narrow_ad_unit2").innerHTML = '<div class="ad_slot">'+narrowAds.join('<br>')+'</div>'; | |
} | |
function loadNext(){ | |
document.getElementById('afs_iframe').src="wego_afs.html?q=Kuala+Lumpur&num_ads=w2n3&channel=Airfares&page=1&callback=renderNext"; | |
} | |
</script> | |
</head> | |
<body> | |
<table width="100%" border="0"> | |
<tr> | |
<td colspan="4"><div class="search_header">Search Results | |
<input type='button' value='load next page' onclick="loadNext()" /> | |
</div></td> | |
</tr> | |
<tr> | |
<td style="width:35%;vertical-align:top">wide-1<br><div id="wide_ad_unit" class="wide_ads"><big><p>wide result...</p></big></div></td> | |
<td style="width:15%;vertical-align:top">Narrow-1<br><div id="narrow_ad_unit" class="narrow_ads"><big><p>narrow result...</p></big></div></td> | |
<td style="width:35%;vertical-align:top">Wide-2<br><div id="wide_ad_unit2" class="wide_ads"></div></td> | |
<td style="width:15%;vertical-align:top">Narrow-2<br><div id="narrow_ad_unit2" class="narrow_ads"></div></td> | |
</tr> | |
</table> | |
<iframe id='afs_iframe' style="display:none" src="wego_afs.html?q=New+York&num_ads=w3n2&channel=Airfares&page=1&callback=renderWegoAFS" height="0px" width="0px" border="0px"/> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment