`

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. ...

    UNEXPECTED INCONSISTENCY: RUN fsck MANUALLY

    "UNEXPECTED INCONSISTENCY: RUN fsck MANUALLY" 是一个常见的错误消息,它出现在Linux操作系统中,尤其是在系统突然关机或非正常关闭后。这个错误表明文件系统(File System)存在一致性问题,需要进行检查和修复。...

    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)

    LabVIEW Machine Learning Toolkit Manually Install

    接下来,下载“Machine Learning Toolkit Manually Install”压缩包。解压后,你会看到包含若干文件和文件夹的结构,其中可能有以下关键组件: 1. **.vi(VI)文件**:这是LabVIEW中的虚拟仪器,包含了具体的功能或...

    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...

    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

    Fix_Damaged_FAT_Manually.rar_Damaged

    标题 "Fix_Damaged_FAT_Manually.rar_Damaged" 暗示了这是一个关于手动修复损坏FAT(File Allocation Table)的教程。FAT是早期Windows操作系统中用于管理磁盘存储的一种文件系统。当FAT出现问题时,可能会导致数据...

    Fix_Damaged_FAT_Manually.zip_Damaged

    标题 "Fix_Damaged_FAT_Manually.zip_Damaged" 暗示了这是一个关于手动修复损坏FAT(File Allocation Table)的教程。FAT是MS-DOS、Windows以及其他一些操作系统中用于管理磁盘上的文件存储的一种文件系统。描述 ...

    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 ...

    manually_labeled_faces_and_mask-weared_faces_datas_face_mask_d

    manually_labeled_faces_and_mask-weared_faces_datas_face_mask_dataset

    手动扩展外部中断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 ...

    Text Generation from Knowledge Graphs with Graph Transformers.pdf

    but these representations are prohibitively expensive to manually produce.

Global site tag (gtag.js) - Google Analytics