EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
March 28, 2024, 09:34:01 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
Access Datagrid in iframe
Pages: [
1
]
« previous
next »
Print
Author
Topic: Access Datagrid in iframe (Read 5012 times)
sky-t
Full Member
Posts: 145
Access Datagrid in iframe
«
on:
May 20, 2017, 12:24:46 AM »
I want to append / delete rows in a datagrid that is located in an iframe.
I cann access and manipulate other dom objects in that iframe but not the datagrid
Code:
var table_cc=$("#iframe").contents().find("#dg");
if (table_cc != undefined) {
console.log(table_cc);
table_cc.datagrid('appendRow',{
name: 'from socket',
code: 'inforo'
});
}
How can we solve this?
Logged
sky-t
Full Member
Posts: 145
Re: Access Datagrid in iframe
«
Reply #1 on:
May 21, 2017, 09:25:00 PM »
any ideas?
Logged
jarry
Administrator
Hero Member
Posts: 2260
Re: Access Datagrid in iframe
«
Reply #2 on:
May 22, 2017, 06:33:28 PM »
Define a function in your iframe.
Code:
function appendRow(){
$('#dg').datagrid('appendRow', {
name:'from socket',
code:'inforo'
})
}
And then call this function in your top window.
Code:
window.frames['iframe'].appendRow();
Logged
sky-t
Full Member
Posts: 145
Re: Access Datagrid in iframe
«
Reply #3 on:
May 22, 2017, 10:28:21 PM »
Hi jarry,
this is working! Thank you so much!!!
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...