Doug Munn - JLM PHOTO
Apr-04-2005, 08:48 AM
Just tho't I'd share some code.
We want to offer add'l photo product services beyond what smugmug offers and we wanted to refer back our other site for processing.
NOW, I AM MAKING THE ASSUMPTION THAT THE "/1/" in the URL for a photo is a flag and I hope that it doesn't change.
This bit of code uses JavaScript (wish I could use something else) to grab the URL of the current page and pass it to my page at GearStores.
On my GearStores page, I can parse the URL and grab the image ID. That page isn't finished yet.
I put this code in the FOOTER section.
<script language="JavaScript" type="text/javascript">
var wl = window.location.href
if (wl.indexOf( "/1/")>0) {
document.write ("<form method=post action=http://www.gearstores.com/photos/orderpkg.php>")
document.write("<input type=hidden name='url' value='"+wl+"'>")
document.write("<center><input type='Submit' value='Order Quantity Prints, Package Prints and Screensavers Here'></center>")
document.write("</form>")
}
</script>
Comments, improvements welcome.
We want to offer add'l photo product services beyond what smugmug offers and we wanted to refer back our other site for processing.
NOW, I AM MAKING THE ASSUMPTION THAT THE "/1/" in the URL for a photo is a flag and I hope that it doesn't change.
This bit of code uses JavaScript (wish I could use something else) to grab the URL of the current page and pass it to my page at GearStores.
On my GearStores page, I can parse the URL and grab the image ID. That page isn't finished yet.
I put this code in the FOOTER section.
<script language="JavaScript" type="text/javascript">
var wl = window.location.href
if (wl.indexOf( "/1/")>0) {
document.write ("<form method=post action=http://www.gearstores.com/photos/orderpkg.php>")
document.write("<input type=hidden name='url' value='"+wl+"'>")
document.write("<center><input type='Submit' value='Order Quantity Prints, Package Prints and Screensavers Here'></center>")
document.write("</form>")
}
</script>
Comments, improvements welcome.