Hi Mike,

Thanks allot that worked great! now to help out a nooby here this is considered DOM right? and in DOM you dont need doc ready functions ?

Thanks again

-Anthony

Mike Alsup wrote:

Anthony,
You've got script errors on that page.   You need to get those cleared
up first.  Also, your blockUI code doesn't need to be in a doc-ready
block (ie: $(function(){})) since you're calling it from an event
handler.  Try something like this:

var question = $('#question')[0];

function addtocart(formName,product) {
   var obj = findObj(formName);
   if (obj != null) {
       $.blockUI(question, { width: '275px' });

       $('#yes').click(function() {
           obj.submit();
            window.location = "/order/cart.php?act=cart";
           return false;
       });
       $('#no').click(function() {
           $.unblockUI();
           obj.submit();
       });
   }
   else {
       alert('warning');
   }
}

Mike


On 7/19/07, Anthony Leboeuf(Worcester Wide Web)
<[EMAIL PROTECTED]> wrote:

Hello everyone, Im having a bit of trouble using blockui. I've added the
plugin here
http://pioneer.dlg360.com/order/index.php?act=viewProd&productId=2678
when you click "add to basket" it should ask you a question(instead it asks the question for 2 seconds then submits). But for some reason its forcing the submit instead of waiting for the answer as the blockui demo shows. I
just cant seem to fix it, anyone have any suggestions? here is my code
http://pastebin.mozilla.org/157254

 Thanks any help is appreciated


 -Anthony



Reply via email to