开发者

Accessing form variables in a dynamic dijit.dialog (content of which is from href)

开发者 https://www.devze.com 2023-01-06 08:36 出处:网络
I have the following code to create a dijit.diagram which loads a form from an external link: function openDialog(userID)

I have the following code to create a dijit.diagram which loads a form from an external link:

function openDialog(userID)
{ 
    composeDialog = new dijit.Dialog({
        id: 'composeDialog',
        title: 'Compose a Message', 
        style: 'width: 400px',
        href: 'myform.php?userID='+userID
    });
    composeDialog.show();
}

Now inside my href I have a form that asks the user for several pieces of information, but I am unable to access any of the values. Also if the form is actually submitted, then the user is re-directed to the proper page but none of the variables are passed along. When I try to access my form with dijit.byId('myform') all I get is a n开发者_StackOverflow社区ull object. Does anybody have any idea?

Thank you very much!


Javascript is not executed in dijit.Dialog. Use dojox.widget.DialogSimple instead. See this reference

Then, pass the values of the form from the dialog to the page using javascript.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号