I need to open an iframe (Frame 1) and from frame1 i need to open frame2 using jquery colorbox.
I have used the following script from a page to open frame1:
function ViewUser(Id) {
$.colorbox({ href: '/user/View/' + Id + '?popup=1', iframe: true, width: "100%", height: "100%", title: 'View User', overlayClose: false, escKey: false, onLoad: function() { $('#cboxClose').hide() }, onComplete: function() { $('#cboxClose').show() } });
}
I have added the following script from frame1 to open frame2, but its not opening the page (just opens a blank colorbox).
function UpdateUser(Id) {
parent.$.colorbox.close();
parent.$.colorbox({ href: '/User/Update/' + Id + '?popup=1', iframe: true, width: "100%", height: "100%", title: 'Update User', overlayClose: false, escKey: false, onLoad: function() { $('#cboxClose').hide() }, onComplete: function() { $('#cboxClose').show() } });
}
Am i missing anything here?