All,
I have the following code which is triggered on a change of a drop down box:
[CODE]
$(“#select_pics”).change(function(){
var pic_change = $(“#select_pics”).val();
$.post(“load_my_photos.php”, {show_pics: pic_change}, function(result) {
$(“#image_divs”).html(result);
});
});
So the select to do do this currently looks like this:
[CODE]
<select name=”pics” id=”select_pics” class=”styled”><option value=”my_pics”>My Added Pics</option><option value=”finish_photos” selected>Finished Photos</option><option value=”shopping_cart_photos”>Shopping Cart Photos</option><option value=”purchased_photos”>Purchased Photos</option></select>
So basically what I’d like to is have a URL like: [url]http://website.com/photo.php?pic_change=shopping_cart_photos
I’d like the script to take anything after the equal sign and basically execute the same jQuery code above but I don’t know how I’d call it because it wouldn’t be on a change, it would be during a load. Any ideas on how to do this? Thanks in advance!
UPDATE: I found the $(window).load function but that waits until the page is loaded. Is there anything I can use to do this before the page is actually loaded?