EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: omid on January 14, 2014, 12:55:35 AM



Title: how to open page in window ?
Post by: omid on January 14, 2014, 12:55:35 AM
i want open new page in window , and select item from this page and pass value to parent page

please help me

thanks


Title: Re: how to open page in window ?
Post by: stworthy on January 14, 2014, 01:28:30 AM
Please try to use the easyui window to display another page content. It is easy to retrieve information from that window.


Title: Re: how to open page in window ?
Post by: omid on January 14, 2014, 08:54:53 AM
sorry , in demo and documentation i dont find this sample , please send a Help link

thanks


Title: Re: how to open page in window ?
Post by: omid on January 15, 2014, 02:23:45 PM
Code:
<input id="Text1" type="text" />
                        <a href="javascript:void(0)" class="easyui-linkbutton" onclick="showHelp()">Open</a>
                        <div id="dd" data-options="buttons:'#bb'"></div>
                        <div id="bb">
                            <a href="#" class="easyui-linkbutton" onclick="javascript:alert('select')">Select</a>
                            <a href="#" class="easyui-linkbutton">Close</a>
                        </div>


Code:
function showHelp() {
     
        $('#dd').dialog({
            title: 'select user',
            width: 700,
            height: 300,
            closed: false,
            cache: false,
            href: 'userList.htm',
            modal: true
        });     



i can open in dialog any page at least .
please help in my case
"i can't select item from userlist.htm and colse dialog and then fill Text1 by selected user like lookup moadl form "

thanks


Title: Re: how to open page in window ?
Post by: omid on January 15, 2014, 02:55:10 PM
selectuser.htm
Code:
<h2>SelectUser</h2>
<input id="item" type="text" value="omid">

in Parent file i use this script
Code:
function SelectUser() {        
        var a = $('#item').val();
        $('#Text1').val(a)
        $('#dd').dialog('close')
    }


and <a> selectUser change to
Code:
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="javascript: SelectUser()">Select</a>


it's work correctly

thanks