Forgive the complete newbie question here - I know this is really basic stuff, but for the life of me I can't figure it out. Javascript is relatively new to me, and this is the first time I've had to do this particular thing.
So, I'm trying to use a Modal to open an iframe - the page itself will have links to several modals, all of which need to be passed a different value. Rather than hardcode each of these, I'm trying to set it up in such a way that one function can be used and the links can pass the values as required.
The code I currently have successfully opens the modal, but a 404 error is inside it - plus the modal title shows + title + - so I guess I'm referencing it wrong (probably in the function?).
Heres what I've got, pointers in the right direction would be appreciated!
function openIframe(title,url){
$.modal({
title: '+title+',
url: '+url+',
useIframe: true,
width: 600,
height: 400
});
}
.. and the link:
<a href="#" onclick="openIframe('Process Voucher','a_processvoucher.cfm')">Add</a>