Contribute Repeat Region JavaScript Error
When one of our end users attempts to edit a page in
Contribute (CS3) using Repeat Regions. The '+' and '-' buttons
don't work, and when she tries to use the arrow keys, she gets the
following error message:
While executing onLoad in MoveRepeatEntry.htm, the following
JavaScript error(s) occurred:
At line 2912 of file "C:\Program Files\Adobe\Adobe Contribute
CS3\Configuration\Shared\MM\Scripts\CMN\TemplateUtils.js":
setSelectedNode: Argument number 1 is invalid.
Has anyone had this error and resolved it? Thanks!
Cliff
Nevermind it worked i don't know how...
Similar Messages
-
Dreamweaver CS6 Repeat Region Selection Error
I have recently used Repeat Region many times, but this time an error started showing up:
"Before inserting this item, make a selection on the page."
I already made the selection but the problem continues.
I restarted Dreamweaver and the computer but nothing happened.Nevermind it worked i don't know how...
-
Repeating regions not working in Contribute 6.5
Repeating regions that work inside Dreamweaver aren't working in Contribute 6.5 where I get the error message "You can't add items to repeating regions because the draft's parent template is missing or not available to users in your role. Please contact the website administrator"
My role is administrator and this happens on pages based on single templates and nested templates as well as local files and pages published on a site.
The problem seems to run through several different versions of Contribute going back at least 5 years but I haven't found a solution yet.For me the problem is different. I don't even get to to see the add/delete buttons, so I can not add och delete a new region! I am tryong to chat with the adobe support right now, but I am not feeling very succesful. Is anyone from Adobe reading this? (It is working in CS5)
-
Contribute - javascript error on using InsertRepeatEntry
Hey all,
I currently have several templates using repeating elements
(TemplateBeginRepeat). Up until now they have worked as expected.
However, recently one of my users has had javascript errors that
seem to be stemming from the use of this template element.
When trying to add a repeatable element (hitting the "+"
sign) she gets the following error:
quote:
Contribute
While executing onLoad in InsertRepeatEntry.htm, the
following JavaScript error(s) occured:
In file ""InsertRepeatEntry"": ReferenceError: DoCommand is
not defined.
Nothing seemed to have changed in the template at the time
this error popped up for her. She believes she may have had a
windows update in around the same time but she's not sure of the
timing.
No other users have had this issue pop up with any of the
templates, so i'm not sure what could have happened. Would a
windows update have changed anything with Contribute's javascript
settings?
Any help you could share would be most appreciated.
-NickHey all,
I currently have several templates using repeating elements
(TemplateBeginRepeat). Up until now they have worked as expected.
However, recently one of my users has had javascript errors that
seem to be stemming from the use of this template element.
When trying to add a repeatable element (hitting the "+"
sign) she gets the following error:
quote:
Contribute
While executing onLoad in InsertRepeatEntry.htm, the
following JavaScript error(s) occured:
In file ""InsertRepeatEntry"": ReferenceError: DoCommand is
not defined.
Nothing seemed to have changed in the template at the time
this error popped up for her. She believes she may have had a
windows update in around the same time but she's not sure of the
timing.
No other users have had this issue pop up with any of the
templates, so i'm not sure what could have happened. Would a
windows update have changed anything with Contribute's javascript
settings?
Any help you could share would be most appreciated.
-Nick -
Dreamweaver error on inserting an XSLT repeat region
I am getting a Dreamweaver JavaScript error message when
attempting to insert an XSLT Repeat Region under certain
circumstances in Dreamweaver 8.0.2 for Windows. I have posted a
full description on
David
Powers's friends of ED forum, but I wanted to report it here as
well for confirmation.
When creating a Repeat Region in an XSLT fragment, the
following error message appears:
While executing objetTag in XSLT_ForEach.htm, the following
JavaScript error(s) occurred: At line 502 of the file "C:\Program
Files\Macromedia\Dreamweaver
8\Configuration\Objects\Server\serverObjectsCommon.js": Type Error:
dwscripts.getBalancedSelection is not a function
This error is entirely reproducible,
but not if any PHP file has been open at any point since the
XSLT fragment was opened.
To illustrate:
0) If Dreamweaver is running, exit completely.
1) Start Dreamweaver.
2) Create a new XSLT fragment, or open an existing one.
3) In design view, place a field from an XML source into your
fragment, select it, and then try to create an XSLT repeat region.
The error message described above appears. Dismiss the error
dialog, but keep the XSLT fragment document open.
4) Create a new PHP document (or open an existing one), then
close it.
5) Back in your XSLT fragment, try again to create the repeat
region. Now it works.
If you open the PHP document
before creating the XSLT fragment, you still get the error
-- even if you leave the PHP document open. If you open the PHP
document
after you open the XSLT fragment, you do not get the error
-- even if you close the PHP document before you create the XSLT
repeat region.
It looks like
the key is to touch a PHP document at some point
after the XSLT fragment is opened. So that is the
workaround. My guess is that one of the included internal
JavaScript scripts is not being sourced until a PHP document is
opened, but this is probably not intended behavior.
-jonquote:
Originally posted by:
Newsgroup User David Powers
The only way that I know of is to disable all extensions,
make sure that
Dreamweaver is working correctly, and then enable extensions
one by one
until the error occurs again. You have then found the guilty
party. You
could also try it the other way round - disabling extensions
one by one
until it works OK. If you have recently installed a new
extension, that
may be the one to test first.
Another thing you can try is this:
You can try this to see if it solves your problem:
Close Dreamweaver.
Find C:\Documents and Settings\<username>\Application
Data\Macromedia\Dreamweaver
8\Configuration\WinFileCache-*.dat
Delete the file (it's in a hidden folder, so you need to have
enabled
the option to see hidden files and folders).
Restart DW. See if your problem has gone away.
Thanks, David.
Actually, what I was looking for was a way to trace what
Dreamweaver is doing behind the scenes -- what scripts it is
loading, and what errors those scripts throw. I had already tried
uninstalling all my extensions and deleting my entire user
configuration directory (not just the WinFileCache file), to no
avail. I also tried running the "Repair" program from the Studio
installation, but the problem persisted.
So I resorted to uninstalling and reinstalling Dreamweaver
from scratch from the original Studio 8 CD.
Amazingly, even before I applied the 8.0.2 (or 8.0.1) update or
installed any hotfixes or extensions, the same error message
appeared.
Before reinstalling, I took care to delete my user
configuration directory (actually, I deleted the entire
C:\Documents and Settings\{Username}\Application
Settings\Macromedia\Dreamweaver 8/ tree. I took care to
uninstall Dreamweaver 8 completely using the uninstall program, and
I confirmed that the
C:\Program Files\Macromedia\Dreamweaver 8\ directory was
gone before reinstalling. In the outside chance that there was a
problem with my install CD itself, I even tried installing twice --
once from the install-image Studio 8 CD I downloaded from the
Macromedia Store after upgrading from MX 2004, and once from the
official Studio 8 CD I ordered by mail afterwards.
So it's not my installation, it's not the hotfix, and it's
not any of the extensions I've installed. It's a bona-fide bug.
(What I can't figure out is why David was not able to reproduce
it.)
Next?
-jon -
Contribute Acting strange - template parameters with repeating regions
Basically what I'm trying to achieve is that there is a
repeating region on a page, and each region is supposed to
alternate colors. To achieve this, the regions with the colors are
put into a div which has a background color applied to it. To do
this, I have created two expressions, one to check to see if it's
an even numbered region, and if so, to open the div, and another to
close the div. That looks like this:
quote:
<!-- TemplateBeginRepeat name="Article" -->
@@((_index & 1) ? shade : noshade )@@
stuff
@@((_index & 1) ? shadeend : noshade )@@
<!-- TemplateEndRepeat -->
At the top, I have three template parameters to go along with
these:
quote:
<!-- TemplateParam name="shade" type="text"
value="<div>" -->
<!-- TemplateParam name="shadeend" type="text"
value="</div>" -->
<!-- TemplateParam name="noshade" type="text" value=""
-->
Which look like this on the actual pages:
quote:
<!-- InstanceParam name="shade" type="text"
value="<div>" -->
<!-- InstanceParam name="shadeend" type="text"
value="</div>" -->
<!-- InstanceParam name="noshade" type="text" value=""
-->
The odd thing is that, when I add an editable region,
something weird occurs with the template parameters and they end up
looking like this:
quote:
<!-- InstanceParam name="shade" type="text"
value="<div>" --><!-- InstanceParam
name="shadeend" type="text" value="</div>"
-->->
<!-- InstanceParam name="noshade" type="text" value=""
-->
And that, of course, results in having a nice "->" showing
up at the top of my page. The repeating region appears to work. It
changes background colors just like it should, but I have no idea
why it's throwing in the "->" at the end.For grins, try changing this -
<div id="content1" style="display:none">
to this (IN THE TEMPLATE FILE) -
<div id="content@@(_repeat._index)@@''
style="display:none">
(that should be a " character after the last @ sign - I had
to use two '
characters to keep the code from getting munged in my
newsreader)
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"Murray *ACE*" <[email protected]> wrote
in message
news:g2m3cq$85h$[email protected]..
>I need to see the template markup around the repeating
region, please.
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
> ==================
>
>
> "ITLogic" <[email protected]> wrote in
message
> news:g2m25n$6se$[email protected]..
>> Sure. I'm using DW CS3. Here is a copy of the
repeating regions I'm
>> trying to
>> create. Notice each DIV has a sequential ID. I could
go hand edit this,
>> but I'm
>> trying to automate it as much as possible. I am
selling Contribute as a
>> means
>> for clients to edit their own content. Most don't
know how to spell HTML
>> much
>> less know how to use it.
>>
>> <div id="content0" style="display:''">
>>
>> <!-- ADD TICKER's CONTENT #1
HERE--------------------->
>>
>> <p>Hello</p>
>>
>> <!-- END CONTENT #1----------------->
>>
>> </div>
>>
>> <div id="content1" style="display:none">
>>
>> <!-- ADD TICKER's CONTENT #2
HERE--------------------->
>>
>> <p>World</p>
>>
>> <!-- END CONTENT #2----------------->
>>
>> </div>
>>
> -
Repeat regions not working in Contribute
I've got a problem with repeat regions inside templated
pages. When in contribute, I can't seem to add a new repeat region
by clicking on the plus (+) button, although it works fine in
dreamweaver. It isn't a permissions issue as far as I can tell,
since all roles have the ability to see and edit all documents, but
I can't figure out what else could be going on here. Any
ideas?I think it's just a problem with Contribute's handling of
PHP. There was a small chunk of PHP code in a library item that had
to be removed. I was trying to save the value of a server variable
into a local variable, but had to end up putting the exact same
call in an inclue file instead. I just put the include statement
inside the library item so it showed up site-wide. The include
statement didn't do anything screwing during 'edit mode' in
Contribute, so that was the workaround. -
Ajax Region Pull - Javascript errors
Hi All,
I have tried implementing Carl Backstrom's excellent example Ajax region pull.... http://htmldb.oracle.com/pls/otn/f?p=11933:48:2576101578276736 and have been unable to get it to work. I have gone through it step by step but i still get a Javascript error relating to the function dhtml_GetReport(pThis). The error is "Object Expected on line 13" => var l_Val = html_SelectValue(pThis);
I have also included the files htmldb_html_elements.js and htmldb_get.js just in case you were wondering. We are using HTMLDB 1.6.1.00.02 if that could be the issue here.
Anyone come across this before?
Thanks.Hello,
All those examples have been built for 2.0 and above.
Carl -
I am trying to create a simple nested repeat region and I get a mismatch error. I ran a SQL trace and it seems to not be passing the key from the master table , but rather @p1 in its place. any ideas?
I am trying to create a simple nested repeat region and I get a mismatch error. I ran a SQL trace and it seems to not be passing the key from the master table , but rather @p1 in its place. any ideas?
-
Javascript errors when formating text and images in Contribute CS3
I'm using Contribute CS3 on Vista, I insert an image inside a
paragraph tag with text then align the image
ie the source code looks like this:
<p><img src="..." alt="" align="left"/>some
text</p>
I change the text in the paragraph to bold
Source code example: <p><img src="..." alt=""
align="left"/><strong>some text</strong></p>
I will get the following error messages:
1 This error appears 2 times:
"While executing DW_Text_CSS_Style canAcceptCommand in
ccText_Styles.htm, a JavaScript error occurred."
2 This error appears 2 times:
"While executing DW_Text_Bold canAcceptCommand in
Text_Style.htm, a JavaScript error occurred."
3 This error appears 3 times:
"While executing DW_Text_Italic canAcceptCommand in
Text_Style.htm, a JavaScript error occurred."
4 Next all the styles and formatting options are greyed out
but I can still publish or discard.
To be able to apply the styles and formatting in Contribute
CS3 I now need to close the application and reopen it again and be
careful not to reproduce the error.
I've also tried renaming the Configuration folder under
c:\Users\myusername\appData\Local\Adobe\Contribute CS3\ but it
hasn't worked.
We've reproduced this error on 3 similar machines in our
office all running cs3 but the bug doesn't occur when performing
the same steps in Contribute 3 or dreamweaver CS3 which is running
side by side on these machines.It might be trying to pull the image from a different
location than the image is currently stored in. Try to move the
image file to a different folder and then load. -
Javascript Error Messages in Contribute 6.5 for Mac
I'm getting all these javascript error messages whenever I launch Contribute 6.5 for mac. Anyone have any idea how I can get rid of them?
Hi There ,
Could you please confirm your MAC OS version you are using ?
Please visit the link in order to view the technical specifications of Contribute 6.5 :-
Adobe Contribute 6.5 | Tech specs
Regards ,
Ajit -
Contribute 6.5 Repeating Region
Is it possible to add a repeating region to the top of the stack instead of the bottom?
No it's not... and it looks awful. Adobe Contribute is one of the most used programs on my computer. When my other laptop died recently, I had to buy a new MacBook. So I was pretty surprised when the graphic display was highly pixelated.
Nothing like progress taking you back ten years. -
Tabbed panels repeat region in cms displays 2nd item as a block of content
Hi everyone, hope someone can help:
I have a test page live
http://aegmotorhomes.co.uk/usedtest1.php
Problem is this-
I have added a repeat region on my dreamweaver template
I use Perch CMS as my management for staff to add new items for sale on this page
I have built a tabbed panels to list the item
On my CMS it allows me to press "add another" which then adds the tabbed panels again as a new item and the staff input the details
My problem is the first item works perfect and all tabbs work fine, each item after that doesn't have tabbs and shows all content as one whole block
I think it is to do with the ID and applies the java file only to item one, thats my guess.
I have attached code below for my tabbed panels template, .js file and .css file - can anyone shed any light on this issue"
TEMPLATE
<style type="text/css">
#container1 {
width: 700px;
background-color: #E6E6E6;
border: .1em solid #999;
padding-top: 5px;
padding-right: 5px;
padding-left: 5px;
height: auto;
margin-bottom: 30px;
#item_description {
font-family: Arial, Helvetica, sans-serif;
font-size: 1.3em;
color: #333;
background-color: #FFF;
height: 30px;
border-bottom-width: .1em;
border-bottom-style: dotted;
border-bottom-color: #333;
font-weight: bold;
margin-bottom: 10px;
#price {
margin-top: 5px;
float: right;
width: 150px;
background-color: #EAEAEA;
border: 0.1em solid #CCC;
.BOLDTEXT {
font-weight: bold;
text-align: center;
color: #FFF;
.BOLDTEXT_PRICE {
color: #333;
#engine_spec {
float: left;
width: 190px;
font-family: Arial, Helvetica, sans-serif;
font-size: .75em;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
#top_price {
font-family: Arial, Helvetica, sans-serif;
font-size: 1.2em;
color: #099;
float: right;
width: 150px;
font-weight: bold;
text-align: right;
#top_price {
font-family: Arial, Helvetica, sans-serif;
font-size: 1.4em;
color: #099;
#overview_picture {
height: 150px;
width: 200px;
background-color: #CCC;
float: left;
margin-right: 10px;
margin-top: 5px;
.BOLDTEXT_blackprice {
font-family: Arial, Helvetica, sans-serif;
font-size: 1.4em;
color: #099;
#smallprint {
font-family: Arial, Helvetica, sans-serif;
font-size: .5em;
color: #666;
margin-top: 2px;
table tr td {
font-size: 0.75em;
font-family: Arial, Helvetica, sans-serif;
.specwhite {
color: #FFF;
font-family: Arial, Helvetica, sans-serif;
font-size: 1em;
font-weight: bold;
#reserve {
font-family: Arial, Helvetica, sans-serif;
font-size: 1.2em;
font-weight: bold;
color: #FFF;
background-color: #099;
width: 140px;
float: right;
margin-top: 10px;
padding: 5px;
text-align: center;
border: .1em solid #999;
</style>
<script src="../../../../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="../../../../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<div id="container1">
<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0">Overview</li>
<li class="TabbedPanelsTab" tabindex="0">Description</li>
<li class="TabbedPanelsTab" tabindex="0">Images</li>
<li class="TabbedPanelsTab" tabindex="0">Specification</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent">
<div id="item_description"><perch:content id="Title1" label="Title" type="text" />
<div id="top_price">£<perch:content id="Title2" label="Top Price" type="text" /></div>
</div>
<div id="overview_picture"><img src="<perch:content id="photo" label="Photo" type="image" />" class="photo" /></div>
<div class="engine_spec" id="engine_spec">
<table width="100%" border="0" cellpadding="5" cellspacing="7">
<tr>
<td width="35%" bgcolor="#EAEAEA">Year of Make</td>
<td width="65%" bgcolor="#999999"><strong class="spec_white"><span class="engine_spec"><span class="specwhite"><perch:content id="Title3" label="Year" type="text" /></span></span></strong></td>
</tr>
<tr>
<td bgcolor="#EAEAEA">Current Miles</td>
<td bgcolor="#999999" class="spec_white"><span class="specwhite"><perch:content id="Title4" label="Mileage" type="text" /></span></td>
</tr>
<tr>
<td bgcolor="#EAEAEA">Engine Size</td>
<td bgcolor="#999999" class="spec_white"><span class="specwhite"><perch:content id="Title5" label="Engine" type="text" /></span></td>
</tr>
<tr>
<td bgcolor="#EAEAEA">Body Colour</td>
<td bgcolor="#999999" class="spec_white"><span class="specwhite"><perch:content id="Title6" label="Colour" type="text" /></span></td>
</tr>
<tr>
<td bgcolor="#EAEAEA">Transmission</td>
<td bgcolor="#999999" class="spec_white"><span class="specwhite"><perch:content id="Title7" label="Transmission" type="text" /></span></td>
</tr>
</table>
</div>
<div id="price">
<table width="150" border="0" cellspacing="9">
<tr>
<td width="50" height="25" bgcolor="#999999" class="BOLDTEXT">WAS</td>
<td width="81" class="BOLDTEXT"><span class="BOLDTEXT_blackprice">£<perch:content id="Title8" label="Old Price" type="text" /></span></td>
</tr>
<tr>
<td height="25" bgcolor="#999999" class="BOLDTEXT">NOW</td>
<td class="BOLDTEXT"><span class="BOLDTEXT_blackprice">£<perch:content id="Title9" label="New Price" type="text" /></span></td>
</tr>
<tr>
<td height="25" bgcolor="#999999" class="BOLDTEXT">SAVE</td>
<td class="BOLDTEXT"><span class="BOLDTEXT_blackprice">£<perch:content id="Title9a" label="Save" type="text" /></span></td>
</tr>
</table>
</div>
<div id="reserve">Reserve Motorhome</div>
</div>
<div class="TabbedPanelsContent"><perch:content id="Text" label="Description" type="textarea" editor="ckeditor" html="true" /></div>
<div class="TabbedPanelsContent"><table width="650" cellspacing="5">
<tr>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
</tr>
<tr>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
</tr>
<tr>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
</tr>
<tr>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
</tr>
<tr>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
<td width="106" height="80" bgcolor="#CCCCCC"> </td>
</tr>
</table></div>
<div class="TabbedPanelsContent"><perch:content id="Text1" label="Specification" type="textarea" editor="ckeditor" html="true" /></div>
</div>
</div>
</div>
<script type="text/javascript">
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
</script>
.JS file
(function() { // BeginSpryComponent
if (typeof Spry == "undefined") window.Spry = {}; if (!Spry.Widget) Spry.Widget = {};
Spry.Widget.TabbedPanels = function(element, opts)
this.element = this.getElement(element);
this.defaultTab = 0; // Show the first panel by default.
this.tabSelectedClass = "TabbedPanelsTabSelected";
this.tabHoverClass = "TabbedPanelsTabHover";
this.tabFocusedClass = "TabbedPanelsTabFocused";
this.panelVisibleClass = "TabbedPanelsContentVisible";
this.focusElement = null;
this.hasFocus = false;
this.currentTabIndex = 0;
this.enableKeyboardNavigation = true;
this.nextPanelKeyCode = Spry.Widget.TabbedPanels.KEY_RIGHT;
this.previousPanelKeyCode = Spry.Widget.TabbedPanels.KEY_LEFT;
Spry.Widget.TabbedPanels.setOptions(this, opts);
// If the defaultTab is expressed as a number/index, convert
// it to an element.
if (typeof (this.defaultTab) == "number")
if (this.defaultTab < 0)
this.defaultTab = 0;
else
var count = this.getTabbedPanelCount();
if (this.defaultTab >= count)
this.defaultTab = (count > 1) ? (count - 1) : 0;
this.defaultTab = this.getTabs()[this.defaultTab];
// The defaultTab property is supposed to be the tab element for the tab content
// to show by default. The caller is allowed to pass in the element itself or the
// element's id, so we need to convert the current value to an element if necessary.
if (this.defaultTab)
this.defaultTab = this.getElement(this.defaultTab);
this.attachBehaviors();
Spry.Widget.TabbedPanels.prototype.getElement = function(ele)
if (ele && typeof ele == "string")
return document.getElementById(ele);
return ele;
Spry.Widget.TabbedPanels.prototype.getElementChildren = function(element)
var children = [];
var child = element.firstChild;
while (child)
if (child.nodeType == 1 /* Node.ELEMENT_NODE */)
children.push(child);
child = child.nextSibling;
return children;
Spry.Widget.TabbedPanels.prototype.addClassName = function(ele, className)
if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) != -1))
return;
ele.className += (ele.className ? " " : "") + className;
Spry.Widget.TabbedPanels.prototype.removeClassName = function(ele, className)
if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) == -1))
return;
ele.className = ele.className.replace(new RegExp("\\s*\\b" + className + "\\b", "g"), "");
Spry.Widget.TabbedPanels.setOptions = function(obj, optionsObj, ignoreUndefinedProps)
if (!optionsObj)
return;
for (var optionName in optionsObj)
if (ignoreUndefinedProps && optionsObj[optionName] == undefined)
continue;
obj[optionName] = optionsObj[optionName];
Spry.Widget.TabbedPanels.prototype.getTabGroup = function()
if (this.element)
var children = this.getElementChildren(this.element);
if (children.length)
return children[0];
return null;
Spry.Widget.TabbedPanels.prototype.getTabs = function()
var tabs = [];
var tg = this.getTabGroup();
if (tg)
tabs = this.getElementChildren(tg);
return tabs;
Spry.Widget.TabbedPanels.prototype.getContentPanelGroup = function()
if (this.element)
var children = this.getElementChildren(this.element);
if (children.length > 1)
return children[1];
return null;
Spry.Widget.TabbedPanels.prototype.getContentPanels = function()
var panels = [];
var pg = this.getContentPanelGroup();
if (pg)
panels = this.getElementChildren(pg);
return panels;
Spry.Widget.TabbedPanels.prototype.getIndex = function(ele, arr)
ele = this.getElement(ele);
if (ele && arr && arr.length)
for (var i = 0; i < arr.length; i++)
if (ele == arr[i])
return i;
return -1;
Spry.Widget.TabbedPanels.prototype.getTabIndex = function(ele)
var i = this.getIndex(ele, this.getTabs());
if (i < 0)
i = this.getIndex(ele, this.getContentPanels());
return i;
Spry.Widget.TabbedPanels.prototype.getCurrentTabIndex = function()
return this.currentTabIndex;
Spry.Widget.TabbedPanels.prototype.getTabbedPanelCount = function(ele)
return Math.min(this.getTabs().length, this.getContentPanels().length);
Spry.Widget.TabbedPanels.addEventListener = function(element, eventType, handler, capture)
try
if (element.addEventListener)
element.addEventListener(eventType, handler, capture);
else if (element.attachEvent)
element.attachEvent("on" + eventType, handler);
catch (e) {}
Spry.Widget.TabbedPanels.prototype.cancelEvent = function(e)
if (e.preventDefault) e.preventDefault();
else e.returnValue = false;
if (e.stopPropagation) e.stopPropagation();
else e.cancelBubble = true;
return false;
Spry.Widget.TabbedPanels.prototype.onTabClick = function(e, tab)
this.showPanel(tab);
return this.cancelEvent(e);
Spry.Widget.TabbedPanels.prototype.onTabMouseOver = function(e, tab)
this.addClassName(tab, this.tabHoverClass);
return false;
Spry.Widget.TabbedPanels.prototype.onTabMouseOut = function(e, tab)
this.removeClassName(tab, this.tabHoverClass);
return false;
Spry.Widget.TabbedPanels.prototype.onTabFocus = function(e, tab)
this.hasFocus = true;
this.addClassName(tab, this.tabFocusedClass);
return false;
Spry.Widget.TabbedPanels.prototype.onTabBlur = function(e, tab)
this.hasFocus = false;
this.removeClassName(tab, this.tabFocusedClass);
return false;
Spry.Widget.TabbedPanels.KEY_UP = 38;
Spry.Widget.TabbedPanels.KEY_DOWN = 40;
Spry.Widget.TabbedPanels.KEY_LEFT = 37;
Spry.Widget.TabbedPanels.KEY_RIGHT = 39;
Spry.Widget.TabbedPanels.prototype.onTabKeyDown = function(e, tab)
var key = e.keyCode;
if (!this.hasFocus || (key != this.previousPanelKeyCode && key != this.nextPanelKeyCode))
return true;
var tabs = this.getTabs();
for (var i =0; i < tabs.length; i++)
if (tabs[i] == tab)
var el = false;
if (key == this.previousPanelKeyCode && i > 0)
el = tabs[i-1];
else if (key == this.nextPanelKeyCode && i < tabs.length-1)
el = tabs[i+1];
if (el)
this.showPanel(el);
el.focus();
break;
return this.cancelEvent(e);
Spry.Widget.TabbedPanels.prototype.preorderTraversal = function(root, func)
var stopTraversal = false;
if (root)
stopTraversal = func(root);
if (root.hasChildNodes())
var child = root.firstChild;
while (!stopTraversal && child)
stopTraversal = this.preorderTraversal(child, func);
try { child = child.nextSibling; } catch (e) { child = null; }
return stopTraversal;
Spry.Widget.TabbedPanels.prototype.addPanelEventListeners = function(tab, panel)
var self = this;
Spry.Widget.TabbedPanels.addEventListener(tab, "click", function(e) { return self.onTabClick(e, tab); }, false);
Spry.Widget.TabbedPanels.addEventListener(tab, "mouseover", function(e) { return self.onTabMouseOver(e, tab); }, false);
Spry.Widget.TabbedPanels.addEventListener(tab, "mouseout", function(e) { return self.onTabMouseOut(e, tab); }, false);
if (this.enableKeyboardNavigation)
// XXX: IE doesn't allow the setting of tabindex dynamically. This means we can't
// rely on adding the tabindex attribute if it is missing to enable keyboard navigation
// by default.
// Find the first element within the tab container that has a tabindex or the first
// anchor tag.
var tabIndexEle = null;
var tabAnchorEle = null;
this.preorderTraversal(tab, function(node) {
if (node.nodeType == 1 /* NODE.ELEMENT_NODE */)
var tabIndexAttr = tab.attributes.getNamedItem("tabindex");
if (tabIndexAttr)
tabIndexEle = node;
return true;
if (!tabAnchorEle && node.nodeName.toLowerCase() == "a")
tabAnchorEle = node;
return false;
if (tabIndexEle)
this.focusElement = tabIndexEle;
else if (tabAnchorEle)
this.focusElement = tabAnchorEle;
if (this.focusElement)
Spry.Widget.TabbedPanels.addEventListener(this.focusElement, "focus", function(e) { return self.onTabFocus(e, tab); }, false);
Spry.Widget.TabbedPanels.addEventListener(this.focusElement, "blur", function(e) { return self.onTabBlur(e, tab); }, false);
Spry.Widget.TabbedPanels.addEventListener(this.focusElement, "keydown", function(e) { return self.onTabKeyDown(e, tab); }, false);
Spry.Widget.TabbedPanels.prototype.showPanel = function(elementOrIndex)
var tpIndex = -1;
if (typeof elementOrIndex == "number")
tpIndex = elementOrIndex;
else // Must be the element for the tab or content panel.
tpIndex = this.getTabIndex(elementOrIndex);
if (!tpIndex < 0 || tpIndex >= this.getTabbedPanelCount())
return;
var tabs = this.getTabs();
var panels = this.getContentPanels();
var numTabbedPanels = Math.max(tabs.length, panels.length);
for (var i = 0; i < numTabbedPanels; i++)
if (i != tpIndex)
if (tabs[i])
this.removeClassName(tabs[i], this.tabSelectedClass);
if (panels[i])
this.removeClassName(panels[i], this.panelVisibleClass);
panels[i].style.display = "none";
this.addClassName(tabs[tpIndex], this.tabSelectedClass);
this.addClassName(panels[tpIndex], this.panelVisibleClass);
panels[tpIndex].style.display = "block";
this.currentTabIndex = tpIndex;
Spry.Widget.TabbedPanels.prototype.attachBehaviors = function(element)
var tabs = this.getTabs();
var panels = this.getContentPanels();
var panelCount = this.getTabbedPanelCount();
for (var i = 0; i < panelCount; i++)
this.addPanelEventListeners(tabs[i], panels[i]);
this.showPanel(this.defaultTab);
})(); // EndSpryComponent
>CSS file
@charset "UTF-8";
/* SpryTabbedPanels.css - version 0.6 - Spry Pre-Release 1.6.1 */
/* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
/* Horizontal Tabbed Panels
* The default style for a TabbedPanels widget places all tab buttons
* (left aligned) above the content panel.
/* This is the selector for the main TabbedPanels container. For our
* default style, this container does not contribute anything visually,
* but it is floated left to make sure that any floating or clearing done
* with any of its child elements are contained completely within the
* TabbedPanels container, to minimize any impact or undesireable
* interaction with other floated elements on the page that may be used
* for layout.
* If you want to constrain the width of the TabbedPanels widget, set a
* width on the TabbedPanels container. By default, the TabbedPanels widget
* expands horizontally to fill up available space.
* The name of the class ("TabbedPanels") used in this selector is not
* necessary to make the widget function. You can use any class name you
* want to style the TabbedPanels container.
.TabbedPanels {
overflow: hidden;
margin: 0px;
padding: 0px;
clear: none;
width: 100%; /* IE Hack to force proper layout when preceded by a paragraph. (hasLayout Bug)*/
/* This is the selector for the TabGroup. The TabGroup container houses
* all of the tab buttons for each tabbed panel in the widget. This container
* does not contribute anything visually to the look of the widget for our
* default style.
* The name of the class ("TabbedPanelsTabGroup") used in this selector is not
* necessary to make the widget function. You can use any class name you
* want to style the TabGroup container.
.TabbedPanelsTabGroup {
margin: 0px;
padding: 0px;
/* This is the selector for the TabbedPanelsTab. This container houses
* the title for the panel. This is also the tab "button" that the user clicks
* on to activate the corresponding content panel so that it appears on top
* of the other tabbed panels contained in the widget.
* For our default style, each tab is positioned relatively 1 pixel down from
* where it wold normally render. This allows each tab to overlap the content
* panel that renders below it. Each tab is rendered with a 1 pixel bottom
* border that has a color that matches the top border of the current content
* panel. This gives the appearance that the tab is being drawn behind the
* content panel.
* The name of the class ("TabbedPanelsTab") used in this selector is not
* necessary to make the widget function. You can use any class name you want
* to style this tab container.
.TabbedPanelsTab {
position: relative;
top: 1px;
float: left;
background-color: #DDD;
list-style: none;
-moz-user-select: none;
-khtml-user-select: none;
cursor: pointer;
font-family: sans-serif;
font-size: small;
font-weight: bold;
margin-top: 0px;
margin-right: 1px;
margin-bottom: 0px;
margin-left: 0px;
padding-top: 4px;
padding-right: 10px;
padding-left: 10px;
padding-bottom: 4px;
/* This selector is an example of how to change the appearnce of a tab button
* container as the mouse enters it. The class "TabbedPanelsTabHover" is
* programatically added and removed from the tab element as the mouse enters
* and exits the container.
.TabbedPanelsTabHover {
background-color: #CCC;
/* This selector is an example of how to change the appearance of a tab button
* container after the user has clicked on it to activate a content panel.
* The class "TabbedPanelsTabSelected" is programatically added and removed
* from the tab element as the user clicks on the tab button containers in
* the widget.
* As mentioned above, for our default style, tab buttons are positioned
* 1 pixel down from where it would normally render. When the tab button is
* selected, we change its bottom border to match the background color of the
* content panel so that it looks like the tab is part of the content panel.
.TabbedPanelsTabSelected {
background-color: #FFF;
color: #333;
border-top-color: fff;
border-right-color: fff;
border-bottom-color: fff;
border-left-color: fff;
border-color: fff;
outline-color: fff;
/* This selector is an example of how to make a link inside of a tab button
* look like normal text. Users may want to use links inside of a tab button
* so that when it gets focus, the text *inside* the tab button gets a focus
* ring around it, instead of the focus ring around the entire tab.
.TabbedPanelsTab a {
color: black;
text-decoration: none;
/* This is the selector for the ContentGroup. The ContentGroup container houses
* all of the content panels for each tabbed panel in the widget. For our
* default style, this container provides the background color and borders that
* surround the content.
* The name of the class ("TabbedPanelsContentGroup") used in this selector is
* not necessary to make the widget function. You can use any class name you
* want to style the ContentGroup container.
.TabbedPanelsContentGroup {
clear: both;
background-color: #F9F9F1;
height: auto;
margin-bottom: 3px;
border: .1px solid #999;
/* This is the selector for the Content panel. The Content panel holds the
* content for a single tabbed panel. For our default style, this container
* provides some padding, so that the content is not pushed up against the
* widget borders.
* The name of the class ("TabbedPanelsContent") used in this selector is
* not necessary to make the widget function. You can use any class name you
* want to style the Content container.
.TabbedPanelsContent {
overflow: hidden;
padding: 4px;
/* This selector is an example of how to change the appearnce of the currently
* active container panel. The class "TabbedPanelsContentVisible" is
* programatically added and removed from the content element as the panel
* is activated/deactivated.
.TabbedPanelsContentVisible {
background-color: #FFF;
font-family: Arial, Helvetica, sans-serif;
font-size: 0.75em;
color: #333;
padding: 20px;
clear: both;
margin-bottom: 5px;
height: auto;
/* Vertical Tabbed Panels
* The following rules override some of the default rules above so that the
* TabbedPanels widget renders with its tab buttons along the left side of
* the currently active content panel.
* With the rules defined below, the only change that will have to be made
* to switch a horizontal tabbed panels widget to a vertical tabbed panels
* widget, is to use the "VTabbedPanels" class on the top-level widget
* container element, instead of "TabbedPanels".
.VTabbedPanels {
overflow: hidden;
zoom: 1;
/* This selector floats the TabGroup so that the tab buttons it contains
* render to the left of the active content panel. A border is drawn around
* the group container to make it look like a list container.
.VTabbedPanels .TabbedPanelsTabGroup {
float: left;
width: 10em;
height: 20em;
background-color: #EEE;
position: relative;
border-top: solid 1px #999;
border-right: solid 1px #999;
border-left: solid 1px #CCC;
border-bottom: solid 1px #CCC;
/* This selector disables the float property that is placed on each tab button
* by the default TabbedPanelsTab selector rule above. It also draws a bottom
* border for the tab. The tab button will get its left and right border from
* the TabGroup, and its top border from the TabGroup or tab button above it.
.VTabbedPanels .TabbedPanelsTab {
float: none;
margin: 0px;
border-top: none;
border-left: none;
border-right: none;
/* This selector disables the float property that is placed on each tab button
* by the default TabbedPanelsTab selector rule above. It also draws a bottom
* border for the tab. The tab button will get its left and right border from
* the TabGroup, and its top border from the TabGroup or tab button above it.
.VTabbedPanels .TabbedPanelsTabSelected {
background-color: #EEE;
border-bottom: solid 1px #999;
/* This selector floats the content panels for the widget so that they
* render to the right of the tabbed buttons.
.VTabbedPanels .TabbedPanelsContentGroup {
clear: none;
float: left;
padding: 0px;
width: 30em;
height: 20em;
/* Styles for Printing */
@media print {
.TabbedPanels {
overflow: visible !important;
.TabbedPanelsContentGroup {
display: block !important;
overflow: visible !important;
height: auto !important;
.TabbedPanelsContent {
overflow: visible !important;
display: block !important;
clear:both !important;
.TabbedPanelsTab {
overflow: visible !important;
display: block !important;
clear:none !important;
height: 100%;
#TabbedPanels1 {
height: auto;
padding-top: 5px;
background-color: #EAEAEA;
width: 700px;
I did read this but don't know where to start: http://www.webdevforums.com/showthread.php?27428-Dreamweaver-spry-collapsible-panel-amp-re peating-regions
Can anybody HELP PLEASE PLEASEI think I counted three tabbed panels in the markup, each with an ID of TabbedPanels1
You have only one constructor that makes one instance of the tabeed panels with an ID of TabbedPanels1
There are a couple of things that create the problem.
There can only be one ID with the same name in a document, thus the ID's of the TabbedPanels will need to change from TabbedPanels1 for the second and third instances to TabbedPanels2 and TabbedPanels3 (or similar) respectively.
There needs to be a constructor for each tabbed panels like
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
var TabbedPanels2 = new Spry.Widget.TabbedPanels("TabbedPanels2");
var TabbedPanels3 = new Spry.Widget.TabbedPanels("TabbedPanels3");
Gramps -
Nested Repeat Regions in Dreamweaver 8
I am waying the option of upgrading from MX to 8 or just
getting MX Looper to do nested repeat regions. Any advice? Are
nested repeat regions built into Dreamweaver 8?SmellyPete wrote:
> I've got a problem with nested templates in my site. I
don't think it's an
> error or bug as such, just a really strange limitation,
that I hope there is a
> work around for.
>
> I've setup a menubar with a repeating table region in a
template. Then I laid
> out the content (editable) regions in a nested template.
The system works
> really well in dreamweaver, if you want to add a menu
item, you do so to the
> parent template, and then it filters through out the
site.
>
> The problem is that when I try to edit the pages as a
client with contribute
> (even as an administrator) it will not allow access to
edit a .dwt file, even
> if it has editable regions in it. This means I can't use
contribute to add an
> item to the menubar, because I need to be able to edit
the nested template. I'm
> sure it's possible, because a .dwt is just an .htm file
with a different hat on.
>
> There must be some way of doing this. As soon as I read
about the template
> system I immediately thought this would be one of it's
strengths, and would be
> very surprised if the contribute user were limited to
making changes on every
> individual page.
>
> PS. I'm sure someone will suggest that I just move the
repeating region into
> the nested template. I could do this, but the whole
point is that with one
> change I want it to will filter down through the whole
site. I thought maybe
> SSI might be the answer, but would that just confuse
contribute even more?
>
It seems to me the whole point of using Contribute is to keep
users from
changing basic site configurations such as the menu. Use
Dreamweaver or
one of the simple HTML editors around. -
I've got a page where I need nested repeat regions using the
same data.
Basically, list people who have donated money in groupings by
level:
$100-$199
Murray
Nadia
Thierry
$200-$299
Dan
Dan
Patty
I'm looking at Tom Muck's "Simulated Nested Region" extension
so I can do
this using one Recordset (seems silly to set up a recordset
for each
donation level) but the only problem is it looks like the
donation levels
have to sort in order to work, and they don't.
Anyone know of any other extensions or easy ways to make this
work?
Oh yeah.....MySQL and PHP.
Thanks!
Mad DogSmellyPete wrote:
> I've got a problem with nested templates in my site. I
don't think it's an
> error or bug as such, just a really strange limitation,
that I hope there is a
> work around for.
>
> I've setup a menubar with a repeating table region in a
template. Then I laid
> out the content (editable) regions in a nested template.
The system works
> really well in dreamweaver, if you want to add a menu
item, you do so to the
> parent template, and then it filters through out the
site.
>
> The problem is that when I try to edit the pages as a
client with contribute
> (even as an administrator) it will not allow access to
edit a .dwt file, even
> if it has editable regions in it. This means I can't use
contribute to add an
> item to the menubar, because I need to be able to edit
the nested template. I'm
> sure it's possible, because a .dwt is just an .htm file
with a different hat on.
>
> There must be some way of doing this. As soon as I read
about the template
> system I immediately thought this would be one of it's
strengths, and would be
> very surprised if the contribute user were limited to
making changes on every
> individual page.
>
> PS. I'm sure someone will suggest that I just move the
repeating region into
> the nested template. I could do this, but the whole
point is that with one
> change I want it to will filter down through the whole
site. I thought maybe
> SSI might be the answer, but would that just confuse
contribute even more?
>
It seems to me the whole point of using Contribute is to keep
users from
changing basic site configurations such as the menu. Use
Dreamweaver or
one of the simple HTML editors around.
Maybe you are looking for
-
When I run firefox I get the following message: URGENT! Your version of Firefox is no longer protected against online attacks. Get the upgrade - it's fast and free! I am running 5.0.1 and have tried upgrading several times and still get the same mess
-
I am developing an ios application which has non renewable subscription. Which algorithm would be best if the very time an authorized user purchase my application after paying charge for it , can download it for other devices assocated with him for f
-
$BC]Fb$G$9(J $B$9$G$K!"(J2$B?M$H$bEPO?$5$l$F$$$^$9!#:#8e$H$b$h$m$7$/$*4j$$$7$^$9!#!d@V@1$5$s!"CSED$5$s(J From: Masakuni_Kohira/[email protected][SMTP:Masakuni_Kohira/[email protected]] Sent: Thursday, March 27, 1997 2:04
-
Hi for all SCN community member. First of all, i want to say thanks to all fellow member for creating such a great SAP community so a beginner like me could learn all thing about SAP. I'm a freshgraduated from Information System who had a passion in
-
I have been getting the BSOD in May. I bought this laptop in January and it didn't have this problem until May. Am trying to figure out a way to fix this problem. Currently I am running a full scan with Windows Defender to check if theres a virus. Ca