Targeting iframes

Hello
I am new to Actionscript 3.0, so I am asking for help.
How do you target html iframes with actionscript within a
flash movie?
I have several buttons I wish to have target a single frame.
I know that in Actionscript 2.0 and 1.0 it only requires a
small amount of code, so I assume 3.0 also only requires a small
amount of code.
Thank you for any help/suggestions.

Hi k.mathis,
I will suggest that you shoulld keep the function same for
every button.
Please read the sample code snippet below this might help.
B1_btn.addEventListener(MouseEvent.CLICK, onButtonClicked);
B2_btn.addEventListener(MouseEvent.CLICK, onButtonClicked);
B3_btn.addEventListener(MouseEvent.CLICK, onButtonClicked);
function onButtonClicked(evnt:MouseEvent)
if(evnt.target == B1_btn)
//Do B1_btn specific code here....
else if(evnt.target == B2_btn)
//Do B2_btn specific code here....
else if(evnt.target == B3_btn)
//Do B3_btn specific code here....

Similar Messages

  • GetURL target IFRAME

    Hello guys and gals.
    I'm trying to do something which should be amazingly easy and
    fundamental, but which just won't work. I've looked all over the
    web, millions of forums, and all through flash help and still can't
    get a solution.
    Basically I'm trying to target an IFRAME with a getURL
    command. I've seen loads of people all over the place having the
    same problem, but nobody seems to come to any definitive
    conclusion, and none of the solutions will work for me.
    I've tried the JavaScript function, and tried fiddling about
    with parameters but nothing seems to work. I can't believe that
    something so basic could possibly be so difficult - especially
    since I know I'v ebeen able to do it in the past.
    I'm using Flash 8, and trying to target an IFRAME called
    'livebox'
    I have named and IDd the frame, and I know that you should be
    able to specify the frame in the getURL command but it doesn't
    work. Please help as this is really winding me up!
    Cheers
    Marc

    IFRAME are HTML elements... getURL can execute some
    javascript code but I can't access an HTML tag directly. The reason
    is simple: getURL can't receive a return value(or HTML object) so
    if you want to execute something like top.yourFrameId.... browser
    will return an HTML IFRAME object to the caller and in your case is
    getURL.
    Try to call a javascript function,
    getURL("javascript:yourFunction(yourParams);"); .On IE you will
    probably need to use an Fscommand javascript call... ugly but
    sometime is necessary. In this javascript function you will call
    you IFRAME and it will work...

  • Targeting iframe with AS3

    How do I do this so that it works properly?
    I want to use navigation (buttons) built in flash to target
    the iframe that will be on the same page as the flash swf.
    the user clicks the button ie. photos and the iframe is
    loaded with the html page that has been called. Then the next
    button is clicked and that iframe is loaded with different html
    content again or a movie or what ever.
    There is a lot of junk code out there in web land. What is
    the correct way to do this without browser issues? ( yes I mean
    Internet Explorer) Do I need Java too?

    Hi,
    IE may be catching the page. I suggest you append a random
    url variable to the href of frame every time you send request. As a
    matter of fact I find it to be a good practice to add a random url
    variable value every time request is sent (this includes requests
    from flash). For instance (JS):
    &rand=Math.floor(Math.random()*10000000) - you can use the
    current time too: &rand=new Date()).getTime()
    Also, try document.frames['myIframe'].location.href = src;
    instead of window.frames['myIframe'].location.href = src;
    I found a cool way to do that to accomodate all the browsers:
    (document.frames || window.frames)['myIframe'].location.href
    = src;
    Another approach could be to call the ir=frame by its ID:
    var ifr = document.getElementById("frameID");
    ifr.location.href = src;
    Let me know if you solved this.

  • Flash button targeting iframe

    I have a flash nav the has button and on the same html page I
    have an iframe. The iframe is in a table. I cannot taget the iframe
    to change the html within. It just open the html I am calling in a
    new window each time. I am useing the get url , and in the window
    space I am putting the name of the iframe. I have been told this
    will work but it doesn't I believe because it is in a table. Heres
    the layout....PLEASE HELP
    http://www.bravocorp.com/hyper06/

    hi Rob,
         thanks for the advice, i managed to solve the porblem (i put the script in the wrong frame of the timeline where the buttons movie symbol is)
    but another problem came in hand, when i try it on safari, its all good, smooth and no borders, but when i try it on firefox, theres a white border appearing on it, i think its compatibility problem?
    ill try the 1st that you mentioned maybe it'll work since i used the ".swf" file than the html in the iframe
    tnx Rob.

  • Linking between two IFRAME tags on the same JSP page

    I have a JSP (lets call it �PAGE_A.jsp�) that contains a table� the <TD> tags hold IFRAME tags with an initial �src� referencing a �blank.jsp��

    <!-- Report View Table-->
    <table width="100%">
    <tr>
    <td>
    <iframe id='report_view' name="report_view" width='60%' height="500" frameborder="0" src='blank.jsp'>
    </td>
    <td align="left">
    <iframe id='drilldown_view' name="drilldown_view" width='40%' height="500" frameborder="0" src='blank.jsp'>
    </td>
    </tr>
    </table>

    At a point, the user initiates a call to a servlet, and the output (PAGE_B.jsp) is returned to the first IFRAME �report_view�.
    PAGE_B.jsp contains HTML anchor tags that call the servlet again, this time the return target is the second IFRAME �drilldown_view� :
    ( Some Text).
    Clicking the link produces the desired page to be generated and displayed in the correct IFRAME running IE 5.5, however, the same code under NETSCAPE 7.x causes the �linked� page to open in a new browser window.
    I have deduced that this effect may be due to the NETSCAPE browser �thinking� that the targeted IFRAME (�drilldown_view�) should be a �child� of the IFRAME that contains the link (�report_view�), instead of another IFRAME belonging to PAGE_A.jsp. Under this circumstance, NETSCAPE cannot find the �target�, and thus redirects to a new browser window.
    Q: Is there a way to specify the �parent� of the �iframe� in the anchor�s �target� attribute?

    target in a link shouldn't care, as long as the IFRAME is in the same window... It should be able to find it.
    Otherwise, you could explore using Javascript to get a reference to the object by specifying the path:
    var oIFrame = top.document.getElementById('drilldown_view');
    oIFrame.src = 'somepage.html';
    that could work.. I've used that type of thing before.

  • Spry Accordion with iFrames

    I have a Spry Accordion which I'm using on the same page as an iFrame setup. I want to link the AccordionPanelTab to an iFrame link.
    In order to get the iFrame to work I need to link like this:
    <a href="iframepage.php" onclick="return changeIframeSrc('iframe', this.href);" target="iframe">
    This works for links within AccordionPanelContent but not if I link the AccordionPanelTab.
    I can get the AccordionPanelTab to link by
    <a href="iframepage.php" onclick="window.location=this.href;return false;">
    but not within the iFrame. Is there a way of combining these two to make them work or another way of making the AccordionPanelTab link?
    Many thanks.

    Have a look at the following
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <link href="SpryAssets/SpryAccordion.css" rel="stylesheet">
    </head>
    <body>
    <p>Open by Panel Index:
      <a href="#" onclick="Accordion1.openPanel(0); return false;">0</a> |
      <a href="#" onclick="Accordion1.openPanel(1); return false;">1</a> |
      <a href="#" onclick="Accordion1.openPanel(2); return false;">2</a> |
      <a href="#" onclick="Accordion1.openPanel(3); return false;">3</a>
    </p>
    <div id="Accordion1" class="Accordion" tabindex="0">
      <div class="AccordionPanel">
        <div class="AccordionPanelTab">Label 1</div>
        <div class="AccordionPanelContent">Content 1</div>
      </div>
      <div class="AccordionPanel">
        <div class="AccordionPanelTab">Label 2</div>
        <div class="AccordionPanelContent">Content 2</div>
      </div>
      <div class="AccordionPanel">
        <div class="AccordionPanelTab">Label 3</div>
        <div class="AccordionPanelContent">Content 3</div>
      </div>
      <div class="AccordionPanel">
        <div class="AccordionPanelTab">Label 4</div>
        <div class="AccordionPanelContent">Content 4</div>
      </div>
    </div>
    <script src="SpryAssets/SpryAccordion.js"></script>
    <script>
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    </script>
    </body>
    </html>
    Copy and paste into a test document making sure that the links are correct. Test in your favourite browser.

  • Flash MX - button link to iframe?

    I have an HTML page with a navigation bar created in Flash
    MX. I would like to make the buttons open a URL in an iframe on the
    same page. The iframe is called simply, 'iframe'.
    I have read many forums and tried a dozen suggested action
    scripts, but none work. A few examples below. Can anyone please
    help me make the button open a url in an iframe?
    Examples that don't work::
    on (release) {
    getURL("
    http://www.whatever-target-page.htm",
    "iframe ");
    ANOTHER::
    on (release) {
    getURL("
    http://www.whatever-target-page.htm",
    "_iframe ");
    ANOTHER::
    ANOTHER::
    on (release) {
    getURL("
    http://www.whatever-target-page.htm",
    target="iframe ");
    ANOTHER::
    on (release) {
    butoninstancename.onRelease = function() {
    getURL("
    http://www.whatever-target-page.htm",
    "iframe");
    It is now 1.12am and I have been at this since this
    afternoon. Some forums offer suggestions that don't work and two
    said it was not possible. It must be possible, isn't it? Can
    someone rescue my sanity?
    Thanks
    Jonathan

    Jonathan,
    > I have an HTML page with a navigation bar created in
    > Flash MX. I would like to make the buttons open a
    > URL in an iframe on the same page. The iframe is
    > called simply, 'iframe'.
    Fair enough. :) It probably makes better sense to name that
    iframe
    something more descriptive, like nav, or siteNav, but iframe
    is a valid
    name. When you say this iframe is "called" 'iframe,' what do
    you mean by
    "called"? What HTML are you using?
    > Examples that don't work::
    >
    > on (release) {
    > getURL("
    http://www.whatever-target-page.htm",
    "iframe ");
    > }
    The on() function is Flash 5-era code. It still works just
    fine, but it
    must be attached directly to an object (such as a button) in
    order to work.
    Nowadays, it's more customary to put code into keyframes. But
    assuming
    you've used on() correctly, the above code will look for a
    frame named
    "iframe " <-- note the space character after the letter
    "e".
    > on (release) {
    > getURL("
    http://www.whatever-target-page.htm",
    target="iframe ");
    > }
    Here, you still have that space after the "e", but you're
    including
    something outside the quotation marks in the second
    parameter. The getURL()
    function accepts up to three parameters, separated by commas,
    and all of
    them must be strings. The second parameter *is* your target
    -- this works
    very much like the anchor tag in HTML -- so you don't have to
    use the word
    "target" here.
    > ANOTHER::
    >
    > on (release) {
    > butoninstancename.onRelease = function() {
    > getURL("
    http://www.whatever-target-page.htm",
    "iframe");
    > };
    > }
    Here, you're using both the on() function and the newer
    (since Flash MX)
    way to handle events, which isn't going to work. Because of
    the on()
    function, this button doesn't need an instance name --
    because it's clear
    which button is intended to receive these instructions -- so
    ... I suppose
    one might say you're mixing metaphors here. ;)
    That said, your getURL() parameters are spot on in this last
    sample, so
    revise your work to this:
    on (release) {
    getURL("
    http://www.whatever-target-page.htm",
    "iframe");
    ... and that should do it.
    For a bit more detail on the on() function, see this:
    http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • IFrames and other Hyperlink attributes

    Currently there is no way to link from a menu to a specific iframe. Many web designers like to have the visitor stay on their website and view information. A good example are Google embedded maps. But if I, for example, had many map areas, I would have to create several child pages having the Google map code and then link to that page. But, that would replace the whole page and not show up in one spot over and over again. Or I could point to an anchor with the maps on the same page. When the simplest means is to have a TARGET attribute with the link that would send the information to a single iframe. No extra pages, no extra long single page. Currently you can choose one of our own pages. You can choose to open in another window or tab. You can choose a file. Or you can type in an url site. There is a easy fix to this.
    1. Have a options section when you click 'Hyperlinks' that lists all common placement areas such as _blank, _self, _top _parent, _new, iframe.
    or
    2. Just allow the user to click on the hyperlink button and type in target="{iframe name}" or "{attribute}" like they would a url.
    or
    3. Have a 'target' choice in the hyperlink dropdown that  lets the user type in the same place as the url what he needs. ie: iframe name, _attribute
    Currently the only way a user can specify specific areas is to publish and then copy the html, then find the code where they can add the target information. This is difficult to make sure you get all the right html code.

    You can go to Page > Page Properties > Metadata, and in the HTML for <head>: area, paste:
    <base target="_parent" />
    This sets the base target to "_parent". It's important not to have the "Open in new window" selectected, otherwise that will overwrite the base target.
    Hope this helps

  • Creating Browse CD Button in DW CS3

    Greetings, Programs! (A little Tron humor...)
    I have a CD that I am authoring and distributing to my
    clients. On insertion, the CD opens an HTA with an iframe for the
    main interface, which is an html file. At the top of this file is
    my navigation bar. One of the options I have is to browse the CD.
    From my harddrive, this works fine, opening to the folder in a new
    window that my files are on. However, when I try to make it work
    either emulated on DAEMON Tools or as a burned CD, it does nothing.
    The html for my button is as follows (abridged):
    <a href="./" target="_blank"><img
    src="image.gif"></a>
    It seems that something happens; the top blue Title Bar
    flashes as if the HTA is moving to the background, but then no
    window comes to the foreground. Windows Explorer is not called and
    it goes back to its original state. The navigation page within my
    HTA has another iframe within it; if I set my target to the
    iframe's name "content", Windows Explorer shows up in the target
    iframe. That would be fine, but the directory tree isn't visible,
    it shows that simplified blue section thing (as if the folder
    button isn't selected on the Windows Explorer toolbar). Is there a
    way to make it happen either way, with Windows Explorer opening at
    the root folder of the CD drive either as a new window or within my
    content iframe with the directory tree? If so, does Javascript come
    into play here, with some kind of command structure as
    [href="javascript:parent.window.open('./','_blank');"] ? My
    experience with JScript is minimal, but I am open to strecthing my
    skillset. ;-p
    One other thing: if anyone has a strong understanding of
    HTAs, why is it that with my HTA maximized (HTA:APPLICATION
    Windowstate="Maximized") I can't reveal the Windows Taskbar when I
    move my cursor to the bottom? I can activate it via my keyboard
    (Alt+Tab or the Windows button), but not with my mouse. Any ideas?
    Thank you very much in advance for your feedback!!
    Cheers!

    Greetings, Programs! (A little Tron humor...)
    I have a CD that I am authoring and distributing to my
    clients. On insertion, the CD opens an HTA with an iframe for the
    main interface, which is an html file. At the top of this file is
    my navigation bar. One of the options I have is to browse the CD.
    From my harddrive, this works fine, opening to the folder in a new
    window that my files are on. However, when I try to make it work
    either emulated on DAEMON Tools or as a burned CD, it does nothing.
    The html for my button is as follows (abridged):
    <a href="./" target="_blank"><img
    src="image.gif"></a>
    It seems that something happens; the top blue Title Bar
    flashes as if the HTA is moving to the background, but then no
    window comes to the foreground. Windows Explorer is not called and
    it goes back to its original state. The navigation page within my
    HTA has another iframe within it; if I set my target to the
    iframe's name "content", Windows Explorer shows up in the target
    iframe. That would be fine, but the directory tree isn't visible,
    it shows that simplified blue section thing (as if the folder
    button isn't selected on the Windows Explorer toolbar). Is there a
    way to make it happen either way, with Windows Explorer opening at
    the root folder of the CD drive either as a new window or within my
    content iframe with the directory tree? If so, does Javascript come
    into play here, with some kind of command structure as
    [href="javascript:parent.window.open('./','_blank');"] ? My
    experience with JScript is minimal, but I am open to strecthing my
    skillset. ;-p
    One other thing: if anyone has a strong understanding of
    HTAs, why is it that with my HTA maximized (HTA:APPLICATION
    Windowstate="Maximized") I can't reveal the Windows Taskbar when I
    move my cursor to the bottom? I can activate it via my keyboard
    (Alt+Tab or the Windows button), but not with my mouse. Any ideas?
    Thank you very much in advance for your feedback!!
    Cheers!

  • Css Center Align Problem

    Alright, I am making my Portfolio (Hosted on Dropbox for this porpuse) and once you go onto it you can see that it is not aligned correctly. Now in dreamweaver it comes up normal:
    I have done this by placing all the Div's into a wrapper div, which under the css style sheet has the margin method of aligning it to the middle:
    #Wrapper {
              position:fixed;
              width:640px;
              margin: auto;
    Whats worng with this?

    I've made those changes, I have achived the look I want, which is what you can see in the browser. But what I want it to do it be centred up in the middle of the page.
    Html Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Sean Hall's Portfolio</title>
    <link href="Css.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="Wrapper">
    <div id="menu">
    <table width="68" border="0" align="center" cellspacing="14">
      <tr>
        <td><a class="Home" href="pages/homepage.html" target="iframe"></a></td>
      </tr>
      <tr>
        <td><a class="About" href="pages/about.html" target="iframe"></a></td>
      </tr>
      <tr>
        <td><a class="Social" href="pages/social.html" target="iframe"></a></td>
      </tr>
      <tr>
        <td><a class="work" href="pages/work.html" target="iframe"></a></td>
      </tr>
      <tr>
        <td><a class="Contact" href="php/contact.php" target="iframe"></a></td>
      </tr>
    </table>
    </div>
    <div id="main">
      <div id="Content_bg">
      <iframe src="pages/homepage.html" height="100%" width="100%" allowtransparency="1" frameborder="0" name="iframe"></iframe>
      </div>
    </div>
    </div>
    </body>
    </html>
    Css Stlyesheet:
    @charset "utf-8";
    body{
              background-image: url(Images/Background.fw.png);
              background-color: #DCDCDC;
              background-repeat: no-repeat;
              text-align:center;
    #Wrapper {
              position:fixed;
              width:640px;
              left:0 auto;
              margin-top:120px;
    #main {
              position:fixed;
              width:561px;
              left:75px;
              background-image:url(Images/Body.fw.png);
              background-repeat:no-repeat;
              height:400px;
    #menu {
              position:fixed;
              width:68px;
              height:264px;
              background-image:url(Images/menu.fw.png);
              text-align:center;
    #Content_bg {
              position:fixed;
              width:469px;
              height:232px;
              background-image:url(Images/Content.png);
              margin-left: 45px;
              margin-top: 12px;
    #gallery {
              position: fixed;
              width:420px;
              height:70px;
              margin-top:300px;
              margin-left:50px;
              background-image:url(Images/footer.fw.png);
              z-index:1;
    #Wrapper #menu table {
              text-align: center;
              height:250;
              width: 50px;
              top: 10px;
    /*Nav Section */
    a.Home {
              display: block;
              width: 33px;
              height: 34px;
              background-image:url(Images/Buttons/home_off.fw.png);
              margin:0 auto;
    a.Home:hover {
              background-image:url(Images/Buttons/home_on.fw.png);
    a.About {
              display: block;
              width: 33px;
              height: 34px;
              background-image:url(Images/Buttons/about_off.fw.png);
              margin:0 auto;
    a.About:hover {
              background-image:url(Images/Buttons/about_on.fw.png);
    a.Social {
              display: block;
              width: 33px;
              height: 34px;
              background-image:url(Images/Buttons/social_off.fw.png);
              margin:0 auto;
    a.Social:hover {
              background-image:url(Images/Buttons/social_on.fw.png);
    a.work {
              display: block;
              width: 33px;
              height: 34px;
              background-image:url(Images/Buttons/work_off.fw.png);
              margin:0 auto;
    a.work:hover {
              background-image:url(Images/Buttons/work_on.fw.png);
    a.Contact {
              display: block;
              width: 33px;
              height: 34px;
              background-image:url(Images/Buttons/contact_off.fw.png);
              margin:0 auto;
    a.Contact:hover {
              background-image:url(Images/Buttons/contact_on.fw.png);

  • ADF create form : change value fields

    Hi all,
    I have a create form:
    first problem
    one field is an ID known by my backing bean
    <af:form>
            <af:panelFormLayout>
              <af:inputText value="#{bindings.Mpr.inputValue}"
                            label="#{bindings.Mpr.hints.label}"
                            required="#{bindings.Mpr.hints.mandatory}"
                            columns="150"
                            maximumLength="#{bindings.Mpr.hints.precision}"                       
                            shortDesc="#{bindings.Mpr.hints.tooltip}"
                            clientComponent="true">
                <f:validator binding="#{bindings.Mpr.validator}"/>
                <af:convertNumber groupingUsed="false" pattern="#{bindings.Mpr.format}"/>
                <af:clientListener method="getMpr" type="mouseOver"/>
                <af:serverListener method="#{backing_main.remplirChampMprCreerNote}" type="seekMPR"/>
              </af:inputText>I would like that when my page appears this value field *#{bindings.Mpr.inputValue}* be filled by this one *#{backing_bean.myID}* .
    second problem
    I have 3 richTextEditor who provide auto-completion (If you type ADF and then *<ctrl+space>*, ADF would be replaced by Application Developpement Framework thanks to a bean)
    It works outside a create form . Inside a create form the problem is when calling my bean I have a validator alert who say "you must enter a value" and my Component's value is reseted..
    Does someone knows these problems ?
    Thanks,
    valéry.

    Hello simply,
    I have an af:form generated by a viewObject's drag and drop, the automatically generated code use bindings, I just replace 3 af:inputText by 3 af:richTextEditors and I add the listeners for <ctrl+space> event.
    here is the JSF page :
        <f:view>
        <af:document title="une note au dossier médical">
        <af:messages/>
                            <f:verbatim>
                <![CDATA[       
                <script language="javascript" type="text/javascript">
                var comp;
                var target;
                var prevKey;
                var curKey=0;
                function wysiwygKeyPress(event) {
                    prevKey = curKey;               
                    curKey = event.keyCode;
                    var wysiwygValue="";
                    if(prevKey==17 && curKey==32)   // CTRL + espace
                        var richTextEditor = comp; //wysiwygmode
                        if (target.contentWindow.document.attachEvent){   //IE specific
                             if(target.contentWindow.document.body.firstChild.innerHTML)
                                wysiwygValue = target.contentWindow.document.body.firstChild.innerHTML;
                             else
                                 wysiwygValue = target.contentWindow.document.body.innerHTML;
                          else {     //FF specific
                             wysiwygValue = target.contentDocument.body.firstChild.textContent;
                        AdfCustomEvent.queue(comp, "customEvent",{value1:wysiwygValue}, true);
                function rteMouseOver(event) {
                    comp = event.getSource(); //helper function
                    target = event._target;
                    //IE could not find the event._target
                    var clientId = comp.getClientId()  + "::cont";
                    var iframe = document.getElementById(clientId);
                    if (iframe.contentWindow.document.attachEvent) { //IE
                       target = iframe;
                       //IE uses attachEvent
                       iframe.contentWindow.document.attachEvent('onkeydown', function() { wysiwygKeyPress(iframe.contentWindow.event); });
                    else {
                    //FF uses addEventListener
                      iframe.contentWindow.addEventListener('keydown',wysiwygKeyPress, true);
                </script>
                ]]>
            </f:verbatim>
          <af:form>
            <af:panelFormLayout>
              <af:inputText value="#{bindings.Mpr.inputValue}"
                            label="#{bindings.Mpr.hints.label}"
                            required="#{bindings.Mpr.hints.mandatory}"
                            columns="150"
                            maximumLength="#{bindings.Mpr.hints.precision}"                       
                            shortDesc="#{bindings.Mpr.hints.tooltip}"
                            clientComponent="true"
                            >
                <f:validator binding="#{bindings.Mpr.validator}"/>
                <af:convertNumber groupingUsed="false" pattern="#{bindings.Mpr.format}"/>
              </af:inputText>
              <af:inputText value="#{bindings.Commentaire.inputValue}"
                            label="#{bindings.Commentaire.hints.label}"
                            required="#{bindings.Commentaire.hints.mandatory}"
                            columns="150"
                            maximumLength="#{bindings.Commentaire.hints.precision}"
                            shortDesc="#{bindings.Commentaire.hints.tooltip}"
                            >
                <f:validator binding="#{bindings.Commentaire.validator}"/>
              </af:inputText>
              <af:spacer width="19" height="17"/>
              <af:richTextEditor value="#{bindings.Observation.inputValue}"
                                 label="#{bindings.Observation.hints.label}"
                                 required="#{bindings.Observation.hints.mandatory}"
                                 columns="150"
                                 shortDesc="#{bindings.Observation.hints.tooltip}"
                                 clientComponent="true">
                    <af:clientListener type="mouseOver" method="rteMouseOver"/>
                    <af:serverListener type="customEvent" method="#{backing_main.ctrlSpaceHandler}"/>
              </af:richTextEditor>
              <af:spacer width="15" height="22"/>
              <af:richTextEditor value="#{bindings.Traitement.inputValue}"
                                 label="#{bindings.Traitement.hints.label}"
                                 required="#{bindings.Traitement.hints.mandatory}"
                                 columns="150"
                                 shortDesc="#{bindings.Traitement.hints.tooltip}"
                                 clientComponent="true">
                    <af:clientListener type="mouseOver" method="rteMouseOver"/>
                    <af:serverListener type="customEvent" method="#{backing_main.ctrlSpaceHandler}"/>
              </af:richTextEditor>                            
              <af:spacer width="17" height="18"/>
              <af:richTextEditor value="#{bindings.Conclusion.inputValue}"
                                 label="#{bindings.Conclusion.hints.label}"
                                 required="#{bindings.Conclusion.hints.mandatory}"
                                 columns="150"
                                 shortDesc="#{bindings.Conclusion.hints.tooltip}"
                                 clientComponent="true">
                    <af:clientListener type="mouseOver" method="rteMouseOver"/>
                    <af:serverListener type="customEvent" method="#{backing_main.ctrlSpaceHandler}"/>
            </af:richTextEditor>                            
            </af:panelFormLayout>
            <af:commandButton text="Sauvegarder la note"
                              action="#{backing_main.creerNote}"/>
          </af:form>
        </af:document>
      </f:view>A pageDef file is automatically created :
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
                    version="11.1.1.52.5" id="ajoutNote3PageDef"
                    Package="viewcontroller.pageDefs">
      <parameters/>
      <executables>
        <iterator Binds="TmpnoteView1" RangeSize="25"
                  DataControl="AppModuleDataControl" id="TmpnoteView1Iterator"/>
        <invokeAction Binds="Create" id="invokeCreate" Refresh="prepareModel"
                      RefreshCondition="${!adfFacesContext.postback and empty bindings.exceptionsList}"/>             
      </executables>
      <bindings>
        <attributeValues IterBinding="TmpnoteView1Iterator" id="Mpr">
          <AttrNames>
            <Item Value="Mpr"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="TmpnoteView1Iterator" id="Observation">
          <AttrNames>
            <Item Value="Observation"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="TmpnoteView1Iterator" id="Traitement">
          <AttrNames>
            <Item Value="Traitement"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="TmpnoteView1Iterator" id="Conclusion">
          <AttrNames>
            <Item Value="Conclusion"/>
          </AttrNames>
        </attributeValues>
        <attributeValues IterBinding="TmpnoteView1Iterator" id="Commentaire">
          <AttrNames>
            <Item Value="Commentaire"/>
          </AttrNames>
        </attributeValues>
        <action IterBinding="TmpnoteView1Iterator" id="Create"
                RequiresUpdateModel="true" Action="createRow"/>
        <action id="Commit" RequiresUpdateModel="true" Action="commitTransaction"
                DataControl="AppModuleDataControl"/>
      </bindings>
    </pageDefinition>I add to this form a create button and a commit button, you could see it in the pageDef :
    <action IterBinding="TmpnoteView1Iterator" id="Create"
                RequiresUpdateModel="true" Action="createRow"/>
    <action id="Commit" RequiresUpdateModel="true" Action="commitTransaction"
                DataControl="AppModuleDataControl"/>I call these actions in the bean creerNote called by my submit buton:
    public String creerNote() throws IOException {
            // --- modify fields to remove some html tags --- //
            // --- 1. get EL context --- //
            FacesContext facesContext = FacesContext.getCurrentInstance();
            Application app = facesContext.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            // --- 2. get ExpressionValues --- //
            ValueExpression valueExpObserv = elFactory.createValueExpression(elContext, "#{bindings.Observation.inputValue}", String.class);
            ValueExpression valueExpConcl = elFactory.createValueExpression(elContext, "#{bindings.Traitement.inputValue}", String.class);
            ValueExpression valueExpTrait = elFactory.createValueExpression(elContext, "#{bindings.Conclusion.inputValue}", String.class);
            // --- 3. get String values --- //
            String texteObserv = (String)valueExpObserv.getValue(elContext);
            String texteConcl = (String)valueExpConcl.getValue(elContext);
            String texteTrait = (String)valueExpTrait.getValue(elContext);
            // --- 4. remove some html tags --- //
            texteObserv = texteObserv.replaceAll("<p>","");
            texteObserv = texteObserv.replaceAll("</p>","");
            System.out.println("[Main.java] CreerNote > observations après traitement : "+texteObserv);
            texteConcl = texteConcl.replaceAll("<p>","");
            texteConcl = texteConcl.replaceAll("</p>","");
            System.out.println("[Main.java] CreerNote > conclusions après traitement : "+texteConcl);
            texteTrait = texteTrait.replaceAll("<p>","");
            texteTrait = texteTrait.replaceAll("</p>","");
            System.out.println("[Main.java] CreerNote > traitements après traitement : "+texteTrait);
            // --- set new values --- //
            valueExpObserv.setValue(elContext, texteObserv);
            valueExpConcl.setValue(elContext, texteConcl);
            valueExpTrait.setValue(elContext, texteTrait);       
            // --- set mpr field --- //
            ValueExpression valueExpMPR = elFactory.createValueExpression(elContext, "#{bindings.Mpr.inputValue}", String.class);
            valueExpMPR.setValue(elContext, getMprSelected());
            // --- call the create pageDef's action --- //
            bindings = getBindings();
             OperationBinding operationBinding = bindings.getOperationBinding("Create");
             operationBinding.execute();    
            // --- call the commit pageDef's action --- //
            bindings = getBindings();
            operationBinding = bindings.getOperationBinding("Commit");
            operationBinding.execute();       
            return "Abrev";
    }As you know, If I type <ctrl+space> I call the method ctrlspaceHandler who change the value of the component.
    public void ctrlSpaceHandler(ClientEvent clientEvent) {
            // --- get applicationModule --- //
            if(am==null)
               setAm();
            // --- get myViewObject --- //
            ViewObjectImpl mesAbrev = am.getThesaurusVO1();
            ViewCriteria vc =  mesAbrev.createViewCriteria();
            ViewCriteriaRow vcRow = vc.createViewCriteriaRow();
            // --- get richTextEditor's last word without html tags--- //
            RichTextEditor rte = (RichTextEditor) clientEvent.getComponent();
            String texte = (String)clientEvent.getParameters().get("value1");
            System.out.println("[Main.java] ctrlSpaceHandler > valeur du rte via rte.getParameter: "+texte);
            int indiceDernierMot = texte.lastIndexOf(" ");
            indiceDernierMot++;
            String abr = texte.substring(indiceDernierMot).toUpperCase();
            abr = abr.replaceAll("<BR/>",""); abr = abr.replaceAll("<br>","");
            abr = abr.replaceAll("</P>",""); abr = abr.replaceAll("</p>","");
            abr = abr.replaceAll("</FONT>",""); abr = abr.replaceAll("</font>","");
            abr = abr.replaceAll("</SPAN>",""); abr = abr.replaceAll("</span>","");                                           
            System.out.println("[Main.java] ctrlSpaceHandler > abréviation recherchée : "+abr);
            // --- add a criteria to my viewObject --- //
            vcRow.setAttribute("Msgcourt", "like '"+abr+"'");
            vc.addElement(vcRow);
            mesAbrev.applyViewCriteria(vc);
            // --- seek the abbreviation --- //
            mesAbrev.executeQuery();
            // --- get row found --- //
            Row row = null;
            while(mesAbrev.hasNext())
                row = mesAbrev.next();
                System.out.println("[Main.java] ctrlSpaceHandler > ligne trouvée : "
                               +row.getAttribute("Spr") +" - "
                               +row.getAttribute("Msgcourt")+" - "
                               +row.getAttribute("Msglong"));
            // --- if found --- //
            if(row!=null)
                // --- get abbreviation's detail --- //
                String detail = (String)row.getAttribute("Msglong");       
                System.out.println("[Main.java] ctrlSpaceHandler > message long = "+detail);
                // --- replace abbreviation by detail in the text and update graphical component --- //
                texte = texte.replaceAll(abr.toLowerCase(), detail);
                texte = texte.replaceAll(abr.toUpperCase(), detail);
                rte.setValue(texte);
                RequestContext.getCurrentInstance().addPartialTarget(rte);
    }When debug I see all my method bean works fine.
    But as result on the form I have a message who say "first enter value", I can bypass this problem if I remove all richTextEditor's required attributes. Biggest problem is that my richText component is cleared after ctrl+space... My test with a richTextEditor bind to a bean was OK, the only difference here is my richTextComponents uses bindings with pageDef.
    Thank you,
    Valéry

  • Open pdf file in flex

    Hi Guys,
    I want to open pdf file in Flex (Web Application). I am unable to open it, Please guide and help me.
    Thanks in advance..
    Rangrajan.

    Rangrajan,
    If you have the complete URL to the file; for example http://forums.adobe.com/filename.pdf
    or C:\users\yourname\filename.pdf
    Although I have not used it, you can pass the URL to Drumbeat Insight iFrame
    You can try their product, get prices for source code or library here: http://drumbeatinsight.com/products
    They offer email support for their products.
    You can make your own iFrame, with several sources.  Here is some background.
    http://www.ozzu.com/flash-forum/targeting-iframe-from-flash-t30013.html
    Let me know if this solves your file issue.
    I need to write a server-side app to listen to my web service, upload the PDF, then write a temporary file.pdf to the server,
    before my web app can load the PDF into a web hosted iFrame.
    Adobe needs to make this easy (and I even know some developers in the San Jose Adobe headquarters).
    Bruce

  • Using "Role Menu"

    Hai Marc,
    As u know that in "Business Explorer" there are "Web Application Designer". We are studiny that right now. But we have problem when we using one of web item "Role Menu".
    My question is, if i create a template and devided into 2 coloms so then when i click the "role menu" the result appers in the other coloms.....is it posibble????
    Best regards,
    Wawan Suwandi

    Hi,
    you can use a frameset with 2 frames. One for the role menu and one for the content. Otherwise you can use "inline frames"! Dont forget to specify the name from the target (iframe or frame name) as Dirk said!
    Example:
    <html>
    <!-- BW data source object tags -->
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="SET_PROPERTIES"/>
             <param name="TEMPLATE_ID" value="RMENU"/>
             TEMPLATE PROPERTIES
    </object>
    <head>
    <meta http-equiv="Content-Language" content="de">
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Neue Seite 1</title>
    </head>
    <body>
    <p><b><font face="Verdana" size="2">Role menu:<BR> </font></b><object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="ROLEMENU_1"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_MENU"/>
             <param name="GENERATE_CAPTION" value=""/>
             <param name="TARGET" value="iframe1"/>
             <param name="HEIGHT" value="103"/>
             <param name="BORDER_STYLE" value="FORM"/>
             <param name="IFRAME" value="X"/>
             <param name="DISPLAY_USER" value="X"/>
             ITEM:            ROLEMENU_1
    </object></p>
    <p><b><font face="Verdana" size="2">Content:</font></b><br>
    <iframe name="iframe1" src="http://www.sap.com" style="WIDTH: 938px; HEIGHT: 489px">
    Your browser does not support frames</iframe></p>
    </body>
    </html>
    Its only an idea (i got no time to make nicer one). But all in all Frameset looks nicer! You can make cool designs if you want. Many things are possible.
    If you need templates drop me a mail.
    Regards,
    Adem

  • How to force pop up menu to collapse when link clicked

    I have a cascading pop up vertical menu built with Fireworks
    8. It opens over the target iframe into which the linked content
    loads. I would like the menu to collapse when the user makes a
    selection.
    Can I do this?
    Thanks...
    J

    Note: This thread was originally posted in the [Java Programming|http://forums.sun.com/forum.jspa?forumID=31] forum, but moved to this forum for closer topic alignment.

  • Showing applets depending upon user input in one web page

    hi, I have three applets. I want to create a webpage, put three buttons (or other interactions) on it. If button one is clicked, applet one is shown. If button two is clicked, applet two is shown. I want this to happen in one web page only and one applet at a time depending on user input. Is there a way to do it? Do I need to use javascript? I am new to javascript ,but if you can point me to relevant javascript topics, i am willing to learn it. Thanks.

    There are a couple of ways I can think of off the bat...
    1) Create an IFrame that the Applet will be displayed in. The button you press submits a form whose target is the IFrame and whose action is a page with the correct Applet.
    2) Actually load all 3 Applets on the page and hide them all in a invisible divs. The button calls a javascript function that unhides a specific div (and hides all the others to be sure only one is displayed at a time).
    3) Uber-javascript AJAX like control that when the button is pushed makes a request to a page that returns the applet tag which the javascript control then inserts into the page at the proper location.
    I would toss up between 1 & 2.
    For code, search Google for important key words (like "form target iframe", or "javascript make divs invisible").

Maybe you are looking for

  • Problem in Creative Cloud desktop app filtering: can't find After Effects CC(12) version

    I need to export a CC(2014) After Effects project in CS5. I've saved in CC(12) version but now i need After Effects CC(12) to be able to save the project in CS6. If i filter by "all versions" or by "audio/video" i see After Effects CC(2014) but if i

  • Mac Pro 2014 & Samsung Legacy TV

    Try to make this short. My system Rotel recievor, Mac Mini (os 10.9.3) and Seamsung Lecacy (65" 4K) works fine. Replace the Mac Mini with Mac Pro (2014) and no video. Bi-pass Rotel and video works.   Interestingly the "Display" screen using OS 10.9.3

  • Oracle stored procedure call failed,but not captured by the error handling

    Hi All, I have a unix shelll script which calls a stored proc in Oracle, the stored proc call failed due to "ORA-01033: ORACLE initialization or shutdown in progress". But it is not captured in the error handling block, Any ideas why this had happene

  • What's a good phone that will sync with iCal?

    I'm in the market for a new phone, but have absolutely no desire to switch to AT&T, so the iPhone is out. (Sob!) I really want to be able to sync with iCal, with support for alarms so I don't forget stuff. (I also want to sync with Address Book.) Can

  • How to enable PMD tool in JDeveloper 10.1.3.3.0

    Hi, I have installed Oracle JDeveloper 9.0.3 and I require the PMD tool (used for executing java files for specific standards) to get installed in the same IDE. After downloading the appropriate version of PMD tool, I have tried pointing the executab