显示在任何网站上使用按钮模式JS对话框 [英] Show modal JS dialog on any site using button

查看:114
本文介绍了显示在任何网站上使用按钮模式JS对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要某种形式的提醒,如何使用技术来实现以下功能:

I need some kind of advise, how to use technologies to achieve following functionality:

所以,一些在他的站点网络开发这块地方code的,像这样的:

So, some web-developer place piece of code on his site, like this:

<script src="http://mydomain/Scripts/LoadDialog" type="text/javascript"></script>
<img src="http://mydomain.com/image"
 onclick="window.ShowModalDialog(someArgs, **UserID**);" />

在图像按钮,用户pressing,有会出现服务器的呼叫,并根据
用户ID服务器将返回的内容。作为一种服务器端技术拟使用ASP.NET MVC。在前端侧将JavaScript和jQuery的。

When user pressing on image button, there is server call occurs, and depending on userID server will return content. As a server side technology is planed to use ASP.NET MVC. On front-end side will be JavaScript and jQuery.

请让我还是知道的请,如果你知道如何才能实现在那里我可以从启动。

Please let me know please if you know how it can be achieved or where I can start from.

推荐答案

我重新发布我的回答只是为了帮助其他面临类似的问题,因为你的previous线程关闭这一个重复,并自前阵子我也努力寻找发展第三方小部件的最佳来源。

I'm re-posting my answer just to help others facing similar problems, since your previous thread is closed as duplicate of this one, and since a while back I also struggled to find the best sources for developing third-party widgets.

至于说,你最需要的是在描述:

As said, most of what you need is described in:

http://alexmarandon.com/articles/web_widget_jquery/

博客文章是的那些选择了jQuery的作为他们的首选JavaScript库特别有用,因为它显示了如何逃脱的情况下,冲突不同版本的jQuery已经是present。

Blog entry is especially useful for the ones opting for jQuery as JavaScript library of their choice, as it shows how to escape conflicts in case a different jQuery version is already present.

主要挑战,你将面临你的任务是让周围的浏览器的同源策略,有你被卡住或者IFRAME或JSON-P。你应该选择JSON-P,以及关于你的好,简洁的教程可以阅读:

Main challenges you will face on your task are getting around browsers same origin policy, and there you are stuck with either IFRAME or JSON-P. You should opt for JSON-P, and a good and concise tutorial about you can read at:

http://java.sun.com/developer/technicalArticles/J2EE/mashup_2 /

不要担心,这是一个有点中心围绕Java,一切都会一清二楚你。要回答你的问题,是的,我在发展第三方小部件的一些经验,可以随意问我,当你遇到一些问题,所有的最好的。

Don't worry that it is a centered somewhat around JAVA, everything will be crystal clear for you. To answer your question, yes, I have some experience in developing third-party widgets, so feel free to ask me whenever you encounter some problems, all best

这篇关于显示在任何网站上使用按钮模式JS对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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