[jQuery] tag being output in wrong order from load call

2008-07-06 Thread paulp75

The code which is created on the page is like this
 a href=jq-remove.php id=Delete_?php echo $thiscart-
DisplayIndex; ? class=removeitem / img src=images/remove.gif
border=0 alt=remove / /a

note that the /a is after the image.

i call the page from  this jquery query

(.removeitem).livequery('click', function(){
var removeidno = $(this).attr(id);
$('#cartcontents').load(jq-remove.php, { removeid: removeidno } );
 return false; });

now for some reason when it is output to the browser it comes back as
a href=linketc.php/aimg src=images/remove.gif border=0
alt=remove /

anyone know why this would be happening?
thanks


[jQuery] select dropdown with icons

2008-06-25 Thread paulp75

Is it possible to replace a select box with custom html at all.
I'm sure I've seen a jquery script that will do it, but can't find it
after looking for 3 hours.

can anyone help?

basically i want a select menu in a form, and when you click it to
drop down, i'd like
{icon} - option name
{icon} - option name

etc.



[jQuery] Re: nyromodal and livequery

2008-05-10 Thread paulp75

looks like i got it worked out now.
If anyone wants to know

$(.nyroModal).livequery('click',function(e) {
e.preventDefault();
$(this).nyroModalManual(
);
return false;});

is how you do it.

Great script by the look of it


[jQuery] nyromodal and livequery

2008-05-09 Thread paulp75

Hey there, I just checked out nyromodal, and it looks pretty cool.
I just wanted to know if it was possible to use it with livequery, so
that i can use it after an ajax request.

ie i do a search and the results of that search are put into the
#content container.
then I would like to be able to click a link in that and set it up
with a nyromodal.

thanks for any help.


[jQuery] nyromodal and livequery

2008-05-09 Thread paulp75

I tried to add a post previously but it didnt show up for some reason.

Is it possible to use nyromodal with livequery. I was taking a look at
nyromodal and it looks great, but need to use it after another ajax
call.

Does anyone know how I would do this?

thanks
Paul


[jQuery] Re: Problem using livequery jquery.form and simplemodal together

2008-05-07 Thread paulp75

still getting used to google groups here. thought i posted a reply
yesterday but it didnt show up here.
options is set with

var options = {
target:'#fastcart'   // target element(s) to be
updated with server response
};

thanks for your reply.


[jQuery] Problem using livequery jquery.form and simplemodal together

2008-05-06 Thread paulp75

Ok I have a set of results from a search, and for each record in the
result set, there is a form built.
When they click add to cart, i would like it to have a warning, to
check the measurements before ordering, to double check they are
ordering the right product, then when they click ok, it will add it to
the cart via jquery.form, when they click cancel it shouldnt add it.

but this is what actually occurs. when first clicking add to cart, the
confirmation modal pops up, click ok, and nothing happens. then if you
add another item, both the second and first items appear in the
shopping cart, but this occurs before clicking ok though. so the
confirmation essentially does not work.
if you click cancel then the product is still added.
this is the code for clicking the add button.

$(.ajaxadd).livequery('submit',function (e) {
e.preventDefault();

// example of calling the confirm function
// you must use a callback function to perform the yes action
confirm(Please check measurements, function (e) {


$('.ajaxadd').ajaxForm(options);
return false;
});


and this is the code for the function to pop up the modal, and make
the person confirm their product.

function confirm(message, callback) {
$('#confirm').modal({
close:false,
overlayId:'confirmModalOverlay',
containerId:'confirmModalContainer',
onShow: function (dialog) {
dialog.data.find('.message').append(message);

// if the user clicks yes
dialog.data.find('.yes').click(function () {
// call the callback
if ($.isFunction(callback)) {
callback.apply();
}
// close the dialog
$.modal.close();
});
}
});
}


any help on this would be great. thank you
});


[jQuery] Assign a confirmation box when clicking inside of a bound event

2007-10-25 Thread paulp75

When i do a search it comes up with the results with this method

$(function() {  var options = {
target:'#searchresults'   // target element(s) to be
updated with server response
};
// bind form using 'ajaxForm'
$('#form1').ajaxForm(options);


after this call, i want the option to delete products from the
database, but i'm only able to do this at this stage without any sort
of confirmation which can be quite dangerous as I could lose important
information.

this is my current code, to allow me to do this after the search call,
within the results.

$('#searchresults').bind('click',function(event){
if($(event.target).is('.deleteproduct'))
{
 $('.deleteproduct').click(function(){
$.post(jqjobdelete.php, { jobid: this.id } );
$(this).parents(tr).fadeOut(500);return false;
   });
}

});


How would I be able to have this delete only take place after a
confirmation message such as Are you sure?

thanks for any help