`

manually access spry layout panel generated from Dreamweaver

阅读更多

打开Dreamweaver,依次选择“插入”-->“布局对象”-->“Spry选项卡式面板”。将会自动生成下面的代码:

......

<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="TabbedPanels1" class="TabbedPanels">
  <ul class="TabbedPanelsTabGroup">
    <li class="TabbedPanelsTab" tabindex="0">标签 1</li>
    <li class="TabbedPanelsTab" tabindex="0">标签 2</li>
  </ul>
  <div class="TabbedPanelsContentGroup">
    <div class="TabbedPanelsContent">内容 1</div>
    <div class="TabbedPanelsContent">内容 2</div>
  </div>
</div>
<script type="text/javascript">

 

//如果想手动设置显示哪个选项卡(索引从0开始)以及满足某些条件时候disabled指定选项卡,可以参考下面代码:

 

var tabbedPanels = new Spry.Widget.TabbedPanels("TabbedPanels1");

var tabbedPanelsFlag= '${tabbedPanelsFlag}';

if(tabbedPanelsFlag==1){

tabbedPanels .showPanel(1);

}

var copy = '${actionBean.params.copy}';

if(copy=="copy"){

//$(MasterTabbedPanels.getTabs()[1]).click(function(){//not IE

//MasterTabbedPanels.showPanel(0);

$(".submitMaster").attr("style","display:none;");

$(tabbedPanels .getTabs()[1]).attr("disabled","disabled");//IE

//});

}

 

 

如果在选项卡中的页面想访问iframe中的元素,可以参考下面代码:

/*JSP中iframe代码片段:

 

<iframe src="demo.action?detail=&conditionParams.id=${sessionScope.IdForIframe }"  id="RefIframeId" name="RefIframeId" width="103%" marginwidth="0" marginheight="0" height="950px" frameborder="0" scrolling="yes"></iframe>

*/  

var verificationResultTabbedPanels = new Spry.Widget.TabbedPanels("verificationResultTabbedPanels");

$(function(){

$(verificationResultTabbedPanels.getTabs()[1]).bind("click",function(){

var $iframeObj = $(window.frames["RefIframeId"].document);

  var clearItems = ["#menu","#welcome","#title",".buttonBarDiv",".midBtnDiv","#useCancel"];

    $.each(clearItems,function(index,data){

    $iframeObj.find(data).html("");

    });

});

})


</script>

分享到:
评论

相关推荐

    eclipse常见故障处理

    Android常见故障处理 1.导入源代码时出现“Unable to resolve target 'android-7' 2. eclipse导入工程中文乱码问题 3. R.java was modified manually! Reverting to generated version!

    Oracle.Data.Access.Components.v6.80.0.47.FS.forD5-D2009.rar

    Oracle.Data.Access.Components.v6.80.0.47.FS.forD5-D2009 Oracle Data Access Components Source Code Copyright 1997-2009, Devart. All Rights Reserved If you want that the odacvcl package does not ...

    Solution for Designer error when opening WorldWind.cs in WW1.4.0

    When I load the WW ... The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again. ...

    ARIS UPDATE COOKBOOK Manually updating ARIS-12页

    ARIS UPDATE COOKBOOK Manually updating ARIS

    Fix_Damaged_FAT_Manually.rar_Damaged

    How To Fix Damaged FAT Manually

    Fix_Damaged_FAT_Manually.zip_Damaged

    How To Fix Damaged FAT Manually

    UNEXPECTED INCONSISTENCY: RUN fsck MANUALLY

    主要介绍了UNEXPECTED INCONSISTENCY: RUN fsck MANUALLY,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

    The COREL Database for Content based Image Retrieval

    We manually divided 10,800 images from the Corel Photo Gallery into 80 concept groups, e.g., autumn, aviation, bonsai, castle, cloud, dog, elephant, iceberg, primates, ship, stalactite, steam-engine, ...

    Manually Cloning Oracle Applications Release 11i with 10g or 11g

    Manually Cloning Oracle Applications Release 11i with 10g or 11g RAC (Doc ID 760637.1)

    Houdini12_5keygenByFlipMoneky.exe

    Copy paste the keys you generated, 5 by 5 . Key string #1 should be SERVER your_server_name server_code ..... NB : Install the "other keys to play with" at your own risk, those are mainly for dev...

    Crystal Impact Match!2.1.3 试用延长

    The user database patterns can be edited manually, imported from peak files, calculated from crystal structure data (e.g. CIF files), or imported from your colleague's user database. A list of Match!...

    Sublime Text 3 (Build 3143)

    3.0 (BUILD 3143) 13 September 2017 See also the Announcement Post Refreshed UI theme, including full high ... This can be manually controlled via the index_workers setting API: Updated OpenSSL to 1.0.2i

    CATIA 板金设计详细教程

    Manually Creating Bends from Walls Generating Bends Automatically Creating Conical Bends Bends From Line Creating Swept Walls Creating a Flange Creating a Hem Creating a Tear Drop Creating a Swept ...

    Json.NET 6.0 R3 For.NET(2.0-4.5)

    Json.NET Json.NET is a popular ... you don't have a class to serialize or deserialize to, or the JSON is radically different from your class and you need to manually read and write from your objects.

    .net Newtonsoft.Json 4.0 release

    you don't have a class to serialize or deserialize to, or the JSON is radically different from your class and you need to manually read and write from your objects. LINQ to JSON allows you to easily ...

    Json NET 6 0 R8 For NET 2 0 4 5

    t have a class to serialize or deserialize to, or the JSON is radically different from your class and you need to manually read and write from your objects."&gt;Json.NET is a popular high-performance ...

    手动扩展外部中断INT0

    INT1~KK2 -Manually extend the external interrupt INT0, INT1, when INT0 interrupt generated when so LED8 bright, blinking out 4 times when INT1 generated interruption, so that LED display from right ...

    NGUI Next-Gen UI 3.0.7 f1.unitypackage

    - NEW: Created a new layout system. All widgets and panels can now anchor to each other, the screen, and even 3D game objects. - NEW: You can now create resizable scroll views and anchor them to UI ...

    Beginning_Joomla__From_Novice_to_Professional

    page, you’ll be able to make Joomla do almost anything that a manually designed web site can do—and in a fraction of the time. Before we get started, let’s take a quick glance at what makes Joomla ...

Global site tag (gtag.js) - Google Analytics