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

Similar Messages

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

  • GetURL() IE iFrame Bug

    I have a flash movie inside an iFrame (I know how bad that
    is, but I have no other options) and 99% of the time everything
    works fine in IE... However, every once in a while anything using
    getURL() to open a link will stop working in IE. Everything that
    does not use getURL to open a link or perform a function works
    fine. This only happens in IE and when I test the page I'm pulling
    into the iFrame by itself the getURL() items work fine... It only
    ever stops working inside the iFrame in IE. Anyone know what causes
    this problem and/or how to prevent it from occurring?
    Thanks!

    I am having the same problem! It is driving me nuts.. to add
    insult to injury I have been trying to get this very elegant (going
    against the design nazi's) grain horizontal scroll bar to work with
    Javascript but gave up and redesigned in flash thinking of course
    this was a sure thing! WORKs awesome with every browser but frames
    IE...works in IE no frames..but in frames..refuses to work
    Exact same issue, very sad!

  • Geturl and iframe driving me nuts!!!

    Howdy guys, i have used this code a million times before and
    now its suddenly stopped working, this is my code in the html for
    iframe...
    [CODE]<iframe src="home.html" name="content" width="342"
    marginwidth="0" height="458" scrolling="yes"
    frameborder="0"></iframe>[/CODE]
    and this is my code in flash...
    [CODE]
    on (release) {
    getURL("about.html","content");
    [/CODE]
    so basically flash should be loading the html page
    "about.html" in to the iframe called "content".
    Instead its just opening content in a new window.
    I dont know what on earth im doin wrong.
    Ive done a search and this fella seems to be having the same
    problem....
    [url]http://board.flashkit.com/board/showthread.php?t=711189&highlight=geturl+iframes[/url ]
    any body else had the same problem?
    Cheers
    Aidan

    -BUMP-
    This is absurd people, can no one figure out what is wrong with this thing? This is not a new problem: http://discussions.apple.com/thread.jspa?messageID=7284984 but no one seems to have any answers.
    Further information: I never had my iDisk activated, and dmnotifyd was still consuming 99% of CPU when sync was set to Manual. I've deactivated my mobile me settings on my computer altogether and force quit the process and so far it hasn't returned, but this clearly is not a workable solution-- I'm paying $100 per year for this crap...
    Message was edited by: czaffa

  • GetUrl Target Failure

    All,
    I have set up an html page with two frames, frMain on the
    left and frDocuments on the right. I am putting a Flash object in
    the frMain frame and trying to get it to open html pages in the
    frDocuments frame. It doesn't work. Every time it is popping up in
    a new window instead.
    My frames are defined as follows:
    <frameset rows="*" cols="400,*" framespacing="0"
    frameborder="no" border="0">
    <frame src="frMain.html" name="frMain" id="frMain"
    title="mainFrame" />
    <frame src="frDocuments.html" name="frDocuments"
    scrolling="Yes" noresize="noresize" id="frDocuments"
    title="Documents" />
    </frameset>
    My flash object is in the frMain frame, and in it I have the
    following code:
    on (click) {
    getURL("test1.html", "frDocuments");
    test1.html pops up in a new window.
    I have tried with and without quotes, I've tried
    main.frDocuments, _parent.frDocuements, parent.frDocuments,
    everything I can think of, and it all works the same.
    This does exactly what I want to do:
    http://www.adobe.com/support/flash/ts/documents/get_url/main.htm
    But in the tech note that goes with it (
    http://www.adobe.com/go/tn_12791
    ) they do not give the actual button code, and under target they
    list " specific name" and not the actual formatting of the text.
    I'm a bit at wits end here, so if anyone can tell me what to
    do differently I would be much appreciative. Thanks in advance.
    Barry

    BarryInDC wrote:
    > Thanks again, you put in a lot of time here :).
    >
    > I took it out of the component and there is no
    difference.
    >
    > If it is a Mac thing, that means the testing site I put
    up should function
    > correctly on your PC? If it does, please let me know.
    I still see component there. Can you verify the URL ?
    Meantime, made one sample, using your frames code tho
    I use normal buttons with getURL action and it works like
    charm on first go:
    http://flashfugitive.com/stuff/frame/
    It's the component and your URL action, when I dig it out
    the cache and load it in level into an new file, the
    debugging
    trace some odd URL path like :
    getURL ("test1.html", _parent.frDocuments);
    Not just there should not be _parent in it but the name is
    w/o quotes
    which means the file action is all messed up and it's not the
    same as
    shown in your previous post.
    Are you sure you uploaded the right files ?
    I tell you, GET RID OF the component. I'm 100% sure it's the
    culprit
    behind all this.
    Best Regards
    Urami
    !!!!!!! Merry Christmas !!!!!!!
    Happy New Year
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

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

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

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

  • GetURL or javascript resolution? to controlling PDF browser

    Okay.. so here is the scenario.
    I am creating a CD that has a Flash projector. The Flash
    projector links to PDF files located on the same CD. Everything
    works great.. except that when you click on the link to open up the
    PDFs, they open in separate windows. So you could have 8 windows
    open at the same time for 8 of the different PDF files.
    I have already tried to make sure that getURL targets _self.
    This works if you publish the Flash file as an HTML instead of the
    .EXE (projector). However, when you click "Back" on the broswer it
    takes you to the first frame instead of the frame that the links
    coincides on.
    It's been suggested that either through actionscript or
    javascript, to issue a command that will open up the particular PDF
    in a new window. OR another suggestion was to add javascript to PDF
    itself so that Acrobat would control the Acrobat Reader.
    Does anyone know how I could go about doing so? or know of
    any online resources?
    Much appreciated.

    Yes FlashJester JStart can solve this issue and only open up
    one Window,
    which will be the actual Adobe Reader application and not
    viewing it through
    a browser.
    Download an evaluation copy of JStart from here
    http://jstart.flashjester.com
    and look at the example files given.
    There are many FAQ there also.
    http://www.flashjester.com/?section=faq&cPath=28_41
    Good Luck
    Email us directly if you have any further questions.
    Regards
    FlashJester Support Team
    e. - [email protected]
    w. -
    http://www.flashjester.com
    There is a very fine line between "hobby" and
    "mental illness."

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

  • 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

Maybe you are looking for