Javascript in page segment(urgent)?

Hi,
I want to customize out-of-box Profile pages on WC Spaces. I added a selection box on a page segment(jsff), and I want to do 2 things.
1.     When a user picks an item from the selection box, it should call the parseAddress() javascript function. But, I got js errors from IE but no errors from FF. ‘parseAddress’ is undefined. URL…./MyProfileMainView.jspx
2.     Inside the js function, how can it write to <af:inputText> items?
<?xml version = '1.0' encoding = 'UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<af:panelFormLayout labelWidth="150" id="olipfl1">
<af:panelLabelAndMessage label="#{uib_o_w_pc_p_ProfileMessages.LABEL_BUSINESS_FAX}" labelStyle="font-weight:bold;" id="oliplam1">
<af:inputText value="#{bindings.businessFax.inputValue}" simple="true" columns="40" maximumLength="50" disabled="#{!AdminConfig.ootbFields['fax'].allowEdit}" shortDesc="#{requestContext.formatter[uib_o_w_pc_p_ProfileMessages.ENTER_FIELD][uib_o_w_pc_p_ProfileMessages.LABEL_BUSINESS_FAX]}" id="oliit1"/>
</af:panelLabelAndMessage>
<f:facet name="metaContainer">
<af:resource type="javascript" source=”function parseAddress(event) {            alert("new value: " + event.getNewValue());           } "/>
</f:facet>
<af:panelLabelAndMessage xmlns:af="http://xmlns.oracle.com/adf/faces/rich" label="*Location" id="splam1" labelStyle="font-weight:bold;">
<af:selectOneChoice xmlns:af="http://xmlns.oracle.com/adf/faces/rich" id="ssoc1" simple="true" valuePassThru="true">
<af:clientListener xmlns:af="http://xmlns.oracle.com/adf/faces/rich" method="*parseAddress*" type="valueChange"/>
<f:selectItems xmlns:f="http://java.sun.com/jsf/core" value="#{employeeBean.locationsList}" id="ssi1"/>
</af:selectOneChoice>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="#{uib_o_w_pc_p_ProfileMessages.LABEL_BUSINESS_STREET}" labelStyle="font-weight:bold;" id="oliplam4">
<af:inputText value="#{bindings.businessStreet.inputValue}" simple="true" columns="40" maximumLength="50" disabled="#{!AdminConfig.ootbFields['street'].allowEdit}" shortDesc="#{requestContext.formatter[uib_o_w_pc_p_ProfileMessages.ENTER_FIELD][uib_o_w_pc_p_ProfileMessages.LABEL_BUSINESS_STREET]}" id="oliit4"/>
</af:panelLabelAndMessage>
</af:panelFormLayout>
</jsp:root>
I’m trying to follow this discussions - https://forums.oracle.com/forums/thread.jspa?threadID=978631, but I am kind of confused. I’m using jDeveloper 11.1.1.5
Thank you.
Edited by: 891549 on Feb 27, 2012 12:11 PM

Hi,
not sure why it flags an error on IE - this is what I can't say from remote. However, this code here
<f:facet name="metaContainer">
<af:resource type="javascript" source=”function *parseAddress*(event) { alert("new value: " + event.getNewValue()); } "/>
</f:facet>
{code}
should be
{code}
<af:resource type="javascript">
      function parseAddress(event) { alert("new value: " + event.getNewValue()); }
</af:resource>
{code}
To access the input text field (as it is not in a different naming container) you
1. set the input text clientComponent property to "true"
2. call event.getSource().findComponent("oliit4");
Frank                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Where i can find the package "netscape.javascript.JSObject;" ??urgent

    where i can find the package "netscape.javascript.JSObject;" ??urgent
    please

    The Java Plug-in 1.3 ships netscape.javascript in a JAR file called JAWS.JAR. To compile an applet which uses JSObject, just add JAWS.JAR in the CLASSPATH before compilation.
    If you don't have the Plug-in, but do have a Netscape browser installed, you can add the java40.jar file that comes with Communicator to the end of your CLASSPATH (or extract the netscape.* classes from there).

  • How do i set colors on javascript coding page, colors are not seen after installing Firefox version 8

    How do i set colors on javascript coding page, colors are not seen after installing Firefox version 8 . I am using WaveMaker application for web development

    Make sure that you allow pages to choose their colors and that you haven't enabled High Contrast in the Accessibility settings.
    *Tools > Options > Content : Fonts & Colors > Colors : [X] "Allow pages to choose their own colors, instead of my selections above"
    *http://kb.mozillazine.org/Website_colors_are_wrong
    *http://kb.mozillazine.org/Websites_look_wrong

  • Cannot preview ASP JavaScript database pages anymore

    I've lost my ability to preview my ASP JavaScript database
    pages on MX 2004. They upload fine, just can't preview them. Error
    ASP 0129 - The scripting language 'JAVASCRIPT' is not found on the
    server.
    I recently installed a trial version of DW CS4 on an external
    drive, but am now wondering if dll files were overwritten in the
    process that affected MX 2004. I've since uninstalled CS4 and
    cleaned up the registry, but the problem still exists.
    My other computer previews fine with same IIS settings and AV
    protection. So it’s something within DW on my computer that
    has a glitch and the only thing I can think of is the installation
    of CS4 jolted MX 2004 and now ASP JavaScript is not recognized.
    Is there a repair tool for Dreamweaver? If not, and I
    reinstall OVER the current installation of MX 2004, will I lose any
    settings, and will I have to reinstall updates and extensions? Any
    other suggestions are appreciated!

    I've lost my ability to preview my ASP JavaScript database
    pages on MX 2004. They upload fine, just can't preview them. Error
    ASP 0129 - The scripting language 'JAVASCRIPT' is not found on the
    server.
    I recently installed a trial version of DW CS4 on an external
    drive, but am now wondering if dll files were overwritten in the
    process that affected MX 2004. I've since uninstalled CS4 and
    cleaned up the registry, but the problem still exists.
    My other computer previews fine with same IIS settings and AV
    protection. So it’s something within DW on my computer that
    has a glitch and the only thing I can think of is the installation
    of CS4 jolted MX 2004 and now ASP JavaScript is not recognized.
    Is there a repair tool for Dreamweaver? If not, and I
    reinstall OVER the current installation of MX 2004, will I lose any
    settings, and will I have to reinstall updates and extensions? Any
    other suggestions are appreciated!

  • After installing Firefox6 many sites will not finish loading. I click on "stop loading this page" and then click on "reload this page" and the page loads. Also if I disable javascript the page will load.

    After installing Firefox 6 MANY web site will not finish loading. I disabled all add-ons and still have the problem. If I disable javascript, the pages will load. When the page is trying to load, if I hit "stop loading this page" and then hit "reload this page", the page will load; but sometimes I have to do this 2-3 times for the page to finish loading. No problem with these pages using IE8.

    I see that you ave changed some network.http prefs.<br />
    Doing that can cause all kinds of problems because not all servers like such changes, so you can try to reset those prefs on the about:config page.<br />
    network.http.max-connections 48<br />
    network.http.max-connections-per-server 16<br />
    network.http.max-persistent-connections-per-proxy 16<br />
    network.http.max-persistent-connections-per-server 8<br />
    network.http.pipelining true<br />
    network.http.pipelining.firstrequest true<br />
    network.http.pipelining.maxrequests 8<br />
    network.http.proxy.pipelining true<br />
    network.http.request.max-start-delay 0<br />
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • Adding javascript to page open and page close in acrobat 8.1.2

    Reading the Acrobat Javascript Object Specification on page 22 it says that you can add javascript to the "page open" and "page close" events of a document.
    It then says that under the menu "Document -> Set page action" you can add scripts for those events
    I am using Acrobat 8.1.2 and under the document menu there is no "Set page action". And there is nowhere where I can find any "set page action" menu...
    whats the deal?
    How can i set the page open and page close events in acrobat professional 8.1.2?????????????
    Marc

    - open the Navigation Panel 'Pages'
    - select the page and open the page properties
    - in the actions tab you can set the page actions

  • How to change link strings on multiple page PDFs - urgent please

    I have several muly page PDF pages, and on each PDF page there are 20-50 different web links.
    Each of the links are done as Open a Weblink, but on each one I did them like below.
    javascript:void(window.open('http://www.website.com/link1'))
    javascript:void(window.open('http://www.website.com/link2'))
    javascript:void(window.open('http://www.xyz.com/link3'))
    etc.
    I would like to be able to remove the beginning and ending on each link, for either one or multiple PDFs using some type of automated process, instead of clicking on each one, one at a time.
    I NEED TO REMOVE THIS FROM THE BEGINNING javascript:void(window.open('
    ADOBE shows it as javascript:void\(window.open\('
    REMOVE THIS FROM THE ENDING '))
    ADOBE shows it as '\)\)
    I tried this using notepad and an editor, but doing so resulted in an error when reopening the PDF
    an unrecognized token was found '0.35w' was found
    Does Acrobat Pro 9 do this? or??
    Thank you

    Hi,
    Try to change the Text Property of that Link through personalization.
    Through Personalize page link which is on top of the page Left Side-
    Click on Pencil icon which is in front of that item and change the property to whatever text so want to see like=> "click here to go back"
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Adding Javascript to pages

    Hi,
    I'm trying to add Javascript-function to the standard OIM-catalog-page. But I haven't had any success yet.
    I'm trying to do this by adding <ad:resource type=""javascript>MyJavaScript< ad:resource>in an exported sandbox. When I import the sandbox and activate it, the page crashes saying Stream Closed - ADF_Faces-60096 Server Exception during PPR#21
    What am I doing wrong? I have tried to remove everything within ad:resource. But I still get the same exception.
    Here is the xml.
    +<?xml version='1.0' encoding='UTF-8'?>+
    +<mds:customization version="11.1.1.61.92" xmlns:mds="http://xmlns.oracle.com/mds" motype_local_name="root" motype_nsuri="http://java.sun.com/JSP/Page">+
    +<mds:insert parent="pgl2" position="first">+
    +<af:inputText xmlns:af="http://xmlns.oracle.com/adf/faces/rich" label="Label" id="e9368104424" visible="true" value="#{pageFlowScope.catStateBean.searchExpr}"/>+
    +</mds:insert>+
    +<mds:insert parent="pgl2" position="first">+
    +<af:resource type="javascript">+
    function handleBlur(componentEvent)
    +{+
    var blurComp = componentEvent.getSource();
    var updateComp = AdfPage.PAGE.findComponentByAbsoluteLocator("e9368104424");
    updateComp.setValue(blurComp.getValue());
    +}+
    +     </af:resource>+
    +</mds:insert>+
    +<mds:modify element="ph1">+
    +<mds:attribute name="text" value="#{catalogResolverBean.kekst}"/>+
    +</mds:modify>+
    +</mds:customization>+
    Regards,
    Kenneth

    Do you need to add a js function to within the head section?
    There should be an editable region in the head section named
    "head" already.
    If not- add one in code view.
    Or- do you need to add a trigger to the body tag?
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • Is it possible to embed query data in javascript at page generate time?

    I have a tabular form and I'd like to add a text field onclick event that uses a query column value in the javascript code. Note: I don't want to refer to an html element value. In PL/SQL Server Pages code I'd just put
    <%= cursorname.columnname %>
    in the javascript. Can the same be done in ApEx and what would be the syntax?
    I wouldn't mind generating the whole javascript in the query but how would I refer to it in the "Element Attributes" field of the Column Attributes?

    I'll try... so I have a page region that is a tabular form a.k.a. "SQL Query (updateable report)". In the select statement it's based on there are two columns: FOO_ID and FOO_NAME. In "Report Attributes" of the region, FOO_ID is defined as not shown but FOO_NAME is shown and also editable.
    If I click the edit icon of FOO_NAME, it takes me to "Column Attributes" where there's a field "Element Attributes" where I can put a javascript event handler like
    onclick="alert('foo');"
    and so the FOO_NAME text field on every row of the report shows the alert when the user clicks on it. Now, I'd like the alert to show the value of FOO_ID for that row instead of static text. (Of course I eventually want it to do something useful but this is the simple example.)
    A little more searching turned up this apparently related old thread:
    Column value substitution in tabular form element attributes

  • Javascript PopUp Page Passing Values

    Hi,
    I have a page which I am redirecting to from a report link column. The Column Link... URL is as follows:
    javascript:popupURL('f?p=&APP_ID.:8:&SESSION.::&DEBUG.::P8_SOURCE:#EXPRESSION#' );
    My problem is that some values in #EXPRESSION# contain comma's. Eg. ' TO_CHAR(EVENT_DATE,'YYYYMMDD') ' and then when I select the edit link it errors. Some of the values contain no comma's and they parse through with no problem. Eg. ' AMOUNT ' .
    Can anybody help me with this problem?
    Many Thanks,
    Samantha

    Hello Heinz,
    It seems like you, and Samantha, are facing two different problems. The first is how to pass parameters which includes comma (,) and the second is how to deal with other (possible) problematic characters.
    The first issue can be easily solved by wrapping the parameter data with backslashes. This solution is working just fine, also with column substitution strings (as I noted in my first post).
    The other issue, which seems to generate your current error message, is a bit more complex, and can’t be solved using a built-in option. There are several characters we can’t use with the f?p notation, most notable is the colon (:) character. There can also be some problems using single quote (‘) or double quote (“), depending on your JavaScript (or HTML) syntax. In these cases, one simple solution (especially if the problem is with one specific character) is to “play” with the single and double quote signs in the JavaScript syntax (it can work with both). If the problem is more wide spread, you’ll need to “escape” the problematic characters, just like we need to do with colons. Usually the solution is to replace the “offending” character with another, legitimate but not used in our data character – in the source page – and then replacing it back to the original character, just before displaying it in the target page.
    Regards,
    Arie.

  • Javascript on page (used for OBI integration)

    I have been working from a document posted on MyOracleSupport entitled "Integrating OBIEE with PeopleSoft." The method described is placing a button and an html area on a page and inserting javascript to "push" the button and launch the code that creates a token and opens an OBIEE report.
    I have been stuck on the first piece (inserting the javascript), and "Support" has not been helpful so far.
    The instructions are to add this code to Component PreBuild PeopleCode.
    Local Field &HTMLField;
    &HTMLField = GetField(DERIVED_OBIEE.HTMLAREA);
    &HTMLField.Value = "<script type='text/javascript'> eval(""submitAction_""+document.forms[0].name+""(document.forms[0],'DERIVED_OBIEE_OPRID');"") </script>";
    The author notes that "this sets the initial content of the HTML Are to a script that effectively hits the Refresh Button that then fires the DERIVED_BIEE.OPRID.FieldChange event."
    Both the HTMLAREA and button (OPRID) are at level0 and at the top of the page order, and I have been told that there is nothing in the HTML object to begin with.
    When I open the page, however, all I get is an HTML area that contains the literal code from above. Nothing executes.
    What am I missing?

    Did you set the page field name on properties of the HTML area? In your case you should probably set this to DERIVED_OBIEE.HTMLAREA.

  • Customize look of javascript disabled page items

    I'm using javascript to enable and disable text field items on a page based on the user's access level and role. I chose to use a script for this because every item on the page is affected, and it seemed easier to maintain and debug by collecting all the logic together. This is working great, however it isn't looking so great. The background and text colors are both grayish and the end result looks like an etch into metal plating. What I would like is for the javascript disable function to look like when I disable it through APEX, a white background text field with grayed text. How can I customize the disabled look?

    OK so I've tried your guys' suggestions and here are the results along with some more info.
    It looks like APEX sets the attributes for items that are "Disabled, does not save state" as disabled="disabled", but "Disabled, saves state" as readonly="readonly". Not a big deal, I can just fix both styles. However, the problem is the javascript disable function seems to be overriding the CSS style.
    My javascript function enableDisableItems() is run onload and has a bunch of lines that conditionally run $x_disableItem('P801_MY_ITEM',true); If I don't run enableDisableItems, I can see my CSS styles. But, if I do run it, the styles go away and I'm left with the old metallic look again. I'm guessing that not only does the javascript change the items' state, but also style. I don't understand why it's doing that or how to stop it...

  • Execute javascript on page loading?

    i want a javascript function to execute on page loading. it should set the local user name ( from system.properties) in an inputtext.
    how can i do this?

    You can't. It would be a huge security hole otherwise.
    In a certain web browser developed by some team in Redmond you can use ActiveX, but that thing would by default popup a security dialogue asking the user for permission to get it.
    Forget about it. Rather consider an application which runs at the client machine, e.g. a signed Applet or Web Start Application.

  • Execute javascript on page load

    All,
    I have a javascript working well on click button via javascript:html_Submit_Progress(this) but now i want to use the same code to execute onload page can somebody help me with the necessary change on this code please to make it work whenever the page loads,
    function html_Submit_Progress(pThis){ 
         $x_Show('AjaxLoading');
         window.setTimeout('$s("AjaxLoading",$x("AjaxLoading").innerHTML)', 100);
         doSubmit('APPLY_CHANGES');
         function submit_HideAll(pThis){ 
         $x_Hide('wwvFlowForm');
         doSubmit('APPLY_CHANGES');
         function submit_ButtonRegion(pThis){ 
         $x_Hide('button_region');
         doSubmit('APPLY_CHANGES');
    ..appreciated in advance.

    So I assume your code in PageLoad looks something like this?
    $x_Show('AjaxLoading');
    window.setTimeout('$s("AjaxLoading",$x("AjaxLoading").innerHTML)', 100);
    doSubmit('APPLY_CHANGES');Don't put the doSubmit call in page load. That will cause a submit, then the page loads again, submits again as a result of being called on page load, etc. and that's why you're looping over and over...every time the page loads you're submitting again.
    I would instead do this.
    1. Make a function somewhere on your page wherever appropriate:
    function html_Progress(pSubmit){
    $x_Show('AjaxLoading');
    window.setTimeout('$s("AjaxLoading",$x("AjaxLoading").innerHTML)', 100);
    if(pSubmit)
      apex.submit(pSubmit); //doSubmit is "old"...apex.submit is the new Apex 4 way of submitting
    } 2. In page load DA do this:
    html_Progress();
    3. Anywhere else you need it called and submitted too:
    html_Progress('APPLY_CHANGES');
    In other words, if the caller doesn't pass anything for pSubmit, don't submit. (This would be in a page load context.)
    If the caller does pass something for pSubmit, then submit. (This is likely to be pressing the Apply Changes button or whatever else.)
    Edited by: gti_matt on Sep 26, 2012 1:31 PM

  • Adobe JavaScript printing page selection

    Hello,
    1) I succeeded printing documents using JavaScript with pp.firstPage and pp.lastPage. Now I would like to print several single pages (e.g. pages 4, 7, 10) within a single print job.
    If I make several print jobs, the paper is ejected after each job. This should not happen, as I want to print in duplex mode.
    Does anyone know, how to do this?
    2) In the internet I could only find the JavaScript documentation for Adobe Version 6: https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/Acro6JS1.pdf
    Is there any newer version?
    BTW: I am using the free version of Adobe which does not support all features.
    Thanks for your help!

    Thanks to Bernd Alheit and GKaiseril  !
    The docu for Version 11 is:
    http://help.adobe.com/livedocs/acrobat_sdk/11/Acrobat11_HTMLHelp/wwhelp/wwhimpl/js/html/ww help.htm?&accessible=true 
    In the new docu for Version 11 I found the parameter which I looked for:
    With PrintParams::printRange it is possible to print any selection of pages just in one print job. Multiple printing of a special pages is possible too.

Maybe you are looking for

  • VC 7.0 does not recognize Metadata for custom RFC

    In SAP R/3  I have created a RFC that has no IMPORT or EXPORT parameters, only TABLES defined as "DATA_OUT". The RFC code finds and generates the values to fill "DATA_OUT". Tested the RFC in our R/3 System, works fine. Then went to Visual Composer. D

  • OS is slow for a few minutes after log in

    Hi, I operate in a two-user environment. When either of the accounts has been signed in, it takes a few minutes before programs start responding at proper speed. Even with all Login Items disabled, it can take several minutes for the OS to respond pr

  • ERS Process

    Dear Friends, I am getting error While using T code MRRL I have did Below configuration but still i am getting errror as "ERS settlement: No message was found for partner 102317/company code 9000" Configuration I did are:- ERS Settings 1) Vendor Mast

  • SMP 3.0: Agentry use of source=INI in JavaBE.ini

    Hi Experts. Is it still possible to use the JavaBE.ini for parameter configuration in Agentry 7.0 (on SMP 3.0) ? We will for sure use source=SAP for productions servers, but for local development environments it would be more flexible to use local co

  • Keyboard character menu no longer appears and I never disabled it (on purpose, at least)

    I type frequently in Spanish and not having the accenting feature of the keyboard so quickly and easily there is causing me problems. How can I reactiviate it? It just repeats the key I'm pressing instead now. I never changed any settings or gave the