English 中文(简体)
利用javascript功能更新协会的风格。 净额
原标题:Using javascript function to updates styles in ASP.Net

因此,我有一张银灯4,与两条旗帜坐在一页。 根据银灯的一些变数,我需要展示一种旗帜,重新定位银灯,使之与旗帜的底线一致。 为了做到这一点,我一直在使用HtmlPage。 Window. Invoke(“MethodToShowThe BannerIWant”)。 每一条旗帜都有自己的功能,试图展示正确的旗帜,使照相机适当行。 类似于

  function ShowFirstBanner() {
        FirstBannerStyle.style.display =  block ;
        SilverlightAppStyle.style.marginTop =  120px ;
        SilverlightAppStyle.style.height =  495px ;
    }

Each banner looks like

   <table id="FirstBannerStyle"  style="position:absolute;top:0px;left:0px;display:none;height:50px;" width=100% border="0" cellpadding="0">
<tr> 
  <td><img src="http://www.bannerimageurl.jpg" usemap="#Map2" border="0"></td> </table>

地图

  <map name="Map2"><area shape="poly" coords="763,19,769,91,985,92,981,69" href="http://www.xxxxxxx.com/cal.htm" target="_self" />
         <area shape="rect" coords="11,73,88,89" href="http://www.xxxxxxx.com/index.htm" target="_self">
         <area shape="rect" coords="121,70,186,88" href="http://www.xxxxxxx.com/courses.htm" target="_self">
         <area shape="rect" coords="217,70,327,90" href="http://www.xxxxxxx.com/ts.htm">
         <area shape="rect" coords="365,70,521,91" href="http://www.xxxxxxx.com/po.htm">
         <area shape="rect" coords="556,71,618,91" href="http://www.xxxxxxxx.com/au.htm" target="_self">
         <area shape="rect" coords="655,72,726,91" href="http://www.xxxxxxx.com/CU/index.htm" target="_self">
      </map>

和银光灯一样。

  <form id="form1" runat="server" style="height:100%">
<div id="silverlightControlHost" style="height:100%;text-align:center">
    <object data="data:application/x-silverlight-2,"  type="application/x-silverlight-2" width="100%" height="100%">
      <param name="source" value="ClientBin/XXX.XXX.XXX.xap"/>
      <param name="onError" value="onSilverlightError" />
      <param name="background" value="white" />
      <param name="minRuntimeVersion" value="4.0.50826.0" />
      <param name="autoUpgrade" value="true" />
      <param name="InitParams" value=<%=System.Configuration.ConfigurationManager.AppSettings.GetValues(0).FirstOrDefault()%>/>
      <param name="windowless" value="true" />
      <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0" style="text-decoration:none">
          <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
      </a>
    </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>

 <div id="InvisibleFrame"></div>    
</form>        

我面临的问题是,这一进程在8国集团中发挥了巨大作用,但在IE9 或IE9 则根本没有工作。 我的法典击中HtmlPage。 Window.Invoke(“ShowFirst Banner”) 在那里获得 st权,从来不走这条线,但没有任何错误的信息,而是无限期地等待该指挥部完成。 如果我评论一下该守则的功能,它就会发出呼吁,并且保持正常。 因此,一些东西涉及Im如何更新Peoples和IE9等。 任何人都有这样做的方法的想法,这种方式将在所有浏览器中发挥作用?

最佳回答

在 your文中界定的“第一班车”和“SilverlightAppStyle”在哪里?

你们需要抓住这个要素。 ID:

document.getElementById( FirstBannerStyle ).style.display =  block ;

或如果你重新使用 j子:

$( FirstBannerStyle ).show()
问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签