在任何网站上显示JS(jQuery的)部件,与ASP.NET MVC服务器端 [英] Show JS(jQuery) widget on any site, with ASP.NET MVC server side

查看:159
本文介绍了在任何网站上显示JS(jQuery的)部件,与ASP.NET MVC服务器端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
  使用按钮显示在任何网站上的模态对话框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的。
请让我还是知道的请,如果你知道如何可以achived在那里我可以从启动。

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 achived or where I can start from.

注意:一般来说,这些code应该放在想要什么用户网站

NOTE: Generally, these code should be placed on a site what user wants.

推荐答案

看看下面的博客文章,这对我帮助很大,同时开发类似的东西。

Check out the following blog entry, it helped me a great deal while developing something similar

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

在一般情况下,你的关键字是动态的,JavaScript和CSS加载,并且能够让在发送AJAX请求围绕​​浏览器的同源策略获得JSON-P

In general, keywords for you are dynamic javascript and css loading and JSON-P that enables getting around browser's same origin policy while sending AJAX requests.

这篇关于在任何网站上显示JS(jQuery的)部件,与ASP.NET MVC服务器端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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