Hi everyone
I'm really trying to get to grips with the jQuery syntax here, and I'm
struggling to work things out. I know basic form validation/alert JS
but this is quite different. I hope someone can help me out here.
I have a table with a list of contacts, and each row has a button
which is designed to delete the contact.
Here's an example of the button:
<a href="javascript:contact_del('1234', 'blah contact name');"><img
src="/img/delete_small.gif" alt="" title="Delete Contact" border="0" /
></a>
So when pressed a regular (non-jquery) function of contact_del is run.
Here's the function code:
// DELETE CONTACT CONFIRM
function contact_del(contactid,contactname) {
var confirm_contact_del = confirm("Delete contact...\n
\n"+contactname);
if (confirm_contact_del) {
window.location='/contact_del.php?contact_id='+contactid;
} else {
// DO NOTHING
}
}
I've got a demo set up here (ignore the tabs stuff, that's something
else)
http://thenetzone.co.uk/demo/ietest.html
The first problem I've got is that the dialog text is showing up on my
page when it loads, but I only want it displayed when a Delete Contact
link is clicked.
The second problem is I would like to have the contact name passed as
the 2nd param of my contact_del function, displayed within the dialog
when it appears. Displayed within the <span element with
id=contact_del_dialog_contact_name
If you take a look at the demo, you'll get a better idea of what I'm
looking for. And also you'll instantly see why it's not working (I
don't really know what I'm doing with jQuery!)
Anyone got any ideas on this?
Or am I going about this the wrong way?
Thanks, B
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---