PDA

View Full Version : Probably a basic Question..



Fredric Berling
28 Apr 2008, 5:39 AM
Im faar inside a tabbed interface i

jratcliff
28 Apr 2008, 6:25 PM
So, are you wanting the agent to send back to the browser the appropriate code to close the tab after a form/doc has been submitted? Or, are you calling your javascript code from within the form/doc currently displayed to the user?

Fredric Berling
28 Apr 2008, 11:16 PM
My webquerysave agent prints HTML with javascript to the browser. The code runs and i did something very similar in the Ext1 alpha.

This is the old function for Alpha 1

f
unction refreshPage(region, pid, newpid, link, title) {
var reg = layout.getRegion(region);
if (reg.hasPanel(pid)) {
reg.remove(pid);
var iframe = YAHOO.ext.DomHelper.append(document.body, {tag: 'iframe', frameBorder: 0, src: link, id: newpid, name: newpid});
var p = layout.add(region, new YAHOO.ext.ContentPanel(iframe, {title: title, fitToFrame:true, closable:true}));
}
return false;
}
//The calling code from WQS Agent was
Print|parent.refreshPage('center', '|+DocObj.Note.fdDocumentKey(0)+|','|+DocObj.Note.fdDocumentKey(0)+|','|+"./0/" & DocObj.Note.universalID & "?EditDocument&SAVED=1"+|', '|+DocObj.note.fdProductsheetName(0)+|');|




Im trying to achive the same in Beta1 (Ext2) but things like "getPanel" doesnt exist anymore. i Also have problems just grabbing the actual layout . As i described in my first post.


I have so far been trying to remove the panel, and is planning on opening it after that. Thi sis my remove function, but it fail ssilently. Panel is not removed

function removepanel(id){
window.top.ExtndApp.ui.tabPanel.remove(id, false)
}

Fredric Berling
28 Apr 2008, 11:40 PM
Ok.sorry guys...my wrong... i forgot i prefixed my panel id