this is Panoramio JavaScript API Widget example.
<div dir="ltr" style="text-align: left;" trbidi="on"> this is Panoramio Javascript API Widget example.<br /> <div style="text-align: left;"> <script src="https://ssl.panoramio.com/wapi/wapi.js?v=1&hl=en"></script> <style type="text/css"> #div_attr_ex .panoramio-wapi-images { background-color: transparent; } #div_attr_ex .pwanoramio-wapi-tos{ background-color: transparent !important; } </style> </div> <div id="div_attr_ex"> <div id="div_attr_ex_photo"> </div> <div id="div_attr_ex_attr"> </div> </div> <script type="text/javascript"> function increase () { var temp = parseInt (document . apple . banana . value); if (isNaN (temp)) return; if (temp>=0 ) { attr_ex_photo_widget.setPosition(temp); } else { attr_ex_photo_widget.setPosition(0); document . apple . banana . value = 0; } } var position; var end; function myfunction(no) { position =attr_ex_photo_widget.getPosition(); no=position+no; end=attr_ex_photo_widget.getAtEnd(); if (no>=0 && !end) { attr_ex_photo_widget.setPosition(no); document . apple . banana . value = no; } else { no=0; attr_ex_photo_widget.setPosition(no); document . apple . banana . value = no; } } var no=0; var label = {'tag': 'kahna'}; var tagRequest = new panoramio.PhotoRequest(label); var attr_ex_photo_options = { 'width': 600, 'height': 500, 'attributionStyle': panoramio.tos.Style.HIDDEN}; var attr_ex_photo_widget = new panoramio.PhotoWidget( 'div_attr_ex_photo', tagRequest, attr_ex_photo_options); var attr_ex_attr_options = {'width':600}; var attr_ex_attr_widget = new panoramio.TermsOfServiceWidget( 'div_attr_ex_attr', attr_ex_attr_options); attr_ex_photo_widget.enablePreviousArrow(true); attr_ex_photo_widget.enableNextArrow(true); attr_ex_photo_widget.setPosition(2); </script> <button onclick="myfunction(1)">next</button><button onclick="myfunction(-1)">previous</button> <br /> <form name="apple"> <input min="0" name="banana" size="5" type="number" /> <input onclick="increase ();" type="button" value="View" /> </form> </div>
0 comments:
Post a Comment