使用弹出窗口jquery-ui时如何调用其他页面的功能 [英] How to call function other page when use popup jquery-ui

查看:76
本文介绍了使用弹出窗口jquery-ui时如何调用其他页面的功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家每页我有2页是page1.aspx和page2.aspx。我在page1中创建了一个buttion,使用Jquery UI弹出page2.aspx

Hi every one I have 2 page are page1.aspx and page2.aspx. I create a create a buttion in page1 use Jquery UI to popup page2.aspx

var $advance_add = $('<div></div>').
           html('<iframe id="myFrame" width="100%" height="100%" frameborder="0" src="App_form/Default.aspx" marginwidth="0" marginheight="0"></iframe>')
        .dialog({
            autoOpen: false,
            bgiframe: true,
            width: 650,
            minWidth: 650,
            height: 550,
            closeOnEscape: true,
            modal: true,
            title: 'Theem mowis',
        });





in Page 1 a have action javascript





in Page 1 a have a fuction javascript

function abc(val) {
           alert("haha");
       }





我想在show popup page2.aspx。 a将在页面中调用functioon abc





i wanna when show popup page2.aspx. a will call functioon abc in page as

function abcd()
        {
           
            abc("akc");
        }





但不起作用。



谢谢支持



but it not work.

thanks to support

推荐答案

advance_add =
advance_add =


' < DIV>< / DIV>')。
html(' < iframe id =myFramewidth =100%height =100% frameborder =0src =App_form / Default.aspxmarginwidth =0marginheight =0>< / iframe>'
.dialog({
autoOpen: false
bgiframe: true
width: 650
minWidth: 650
height: 550
closeOnEscape: true
modal: true
title:' Theem mowis'
});
('<div></div>'). html('<iframe id="myFrame" width="100%" height="100%" frameborder="0" src="App_form/Default.aspx" marginwidth="0" marginheight="0"></iframe>') .dialog({ autoOpen: false, bgiframe: true, width: 650, minWidth: 650, height: 550, closeOnEscape: true, modal: true, title: 'Theem mowis', });





in Page 1 a have action javascript





in Page 1 a have a fuction javascript

function abc(val) {
           alert("haha");
       }





我想在show popup page2.aspx。 a将在页面中调用functioon abc





i wanna when show popup page2.aspx. a will call functioon abc in page as

function abcd()
        {
           
            abc("akc");
        }





但不起作用。



谢谢支持



but it not work.

thanks to support


您好,您对iframe有特殊需求吗?最好的方法是在页面上加载弹出窗口。

以下是方式

Page1.aspx

Hi, do you have special need for iframe? Best way is to load a page a display a popup.
Below is the way
Page1.aspx
<input id="Button1" type="button" value="button" />
<div id="popupdiv" style="display:none;" />
<script type="text/javascript" language="javascript">


这篇关于使用弹出窗口jquery-ui时如何调用其他页面的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆