EasyUI Forum
June 26, 2024, 06:30:18 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How can get the window href url parameters?  (Read 7529 times)
frankgao
Jr. Member
**
Posts: 53


View Profile Email
« on: October 12, 2015, 06:56:23 PM »

Two pages.
Such as 'A.html' and 'B.html',
A.html have a windows div, the id name is 'emwindows'. when I click the button.
The 'B.html' popup, I want to get the B.html url parameters on B.html.
How can do it?

Code:
<a href="#" class="easyui-linkbutton" style="width:20px;height:20px;" onclick="dlgEmploye()">...</a>

<div id="emwindows" class="easyui-window" closed="true" title="My Window" style="width:0px;height:0px"></div>

function dlgEmploye() {
    $("#emwindows").empty();
    var $win;
    $win = $("#emwindows").window({
        width: 700,
        height: 500,
        modal: true,
        href: 'B.html?formid=abc&pmodel=id_name&cid=xyz&cname=123',
        title: 'Choice',
        collapsible: false,
        maximizable: true,
        minimizable: false,
        onResize: function () {
            $(this).window('center');
        }
    });
    $win.window('open');
}

Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: October 13, 2015, 07:44:30 PM »

You can call 'options' method of window to get the 'href' property value in your 'B.html' page.
Code:
<button onclick="alert(getHref())">test</button>
<script>
function getHref(){
var opts = $('#emwindows').window('options');
return opts.href;
}
</script>
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!