Anchors within textarea

Hi All,
I have an view with a Textarea. In this textarea I read an
external txt-file in the htmlText-format.
This is a textfile with FAQ. What I want is having the
questions on top which links to the question and answer below. Is
that possible in a way?
Thanks!

Thnx Greg, i'll use the accordion to achieve an acceptable
solution.

Similar Messages

  • How do I navigate from a hyperlink on one page to an anchor within the tab widget?

    Hi guys can you please assist me with that issue I am describing in the question: How do I navigate from a hyperlink on one page to an anchor within the tab widget? I assume that it is not working because the tab widget is truly just on one page and anchors work within a page but not a specific tab. Is there a way around that?
    Thanks.

    an interesting question. Anchors work across pages (global) without any problem. Do they work within tabs or any other widgets I haven't tried, but it looks like you have and without success. I can see the temptation for doing this, but if you think about it why would you? Set the anchor on the page next to the tab(s) and hey presto the user needs only click the tab to which the hperlink refers, nothing could be more convenient! Of course, if the user cannot relate the tab to the hyperlink there's a problem. Generally solved by titling (like if the hyperlink is cats, the tab should preferably read cats and not dogs)! It's the only work around i can think of. Hope it helps.

  • Linking to an anchor within the same page

    Anyone know how to link to an anchor within the same page?
    For instance, im making a FAQ page. at the top of the page I would like to list all the questions. i would like the viewer to be able to click a question which brings them to the answer on the bottom of the page.
    looked in inspector couldn't find it. linking to anchors is pretty basic, so id be really suprised if iweb doesn't have this feature. so im assuming im missing it.......
    how do i do this?

    Anyone know how to link to an anchor within the same page?
    how do i do this?
    Linking to an anchor within the same page is no more than scrolling to it, and can be (easily) emulate with javascript window.scroll function.
    See my post here: http://discussions.apple.com/thread.jspa?messageID=7676908&#7676908
    All javascript is linked to the example page.

  • Anchors within dynamic lists

    Hello~
    I currently have a static web page with a list of documents
    on it
    that is navigable by alphabetical anchors, as well as a "back
    to top"
    anchor after each letter section. I am working on putting all
    of the
    content into a database so that it can be managed
    dynamically, but I
    was not sure how to continue using the anchors to move around
    the
    page. Is it possible to use alphabetical anchors within a
    dynamically
    driven list (ColdFusion w/ Access database)? Thanks!
    KC

    Multiple cross post!
    See:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=7&threadid=12 45015

  • Styling within TextArea

    I have been doing the lessons in the tutorials that came with
    Flex Builder 2, and have fiddled with the BlogReader sample to
    create a version of the BlogReader that reads the RSS of my own
    blog:
    http://jamesedmunds.com/Flex/BlogReader.cfm
    My question has to do with styling
    within the TextArea below the grid, where individual
    postings are displayed. How would I style this, so that, for
    instance, the anchors (links to
    http:// addresses, in this case) showed in blue
    (and even changed on hover)? Is this possible?
    Thanks in advance,
    James

    I can get the textArea to take the styles passed in through a
    stylesheet, but not take the <a> styles.
    Here is what is in my stylesheet:
    A:link {color:#333300;
    text-decoration:underline;}
    A:active {color:#333300;
    text-decoration:underline;}
    A:visited {color:#333300;
    text-decoration:underline;}
    A:hover {color:#c00000;
    text-decoration:underline;}
    TextArea
    {font-family:Georgia;
    font-size:14px;
    color:#000000;
    The text in the textArea displays in 14px Georgia as
    indicated, but the <a> tags do not take the propoerties at
    all... the only indication that they are links is that the cursor
    changes to the pointing finger when hovered over them.
    Thanks in advance for any help,
    James

  • Links to id's and named anchors within a page in an iframe do not open in firefox

    In order to force layout of my liquid website, I use i-frames to display content . It is all on my sight www.rdelutherie.com, and I am not displaying pages from other sights. The links to sections of pages from within the same page do not work in firefox.
    I have had this problem before with named anchors, and in moving up to html5 and in making my site accessible for people with dissabilities, I started using &lt;nav&gt; eliments... and changed from named anchors to links to ID's like this:
    In an unordered list I have these:
    <pre><nowiki> <li><a href="#s1">Subject 1:</a></li>
    </nowiki></pre>
    They link to sections of the same page like this one:
    <pre><nowiki>
    <section id=s1>
    <h2>Subject 1:</h2>
    <p>Blah blah blaaaaah, and bla bla!</p>
    </section></nowiki></pre>
    Last time I researched this problem (a year or more ago), I was told that it was because of a security risk (something about being able to count views...and other peoples proprietary and copyrighted material), but the vaguely described reasoning made little to no sense to me nor many others, who can not even link to our own stuff. The Mozilla developers were rather abrupt and some were even rude in telling us to live with it, instead of trying to come up with a solution or work around, and closed the post and disallowed further posting.
    The problem still persists, and although I am not a programmer, I have a real hard time believing that it is impossible for Firefox to distinguish between links contained within a document and site, from those on different sights, domains and what have you.
    As far as I know, no other browsers have this problem, so if it is such a big security risk, what is to stop someone with malicious intentions, from just using M$ IE, to bring their evil plan to fruition?
    In keeping with "Making the web a better place": Please address this problem, and find a solution, workaround, or at least explain why it is impossible.
    Bob English

    Thanks again jscher2000,
    I know exactly what you mean, but I have had other page display problems with adjacent columns where one side does not display completely and seems to be conforming to the other ones height... hence the height settings and other tricks to force things to be acceptable.
    I am far from understanding code, and most of the solutions, including the one in the link you posted do not have the information a novice like me would need to implement them successfully. Most of them are written for people much more advanced. Without it telling me where exactly to put the code, point to it, what I can (and should) change and remove elsewhere because of it... I am at a loss. I don't know the basics, and have tried hard to understand them, but it is not like electrical circuits, physics and other things that I can understand naturally and with ease.
    I will look into it further in a few days, meanwhile I have to attend to my real work that doesn't even pay the bills completely: guitar building and repair, now that comes easy and naturally to me!

  • Can I anchor within a PDF to other points in that PDF?

    I am creating a multipage PDF with a Table of Contents. At the conclusion of each section, I'd like to create a link, or anchor to go back to the TOC. Is this possible and if so, how can I do it?
    Thank you!

    You can create links and buttons anywhere you want. The bookmarking feature is used by many to create a TOC replacement. If you original application supports it you can create links within your original document. This can be done with InDesign, FrameMaker, and probably with <shudder> Word </shudder>

  • Dynamic linking within TextArea component

    how can i include an MC or button inline within the HTML text
    of a TextArea component -- and also have that object link to an AS
    function? i want to have icons within the text of my TextArea that
    open pop-up windows within the Flash application (MC linkage).
    is this possible?
    is asfunction used? if so how?

    Well if you are still interested in using a text component
    instead of a Button the way you would go about this is using
    textWidth. Here's how I've done it before using a text / label
    whatever you want that shows text.
    // => Set our text we got from database
    myText.text = "This is the text I got from the DB";
    // => Validate it so that way we make sure we get right
    numbers
    myText.validateNow();
    // => Find out how wide our text really is.
    var textWidth:Number = myText.textWidth
    // => Reset the width of our text component and add 20 for
    a little buffer
    myText.width = textWidth + 20;
    Now my suggestion is if your going to be dynamically creating
    these on the fly from a database call you throw it into a method /
    class and have that do all the work for you so all you have to do
    is pass the text to it and it resizes itself based on the example
    above.

  • Using anchor within frameset

    I am trying to use an anchor in a frame within the navigation
    bar of my page, with the ancor opening the linked item within the
    lower frame.
    For some reason this seems to work in Safari, but Internet
    Explorer always opens up a new window - can anybody tell me what I
    am doing wrong?
    Here is a link to my page:
    http://www.dbhome.dk/WilliSletten/wcv_samletengelskframeset.html
    See the code below:
    <table width="812" border="4" cellspacing="0"
    cellpadding="4" style="text-align: center">
    <tr class="Standard">
    <td width="16%" bordercolor="4"
    bgcolor="#cccccc"><center spry:hover="Standard">
    <a href="wcv_framesetengelsk.html#Anchor-Personal-58020"
    target="Main"><font face="Verdana">Personal
    Details</font></a>
    </center></td>
    <td width="15%" bgcolor="#cccccc"><center
    spry:hover="Standard">
    <a
    href="wcv_framesetengelsk.html#Anchor-Employment-36876"
    target="Main"><font
    face="Verdana">Employment</font></a>
    </center></td>
    <td width="16%" bgcolor="#cccccc"><center
    spry:hover="Standard">
    <a href="wcv_framesetengelsk.html#Anchor-Education-33261"
    target="Main"><font
    face="Verdana">Education</font></a>
    </center></td>
    <td width="15%" bgcolor="#cccccc"><center
    spry:hover="Standard">
    <a href="wcv_framesetengelsk.html#Anchor-Languages-27016"
    target="Main"><font
    face="Verdana">Languages</font></a>
    </center></td>
    <td width="16%" bgcolor="#cccccc"><center
    spry:hover="Standard">
    <a href="wcv_framesetengelsk.html#Anchor-EDB-28157"
    target="Main"><font face="Verdana">EDP
    Skills</font></a>
    </center></td>
    <td width="15%" bgcolor="#cccccc"><center
    spry:hover="Standard">
    <a
    href="wcv_framesetengelsk.html#Anchor-Miscellaneous-51977"
    target="Main"><font face="Verdana">Other
    Experience</font></a>
    </center></td>
    </tr>

    Goodness - that is such a terrible way to display this
    information!
    For example, your top frame is too short to display the
    navigation links at
    the bottom (on my browser viewport). Anyhow, frames are
    rarely the optimal
    choice for your layout method.
    Your problem stems from the fact that your frameset gives the
    frames an ID,
    but the frame technology is so antique, you would also need
    to give them a
    NAME, so change this -
    <frame src="wcvframeengelsk.html" frameborder="no"
    id="Top" />
    <frame src="wcv_framesetengelsk.html" frameborder="no"
    noresize="noresize"
    id="Main" />
    to this -
    <frame src="wcvframeengelsk.html" frameborder="no"
    id="Top" />
    <frame src="wcv_framesetengelsk.html" frameborder="no"
    noresize="noresize"
    id="Main" name="Main" />
    and see what happens.
    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
    ==================
    "willips" <[email protected]> wrote in
    message
    news:[email protected]...
    >I am trying to use an anchor in a frame within the
    navigation bar of my
    >page,
    > with the ancor opening the linked item within the lower
    frame.
    >
    > For some reason this seems to work in Safari, but
    Internet Explorer always
    > opens up a new window - can anybody tell me what I am
    doing wrong?
    >
    > Here is a link to my page:
    >
    http://www.dbhome.dk/WilliSletten/wcv_samletengelskframeset.html
    >
    > See the code below:
    >
    > <table width="812" border="4" cellspacing="0"
    cellpadding="4"
    > style="text-align: center">
    > <tr class="Standard">
    > <td width="16%" bordercolor="4"
    bgcolor="#cccccc"><center
    > spry:hover="Standard">
    > <a
    href="wcv_framesetengelsk.html#Anchor-Personal-58020"
    > target="Main"><font
    > face="Verdana">Personal
    Details</font></a>
    > </center></td>
    > <td width="15%" bgcolor="#cccccc"><center
    spry:hover="Standard">
    > <a
    href="wcv_framesetengelsk.html#Anchor-Employment-36876"
    > target="Main"><font
    face="Verdana">Employment</font></a>
    > </center></td>
    > <td width="16%" bgcolor="#cccccc"><center
    spry:hover="Standard">
    > <a
    href="wcv_framesetengelsk.html#Anchor-Education-33261"
    > target="Main"><font
    face="Verdana">Education</font></a>
    > </center></td>
    > <td width="15%" bgcolor="#cccccc"><center
    spry:hover="Standard">
    > <a
    href="wcv_framesetengelsk.html#Anchor-Languages-27016"
    > target="Main"><font
    face="Verdana">Languages</font></a>
    > </center></td>
    > <td width="16%" bgcolor="#cccccc"><center
    spry:hover="Standard">
    > <a href="wcv_framesetengelsk.html#Anchor-EDB-28157"
    > target="Main"><font face="Verdana">EDP
    Skills</font></a>
    > </center></td>
    > <td width="15%" bgcolor="#cccccc"><center
    spry:hover="Standard">
    > <a
    href="wcv_framesetengelsk.html#Anchor-Miscellaneous-51977"
    > target="Main"><font face="Verdana">Other
    Experience</font></a>
    > </center></td>
    > </tr>
    >
    >

  • Html link to a named anchor within a PDF file?

    So, I want a link on a web page to hop to a specific part of
    a pdf file.
    Same thing as using named anchors really. The issue I see
    here is that the
    web pag (link) has no real notion of pdf's implementation of
    anchors, so how
    could it know to utilise them?
    I assume this is not possible, but need to make sure.
    Thanks.

    It is possible. You can link to a page in any pdf document,
    or link to a 'Named Destination'
    http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf

  • Using anchors within actions?

    Hi,
    I'm quite new to Edge Animate CC, I just created a menubar and I was wondering if it's possible to
    intregrate this in my current html page which scrolls with jquery, using the anchor tag.
    What I would like is the following:
    At this moment I have large (one) html page with scrolling divs and id's.
    This works fine with the regular menubuttons that have the
    'onClick="goto('#home', this); return false' -  command in their a tags.
    I would like to do something similar, using (and integrating) my
    new Edge menubar. The only thing I noticed is the 'open url' code in the actions window, which
    is not very useful.
    I guess I have to write some javaScript for that?
    Thanks in advance!

    The simplest way is to create your own ActionListener. Fill the JComboBox with font names and when user selects font just specify your own attributes and apply them to the document.
    Like this:
    SimpleAttributeSet attrs=new SimpleAttributeSet ();
    StyleConstants.setFontFamily(attrs, fontFamilyString);
    int start=editorPane.getSelectionStart();
    int len=editorPane.getSelectionEnd()-start;
    styledDocument.setCharacterAttributes(start,len,attrs,false);
    regards,
    Stas

  • Using anchor within spry accordion???

    Hi everyone,
    I have an index page www.nateurope.com. The news are linking to an accordion http://www.nateurope.com/news.htm. I added anchors because I thought that it would be nice if the user click on March, 22 Virtual Conference (www.nateurope.com) he would directly get to the open panel March, 22 Virtual Conference on the nateurope.com/news.htm page.
    I tried to get the information I need by googling but the only thing I found is this if you have the button on the same page.
    <input type="button" onclick="acc10.openFirstPanel()" >open first panel</input>
    <input type="button" onclick="acc10.openNextPanel()" >open next panel</input>
    <input type="button" onclick="acc10.openPreviousPanel()" >open previous panel</input>
    <input type="button" onclick="acc10.openLastPanel()" >open last panel</input>
    <script type="text/javascript">
         var acc10 = new Spry.Widget.Accordion("Accordion1");
    </script>
    ->Would this be the solution? Where do I have to add this code?
    I read also that it is only possible if the height is variable but I didn't understand where to implement this information? SpryAccordion .js?
    this.useFixedPanelHeights = true;
    this.fixedPanelHeight = 0;
    Turn true in false? Or just add this code at the end of the page? <script type="text/javascript">
    var acc1 = new Spry.Widget.Accordion("Acc1", { useFixedPanelHeights: false });
    </script>
    Further I found the description of the panel ID http://labs.adobe.com/technologies/spry/samples/accordion/AccordionSample.html but I didn't understand how to implement this code as well.
    I am really lost and would appreciate very much your help. Don't hesitate to contact me if you need further code or information. I would be happy to see how to implement the information .
    Thy a lot in advance.

    Hi Gramps,
    I deleted everything and started right from beginning. Unfortunately without success, probably I made something wrong with the heigth setting? I just changed in .js true to false:
    (function() { // BeginSpryComponent
    if (typeof Spry == "undefined") window.Spry = {}; if (!Spry.Widget) Spry.Widget = {};
    Spry.Widget.Accordion = function(element, opts)
    this.element = this.getElement(element);
    this.defaultPanel = 0;
    this.hoverClass = "AccordionPanelTabHover";
    this.openClass = "AccordionPanelOpen";
    this.closedClass = "AccordionPanelClosed";
    this.focusedClass = "AccordionFocused";
    this.enableAnimation = true;
    this.enableKeyboardNavigation = true;
    this.currentPanel = null;
    this.animator = null;
    this.hasFocus = null;
    this.previousPanelKeyCode = Spry.Widget.Accordion.KEY_UP;
    this.nextPanelKeyCode = Spry.Widget.Accordion.KEY_DOWN;
    this.useFixedPanelHeights = false;
    this.fixedPanelHeight = -1;
    Spry.Widget.Accordion.setOptions(this, opts, true);
    if (this.element)
    this.attachBehaviors();
    Spry.Widget.Accordion.prototype.getElement = function(ele)
    if (ele && typeof ele == "string")
    return document.getElementById(ele);
    return ele;
    Spry.Widget.Accordion.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.Accordion.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.Accordion.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.Accordion.prototype.onPanelTabMouseOver = function(e, panel)
    if (panel)
    this.addClassName(this.getPanelTab(panel), this.hoverClass);
    return false;
    Spry.Widget.Accordion.prototype.onPanelTabMouseOut = function(e, panel)
    if (panel)
    this.removeClassName(this.getPanelTab(panel), this.hoverClass);
    return false;
    Spry.Widget.Accordion.prototype.openPanel = function(elementOrIndex)
    var panelA = this.currentPanel;
    var panelB;
    if (typeof elementOrIndex == "number")
    panelB = this.getPanels()[elementOrIndex];
    else
    panelB = this.getElement(elementOrIndex);
    if (!panelB || panelA == panelB)
    return null;
    var contentA = panelA ? this.getPanelContent(panelA) : null;
    var contentB = this.getPanelContent(panelB);
    if (!contentB)
    return null;
    if (this.useFixedPanelHeights && !this.fixedPanelHeight)
    this.fixedPanelHeight = (contentA.offsetHeight) ? contentA.offsetHeight : contentA.scrollHeight;
    if (this.enableAnimation)
    if (this.animator)
    this.animator.stop();
    this.animator = new Spry.Widget.Accordion.PanelAnimator(this, panelB, { duration: this.duration, fps: this.fps, transition: this.transition });
    this.animator.start();
    else
    if(contentA)
    contentA.style.display = "none";
    contentA.style.height = "0px";
    contentB.style.display = "block";
    contentB.style.height = this.useFixedPanelHeights ? this.fixedPanelHeight + "px" : "auto";
    if(panelA)
    this.removeClassName(panelA, this.openClass);
    this.addClassName(panelA, this.closedClass);
    this.removeClassName(panelB, this.closedClass);
    this.addClassName(panelB, this.openClass);
    this.currentPanel = panelB;
    return panelB;
    Spry.Widget.Accordion.prototype.closePanel = function()
    // The accordion can only ever have one panel open at any
    // give time, so this method only closes the current panel.
    // If the accordion is in fixed panel heights mode, this
    // method does nothing.
    if (!this.useFixedPanelHeights && this.currentPanel)
    var panel = this.currentPanel;
    var content = this.getPanelContent(panel);
    if (content)
    if (this.enableAnimation)
    if (this.animator)
    this.animator.stop();
    this.animator = new Spry.Widget.Accordion.PanelAnimator(this, null, { duration: this.duration, fps: this.fps, transition: this.transition });
    this.animator.start();
    else
    content.style.display = "none";
    content.style.height = "0px";
    this.removeClassName(panel, this.openClass);
    this.addClassName(panel, this.closedClass);
    this.currentPanel = null;
    Spry.Widget.Accordion.prototype.openNextPanel = function()
    return this.openPanel(this.getCurrentPanelIndex() + 1);
    Spry.Widget.Accordion.prototype.openPreviousPanel = function()
    return this.openPanel(this.getCurrentPanelIndex() - 1);
    Spry.Widget.Accordion.prototype.openFirstPanel = function()
    return this.openPanel(0);
    Spry.Widget.Accordion.prototype.openLastPanel = function()
    var panels = this.getPanels();
    return this.openPanel(panels[panels.length - 1]);
    Spry.Widget.Accordion.prototype.onPanelTabClick = function(e, panel)
    if (panel != this.currentPanel)
    this.openPanel(panel);
    else
    this.closePanel();
    if (this.enableKeyboardNavigation)
    this.focus();
    if (e.preventDefault) e.preventDefault();
    else e.returnValue = false;
    if (e.stopPropagation) e.stopPropagation();
    else e.cancelBubble = true;
    return false;
    Spry.Widget.Accordion.prototype.onFocus = function(e)
    this.hasFocus = true;
    this.addClassName(this.element, this.focusedClass);
    return false;
    Spry.Widget.Accordion.prototype.onBlur = function(e)
    this.hasFocus = false;
    this.removeClassName(this.element, this.focusedClass);
    return false;
    Spry.Widget.Accordion.KEY_UP = 38;
    Spry.Widget.Accordion.KEY_DOWN = 40;
    Spry.Widget.Accordion.prototype.onKeyDown = function(e)
    var key = e.keyCode;
    if (!this.hasFocus || (key != this.previousPanelKeyCode && key != this.nextPanelKeyCode))
    return true;
    var panels = this.getPanels();
    if (!panels || panels.length < 1)
    return false;
    var currentPanel = this.currentPanel ? this.currentPanel : panels[0];
    var nextPanel = (key == this.nextPanelKeyCode) ? currentPanel.nextSibling : currentPanel.previousSibling;
    while (nextPanel)
    if (nextPanel.nodeType == 1 /* Node.ELEMENT_NODE */)
    break;
    nextPanel = (key == this.nextPanelKeyCode) ? nextPanel.nextSibling : nextPanel.previousSibling;
    if (nextPanel && currentPanel != nextPanel)
    this.openPanel(nextPanel);
    if (e.preventDefault) e.preventDefault();
    else e.returnValue = false;
    if (e.stopPropagation) e.stopPropagation();
    else e.cancelBubble = true;
    return false;
    Spry.Widget.Accordion.prototype.attachPanelHandlers = function(panel)
    if (!panel)
    return;
    var tab = this.getPanelTab(panel);
    if (tab)
    var self = this;
    Spry.Widget.Accordion.addEventListener(tab, "click", function(e) { return self.onPanelTabClick(e, panel); }, false);
    Spry.Widget.Accordion.addEventListener(tab, "mouseover", function(e) { return self.onPanelTabMouseOver(e, panel); }, false);
    Spry.Widget.Accordion.addEventListener(tab, "mouseout", function(e) { return self.onPanelTabMouseOut(e, panel); }, false);
    Spry.Widget.Accordion.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.Accordion.prototype.initPanel = function(panel, isDefault)
    var content = this.getPanelContent(panel);
    if (isDefault)
    this.currentPanel = panel;
    this.removeClassName(panel, this.closedClass);
    this.addClassName(panel, this.openClass);
    // Attempt to set up the height of the default panel. We don't want to
    // do any dynamic panel height calculations here because our accordion
    // or one of its parent containers may be display:none.
    if (content)
    if (this.useFixedPanelHeights)
    // We are in fixed panel height mode and the user passed in
    // a panel height for us to use.
    if (this.fixedPanelHeight)
    content.style.height = this.fixedPanelHeight + "px";
    else
    // We are in variable panel height mode, but since we can't
    // calculate the panel height here, we just set the height to
    // auto so that it expands to show all of its content.
    content.style.height = "auto";
    else
    this.removeClassName(panel, this.openClass);
    this.addClassName(panel, this.closedClass);
    if (content)
    content.style.height = "0px";
    content.style.display = "none";
    this.attachPanelHandlers(panel);
    Spry.Widget.Accordion.prototype.attachBehaviors = function()
    var panels = this.getPanels();
    for (var i = 0; i < panels.length; i++)
    this.initPanel(panels[i], i == this.defaultPanel);
    // Advanced keyboard navigation requires the tabindex attribute
    // on the top-level element.
    this.enableKeyboardNavigation = (this.enableKeyboardNavigation && this.element.attributes.getNamedItem("tabindex"));
    if (this.enableKeyboardNavigation)
    var self = this;
    Spry.Widget.Accordion.addEventListener(this.element, "focus", function(e) { return self.onFocus(e); }, false);
    Spry.Widget.Accordion.addEventListener(this.element, "blur", function(e) { return self.onBlur(e); }, false);
    Spry.Widget.Accordion.addEventListener(this.element, "keydown", function(e) { return self.onKeyDown(e); }, false);
    Spry.Widget.Accordion.prototype.getPanels = function()
    return this.getElementChildren(this.element);
    Spry.Widget.Accordion.prototype.getCurrentPanel = function()
    return this.currentPanel;
    Spry.Widget.Accordion.prototype.getPanelIndex = function(panel)
    var panels = this.getPanels();
    for( var i = 0 ; i < panels.length; i++ )
    if( panel == panels[i] )
    return i;
    return -1;
    Spry.Widget.Accordion.prototype.getCurrentPanelIndex = function()
    return this.getPanelIndex(this.currentPanel);
    Spry.Widget.Accordion.prototype.getPanelTab = function(panel)
    if (!panel)
    return null;
    return this.getElementChildren(panel)[0];
    Spry.Widget.Accordion.prototype.getPanelContent = function(panel)
    if (!panel)
    return null;
    return this.getElementChildren(panel)[1];
    Spry.Widget.Accordion.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.Accordion.prototype.focus = function()
    if (this.element && this.element.focus)
    this.element.focus();
    Spry.Widget.Accordion.prototype.blur = function()
    if (this.element && this.element.blur)
    this.element.blur();
    Spry.Widget.Accordion.PanelAnimator = function(accordion, panel, opts)
    this.timer = null;
    this.interval = 0;
    this.fps = 60;
    this.duration = 500;
    this.startTime = 0;
    this.transition = Spry.Widget.Accordion.PanelAnimator.defaultTransition;
    this.onComplete = null;
    this.panel = panel;
    this.panelToOpen = accordion.getElement(panel);
    this.panelData = [];
    this.useFixedPanelHeights = accordion.useFixedPanelHeights;
    Spry.Widget.Accordion.setOptions(this, opts, true);
    this.interval = Math.floor(1000 / this.fps);
    // Set up the array of panels we want to animate.
    var panels = accordion.getPanels();
    for (var i = 0; i < panels.length; i++)
    var p = panels[i];
    var c = accordion.getPanelContent(p);
    if (c)
    var h = c.offsetHeight;
    if (h == undefined)
    h = 0;
    if (p == panel && h == 0)
    c.style.display = "block";
    if (p == panel || h > 0)
    var obj = new Object;
    obj.panel = p;
    obj.content = c;
    obj.fromHeight = h;
    obj.toHeight = (p == panel) ? (accordion.useFixedPanelHeights ? accordion.fixedPanelHeight : c.scrollHeight) : 0;
    obj.distance = obj.toHeight - obj.fromHeight;
    obj.overflow = c.style.overflow;
    this.panelData.push(obj);
    c.style.overflow = "hidden";
    c.style.height = h + "px";
    Spry.Widget.Accordion.PanelAnimator.defaultTransition = function(time, begin, finish, duration) { time /= duration; return begin + ((2 - time) * time * finish); };
    Spry.Widget.Accordion.PanelAnimator.prototype.start = function()
    var self = this;
    this.startTime = (new Date).getTime();
    this.timer = setTimeout(function() { self.stepAnimation(); }, this.interval);
    Spry.Widget.Accordion.PanelAnimator.prototype.stop = function()
    if (this.timer)
    clearTimeout(this.timer);
    // If we're killing the timer, restore the overflow
    // properties on the panels we were animating!
    for (i = 0; i < this.panelData.length; i++)
    obj = this.panelData[i];
    obj.content.style.overflow = obj.overflow;
    this.timer = null;
    Spry.Widget.Accordion.PanelAnimator.prototype.stepAnimation = function()
    var curTime = (new Date).getTime();
    var elapsedTime = curTime - this.startTime;
    var i, obj;
    if (elapsedTime >= this.duration)
    for (i = 0; i < this.panelData.length; i++)
    obj = this.panelData[i];
    if (obj.panel != this.panel)
    obj.content.style.display = "none";
    obj.content.style.height = "0px";
    obj.content.style.overflow = obj.overflow;
    obj.content.style.height = (this.useFixedPanelHeights || obj.toHeight == 0) ? obj.toHeight + "px" : "auto";
    if (this.onComplete)
    this.onComplete();
    return;
    for (i = 0; i < this.panelData.length; i++)
    obj = this.panelData[i];
    var ht = this.transition(elapsedTime, obj.fromHeight, obj.distance, this.duration);
    obj.content.style.height = ((ht < 0) ? 0 : ht) + "px";
    var self = this;
    this.timer = setTimeout(function() { self.stepAnimation(); }, this.interval);
    })(); // EndSpryComponent
    I changed in the HTML code of the page with the accordion:
    <link href="SpryAssets/SpryAccordion.css" rel="stylesheet" ><script src="SpryAssets/SpryAccordion.js"></script>
    <script src="SpryAssets/SpryURLUtils.js"></script><script>
    var params = Spry.Utils.getLocationParamsAsObject();
    </script>
    and at the end: <script type="text/javascript">
    *var Accordion1 = new Spry.Widget.Accordion("Accordion1");{defaultPanel:params.panel?params.panel:0});*
    </script>
    Is the problem that there are more than 9 panels?
    I don't know if you have enough patience to help me again?

  • IFRAME scroll to anchor problem

    I am having difficulty using IFRAME and anchors. When I place
    an anchor within the IFRAME and then click to go to that anchor,
    the parent page scrolls to the IFRAME's location on the screen and
    the IFRAME scrolls to that anchor. How do I make the IFRAME, and
    only the IFRAME, scroll to the anchor?
    We have a User Acceptance Test site located at
    uat.itclarity.co.uk/our_services2.html where you can see our
    problem by clicking on the 'more' link.
    Any help would be gratefully received.

    There is nothing wrong with what you have shown us, hence the problem lies elsewhere.
    For us to help you without having to guess what you have done, it is important that you give us the whole picture such as giving us a URL to the site.
    However, very little can go wrong with the script and we can limit our guessing game to a few points, namely
    have you included the jQuery library?
    did you set the correct ID to the top reference?
    The following is what a correct version of the page will look like
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    </head>
    <body>
    <div id="top">This is the top. Please scroll down to the 'Back to Top' link.</div>
    <div style="height: 1200px"></div>
    <a href="#top" class="anchorLink">Back to Top</a>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
    <script>
    $(document).ready(function(){
      $(".anchorLink").click(function(e){
        e.preventDefault();
        var id    = $(this).attr("href");
        var offset = $(id).offset();
        $("html, body").animate({
          scrollTop: offset.top
        }, 100);
    </script>
    </body>
    </html>

  • JavaFX 2.2 TextField and TextArea use black text-fill on select.

    Two of my applications--one FXML and the other UI-coded on NetBeans7.1.1--both have a problem when user selects text in either TextArea or TextField when editing. When content word is double-clicked, the selection background becomes dark blue (dodgerblue) but the text remains BLACK. According to JavaFX-CSS reference the default for -fx-highlight-text-fill is WHITE but this doesn't seem to occur, assuming that "highlight" is the correct operation name.
    I tried an explicit CSS statement: .text-medium {-fx-font: 14 serif;
         -fx-highlight-text-fill: white;
         -fx-highlight-fill: lightgreen;
    } even trying to change the selection background. This also had no effect on selected text color or background.
    Interestingly, other "selection" operations for a TableView or ListView cell work as specified.
    I don't know the JavaFX build version. It came imbedded in jdk1.7.0_03 and was updated with "javafx-windows-i586__Vlatest.exe" download on May 2, 2012.
    Please let me know if this is abnormal and, if so, how it can be fixed.

    MORE INFO:
    The applications and testing is now running on up-to-date platforms: jdk 7.2.0_u4, javafx-2_2_0-beta-b10, NetBeans 7.2 Beta, and JavaFxSceneBuilder 1.0 (which is now somewhat integrated into NB7.2).
    The basic problem--highlighted text-fill color for both TextField and TextArea remains BLACK when double-clicked or selected draging cursor. This should be WHITE by default and the black text is almost invisible.
    Another discovery is that the legendary CTL-Z does not work within TextArea or TextField. All of the other edit keys seem to be fine. My applications have a lot of edit functions so not having an "undo" function is disappointing. Maybe there is some API disclaimer as to CTL-Z being unsupported. Anyone know about this?

  • Spry and link to named anchors

    I have a page - http://jenniferyarro.com/schedule_postcardNew.htm.  I want it to link to the named anchors within a tabbed Spry widget - see page http://jenniferyarro.com/schedule_detailNew.htm.
    I put a named anchor inside each tabbed panel, I also tried to put the anchor on each tab.  Neither one works. It appears that the anchor sees the widget as one object, therefore I am taken to the correct page, but always to the same tab (ie the one that is set as default).  I was wondering if there is a way to have it link directly to the tab that I want open.
    Regards,
    Lisa

    You may try posting this question in the Spry Forum... as this is the InContext forum.
    http://forums.adobe.com/community/labs/spry
    Good Luck,
    -Tom

Maybe you are looking for

  • Best practice to implement different Xcelsius dashboard for different users

    I'm implementing an Xcelsius dashboard that requires to show each individual user with different content (e.g. When a user logins in, the dashboard shows her name and job title, her performance and her subordinate's performance).  I'm just wondering

  • Why ehen appending text file to text area, all the text in 1 line..

    please hlp       public void actionPerformed(ActionEvent e)           TArea.setText("");           try           String StrNeeded;           BufferedReader BR;           BR=new BufferedReader(new InputStreamReader(new FileInputStream("Data.txt")));  

  • Frequency out of range

    I hooked up my MacBook Pro to a high quality Sony Data Projector and the screen showed the message: "Frequency out of range". I tried detect displays, which didn't help. I could not get an image until I clicked on "Mirror Displays" under System Prefs

  • Changing name of "Home" in Finder under Places

    Some way I have changed "Home" to another name in Finder and now I want to change it back to "Home" but I do not remember how (or why) I had changed it originally. I would appreciate your help. Thanks.

  • Sort by "total" in Answers

    Based on a star schema model in OBIEE, i create the following report in Answers: Year > Customer Sector > Customer Ranking > Number of Customers > Profitability I want to display the report so that, for a given year, sectors are displayed in order of