Getting javascript error in jsf portlet

Hi,
I wrote a jsf page with command links calling an action in ManagedBean. Its works fine if run as jsf page. But when I associate the jsf page with a portlet and run the page, I am getting javascript error when clicked on the command links.
Please help me to resolve this problem.
The jsf page
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib uri="http://www.bea.com/servers/portal/groupspace/tags/activemenus" prefix="activemenus" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://bea.com/faces/adapter/tags-naming" prefix="netuix" %>
<html>
<head></head>
     <body>
<f:view>
     <netuix:namingContainer id="facesContent">
          <h:form>
<f:verbatim>
     <table border="0" width="100%">
          <tr>
               <td>
                    <h:outputLabel value="Notifications" for="heading"/>
               </td>
               <td>
                    (<h:outputText value="#{notificationsBean.notificationsSize}" escape="true"/>)
               </td>
               <td>
                         <h:commandLink action="#{notificationsBean.showInWorkList}" immediate="true">
                              <h:outputText value="Show in Worklist"/>
                         </h:commandLink>
               </td>
               <td>
                    <h:outputText value="hai"/>
               </td>
          </tr>
     </table>
</f:verbatim>     
          <div style="overflow: auto; width: 100%; height: 200px">
          <h:dataTable value="#{notificationsBean.userNotifs.notificationsList}" var="notification">
               <h:column>
                    <f:facet name="header">
                         <h:commandLink action="#{notificationsBean.sort}">
                              <f:param name="column" value="caseNB"/>
                              <f:param name="sortDirection" value="#{notificationsBean.sortDirection}"/>
                              <f:param name="pattern" value="####"/>
                              <h:outputText value="Case ID"/>
                         </h:commandLink>
                    </f:facet>
                    <h:outputText value="#{notification.caseNB}"/>
               </h:column>
               <h:column>
                    <f:facet name="header">
                         <h:commandLink action="#{notificationsBean.sort}" immediate="true">
                              <h:outputText value="From"/>
                              <f:param name="column" value="senderNM"/>
                              <f:param name="pattern" value=""/>
                              <f:param name="sortDirection" value="#{notificationsBean.sortDirection}"/>
                         </h:commandLink>
                    </f:facet>
                    <h:outputText value="#{notification.senderNM}"/>
               </h:column>
               <h:column>
                    <f:facet name="header">
                         <h:commandLink action="#{notificationsBean.sort}">
                              <f:param name="column" value="priorityCD"/>
                              <f:param name="sortDirection" value="#{notificationsBean.sortDirection}"/>
                              <f:param name="pattern" value=""/>
                              <h:outputText value="Priority"/>
                         </h:commandLink>
                    </f:facet>
                    <h:outputText value="#{notification.priorityCD}"/>
               </h:column>
               <h:column>
                    <f:facet name="header">
                         <h:commandLink action="#{notificationsBean.sort}">
                              <f:param name="column" value="subjectTX"/>
                              <f:param name="sortDirection" value="#{notificationsBean.sortDirection}"/>
                              <f:param name="pattern" value=""/>
                              <h:outputText value="Subject"/>
                         </h:commandLink>
                    </f:facet>
                    <h:outputText value="#{notification.subjectTX}"/>
               </h:column>
               <h:column>
                    <f:facet name="header">
                         <h:commandLink action="#{notificationsBean.sort}">
                              <f:param name="column" value="createDT"/>
                              <f:param name="sortDirection" value="#{notificationsBean.sortDirection}"/>
                              <f:param name="pattern" value="dd-MM-yyyy"/>
                              <h:outputText value="Created(ET)"/>
                         </h:commandLink>
                    </f:facet>
                    <h:outputText value="#{notification.createDT}"/>
               </h:column>
          </h:dataTable>
          </div>
               </h:form>
</netuix:namingContainer>
</f:view>
</body>
</html>
The Managed Bean:
public class NotificationsManagedBean {
     private UserNotifications userNotifs=new UserNotifications();
     private int notificationsSize;
     private String column;
     private String sortDirection = "asc";
     private String pattern;
     public UserNotifications getUserNotifs() {
          getUserNotificationsList();
          return userNotifs;
     public void setUserNotifs(UserNotifications userNotifs) {
          this.userNotifs = userNotifs;
     public int getNotificationsSize() {
          getUserNotificationsList();
          return notificationsSize;
     public void setNotificationsSize(int notificationsSize) {
          this.notificationsSize = notificationsSize;
     public String getColumn() {
          return column;
     public void setColumn(String column) {
          this.column = column;
     public String getSortDirection() {
          return sortDirection;
     public void setSortDirection(String sortDirection) {
          if(sortDirection != null && sortDirection.trim().length()!=0)
               this.sortDirection = sortDirection;
     public String getPattern() {
          return pattern;
     public void setPattern(String pattern) {
          this.pattern = pattern;
     public String showInWorkList() {
          System.err.println("test");
          return "success1";
          //TODO Auto-generated method stub
     public String sort(){
          sort(column, sortDirection);
          return "success";
     @SuppressWarnings("unchecked")
     private void getUserNotificationsList()
          ArrayList<Notification> notificationsList = new ArrayList<Notification>();
          for(int i=0;i<20;i++)
               Notification notif = new Notification();
               notif.setCaseNB("122"+i);
               notif.setCreateDT("12-12-2002");
               notif.setSenderNM("testing1"+(i%3));
               System.out.println(notif.getSenderNM());
               notif.setSubjectTX("testing2"+(i%4));
               System.out.println(notif.getSubjectTX());
               notif.setPriorityCD("High");
               notificationsList.add(notif);
userNotifs.setNotificationsList(notificationsList);
          if(userNotifs.getNotificationsList()!=null)
               this.setNotificationsSize(userNotifs.getNotificationsList().size());
* <p>Return the <code>FacesContext</code> instance for the
* current request.
protected FacesContext context() {
return (FacesContext.getCurrentInstance());
protected void sort(final String column, final String direction) {
          java.util.Comparator comparator = new SortComparator(userNotifs.getNotificationsList(),column,direction,pattern);
          java.util.Collections.sort(userNotifs.getNotificationsList(), comparator);     
          if(direction.equalsIgnoreCase("asc"))
               setSortDirection("desc");
          else
               setSortDirection("asc");
}

Too less relevant information and too much irrelevant code.
First of all, which JS error exactly are you getting? You as developer should know better that you shouldn't ignore errors. They contain helpful information about the cause of the problem and thus also how to solve it. Where exactly does the error come from? (view the generated HTML source). Which JSF implementation and version exactly are you using? Which webbrowser exactly are you using? Does it work in/with other/newer versions?

Similar Messages

  • Aperture help not working - getting JavaScript error message

    My Aperture 3 has been having a lot of strange issues lately, most, but not all of which have been cleared up by holding down command + option while starting up and going through all three of the choices there.
    One problem that remains is the inability to open the Help files. I keep getting the following message:
    “The Help Library requires JavaScript.
    If JavaScript is not enabled, you will not
    be able to view all the content.”
    Help works in all other applications, like Pages and Final Cut Pro. I don’t get JavaScript error messages in any other applications.
    I’ve already done an erase and restore from a Time Machine backup, and an archive and install. I reinstalled Aperture, although not by using the Terminal command suggested in the kbase article # HT3805.
    If I go the Terminal command route, will I lose all my projects, albums, and editing? What about Mobile Me galleries?
    I have a guest user on the computer, and when I log on to that user and open Aperture, the Help Library works fine. So, I know the problem is in my user account somewhere, but I don’t know how to address it. Any ideas?

    Welcome to the forums.
    The fact that you have access to java in another user suggests that it is a local setting or preference.
    In the applications folder/utilities there is an application Java Preferences, try resetting this and seeing if it works.
    If not, try deleting the java preferences file in your users folder
    systemHD/Users/user/Library/Preferences/com.apple.java.JavaPreferences.plist
    relaunch the app Java Preferences which creates a new preferences file for you, then try Aperture again.
    Let us know how this goes.
    Tony

  • Getting javascript error in portal admin

    Dear all,
    When i tried to add a content item in the CMS of Weblogic Portal 8.1, an "unterminated string constant" javascript error is displayed and i can't add the content. This happens only when the content item is of a type that contains one or more calendar type property.
    Did anybody also encounter that and have some idea how to solve it?
    Thank you!!
    David

    Hi Bharat
    refer to this for the Log file
    Physical path of log files in EP server
    Portal Runtime Error - Where is the log file?
    For javscript problem refer  to
    Javascript error when loading Portal Content
    Portal Content Permissions
    Getting javascript error while logging in EP
    Thanx
    Pankaj

  • Getting Javascript error on Production Server

    Hi,
    I am facing unusual problem as my one jsp file containing javascript is working fine on testing server.I put same code on production server ,here I am getting javascript alert for not saving my data.Putting some part of my JSP file for ur reference--
    Javascript--
    function sysValidate(item){
                        var itemValue=item;
    // alert(itemValue);
    /* if((itemValue == '')||(itemValue == null))
    return false;
                        var today = new Date();
                        var sysDay = today.getDate();
                        var sysMonth = today.getMonth()+1;
                        var sysYear = today.getFullYear();
                        var fieldArray = itemValue.split("/");
                        var itemDay = parseInt(fieldArray[0]);
                        var itemMonth = parseInt(fieldArray[1]);
                        var itemYear = parseInt(fieldArray[2]);
    if(itemYear > sysYear)
    return false;
                        else{
                             if(itemYear < sysYear)
                                  return true;
                             else{
                                  if(itemMonth > sysMonth)
                                       return false;
                                  else{
                                       if(itemMonth < sysMonth)
                                            return true;
                                       else{
    if(itemDay >=sysDay)
    return false;
                                            else
    return true;
    if(sysValidate(exdate))
    alert("Save denied as delivery date prior to sysdate");
    bool=false;
    return bool;
    As when I am trying to save record in which my PO delivery date is greater than my Sysdate.I am getting javascript alert- "Save denied as delivery date prior to sysdate".
    Plz,help.
    Vaish...

    956066 wrote:
    1)I installed webcenter Management and Production instance and both working fineI hope you meant WebCenter Sites.
    2)On community Management Instance successfully showing the UI but after clicked on any of functions getting javascript error.Ensure that Community Patch1 is applied. Can be checked as status page (should show smth like "Oracle WebCenter Sites 11gR1 | Community 223 revision 3560" )
    3)On Community Production instance not able to validate the CAS.How "not able"? And what CAS: Sites Management CAS, Sites Production CAS or Visitor CAS?? Provide please details.
    Did you mean status page on Production Community instance shows errors related to CAS? What does status page on Management Community instance shows in this case? The same?
    Are there any errors in logs?
    Did you register Community instances in the SystemSatellite table?
    Edited by: 964768 on May 16, 2013 8:30 AM

  • SEARCH hyperlink getting javascript errors

    The SEARCH hyperlink on the www.oracle.com/technology/index.html page doesn't work. It gets javascript errors and does nothing. I am using IE version 6.0.2800

    We are aware of the problem and working to resolve it. Hitting "Enter" after typing in your keyword will have the correct result however.
    Cheers, OTN

  • Javascript error with JSF and TOMAHAWK

    I've got two selectOneMenu in my page and I would like to change the selected item of the second selectOneMenu when an item is selected in the first selectOneMenu.
    I tried to implement a solution using Tomahawk. The idea is to generate a click event on a hidden link when an item is selected like explained here:
    http://wiki.apache.org/myfaces/JavascriptWithJavaServerFaces
    When I click on the selectOneMenu, I always have following javascript error : object expected.
    Here is my page:
    <%@ page language="java" pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
         <f:view>
              <head>
              </head>
              <body>
                   <h:form id="Monitoring">
                   <SCRIPT language="JavaScript" type="text/javascript">
                   function clickLink(linkId)
                        var fireOnThis = document.getElementById(linkId)
                        alert('le champ a pour valeur : '+linkId)
                        alert('le obj a pour valeur : '+fireOnThis.value)
                        if (document.createEvent)
                        var evObj = document.createEvent('MouseEvents')
                        evObj.initEvent( 'click', true, false )
                        fireOnThis.dispatchEvent(evObj)
                        else if (document.createEventObject)
                        fireOnThis.fireEvent('onclick')
                   </SCRIPT>
                   <t:commandLink id="hiddenLink" forceId="true" style="display:none; visibility:hidden;" action="#{TotoBean.selectModule}"/>
                        <h:selectOneMenu id="modulefilter" value="#{TototBean.moduleId}" rendered="true" onchange="clickLink('hiddenLink');" >
              <f:selectItems value="#{TototBean.moduleList}" />
              </h:selectOneMenu>      
                        <h:selectOneMenu id="servicefilter" value="#{TototBean.serviceId}" rendered="true" onchange="clickLink('hiddenLink');" >
              <f:selectItems value="#{TototBean.serviceList}" />
              </h:selectOneMenu>      
                   </h:form>
              </body>
         </f:view>
    </html>
    and my bean:
    package com.toto.monitoring.bean;
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ValueChangeEvent;
    import javax.faces.model.SelectItem;
    public final class TototBean extends Object {
         private ArrayList<SelectItem> moduleList;
         private ArrayList<SelectItem> serviceList;
         private String          moduleId;
         private String          serviceId;
         public TototBean() {
              super();
              // TODO Auto-generated constructor stub
              this.moduleList           = new ArrayList<SelectItem>();
              this.serviceList           = new ArrayList<SelectItem>();
              initModuleList();
              initServiceList();
         public String selectModule() {
              System.out.println("change");
              setServiceId("All Services");
              return(null);
         final List initModuleList() {
              System.out.println("init module list");
              moduleList = new ArrayList<SelectItem>();
              moduleList.add(new SelectItem("All Modules", "All Modules"));
              moduleList.add(new SelectItem("Module 1", "Module 1"));
              moduleList.add(new SelectItem("Module 2", "Module 2"));
              return moduleList;
         public List getModuleList() {
              System.out.println("get module list");
              return moduleList;
         public String getModuleId() {
              System.out.println("get module ID");
              return moduleId;
         public void setModuleId(String id) {
              System.out.println("set module ID");
              moduleId = id;
         final List initServiceList() {
              System.out.println("init service list");
              serviceList = new ArrayList<SelectItem>();
              serviceList.add(new SelectItem("All Services", "All Services"));
              serviceList.add(new SelectItem("Service 1", "Service 1"));
              serviceList.add(new SelectItem("Service 2", "Service 2"));
              return serviceList;
         public List getServiceList() {
              System.out.println("get service list");
              return serviceList;
         public String getServiceId() {
              System.out.println("get service ID");
              return serviceId;
         public void setServiceId(String id) {
              System.out.println("set service ID");
              serviceId = id;
    Any idea ?
    Thanks for your help.

    The hiddenLink has no value. Does it really need one as it is just used to submit the form ?

  • Getting javascript error while selecting the Recipients in OBIEE delivers.

    Hi All,
    I am working on OBIEE from quite a long time, but recently I came across a error while selecting the Recipients in Recipients list of OBIEE delivers.
    Making it more comprehensive, when I try to create an ibot , after entering all necessary information when I select Recipients in Recipients list and click on ok. I get a JavaScript error "null" is null or an object. The surprising thing is when i select cancel it works as ok.
    Any help will be highly appreciated
    Thanks,
    Jyoti
    Message was edited by:
    user616430

    I think you dont have a field named /BIC/XXXXXX in the table from which you are trying to fetch the data. Chech the spelling of the field name and table name.

  • I am getting JavaScript Errors when I attempt to use the Multiscreen Preview function in DW CS 5.

    When I attepmpt to use the Multiscreen Preview button in DW CS 5 I get the following error:
    "While executing onShow in MultiscreenPreview.htm, the following JavaScript error(s) occured:
    In file "Multiscreen Preview":
    onShow is not defined"
    This leads to either an unusable multiscreen preview box or another series of similar JavaScript errors.
    Is there a solution to this problem and if so what is it?
    Thank you for your time.

    Follow this KB article:
    http://kb2.adobe.com/cps/405/kb405604.html
    Start with 12 & 4 and then go through the rest if needed.

  • Getting javascript error while accessing URL iview

    Hi All,
    I have created a URL iview. There is a search functionality in this iview when we search any text then it is giving javascript error (Permission Denied).
    When we use the search functionality of that URL directly in the browser then it is working fine.
    Please Help.

    The URL that is being invoked may not like running inside an IFRAME. Not all URLs work correctly as iViews
    See what happens if you tell the iView to launch in a new window...

  • Getting javascript error in dmw 8

    was working fine....now when i go to save to the remote
    server it freezes and gives me this error:
    While executing DMW_File SaveDocumentToRemoteServer command
    in menus.xml, the following javascript errors ocurred:
    Exception thrown in native function.
    ive tried uninstalling and reinstalling....deleteing all keys
    and files...nothing works.....what could be causing this?

    Troubleshooting JavaScript errors in Dreamweaver
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19105#dat
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "djtheraven" <[email protected]> wrote in
    message
    news:eogv6o$hoa$[email protected]..
    > was working fine....now when i go to save to the remote
    server it freezes
    > and
    > gives me this error:
    >
    > While executing DMW_File SaveDocumentToRemoteServer
    command in menus.xml,
    > the
    > following javascript errors ocurred:
    > Exception thrown in native function.
    >
    > ive tried uninstalling and reinstalling....deleteing all
    keys and
    > files...nothing works.....what could be causing this?
    >

  • CSS issues....get Javascript error on click event

    Trying to finish up this navbar. Got it where my navigation works pretty much great. However, the code I expected to work when I fire a click event on the logo (represnted currently by a gray circle) causes a 'Javascript error in event handler! Event Type = element' error instead. Not sure why. I know I had an issue with one of my button references (spelling issue) but beyond that, everything seems to be in order.
    This is the code I'm using. The first five lines work right. The second series does not.
    sym.getSymbol("btnVision").$("back").css({opacity: 0})
    sym.getSymbol("btnIndustires").$("back").css({opacity: 1})
    sym.getSymbol("btnResp").$("back").css({opacity: 1})
    sym.getSymbol("btnCommunity").$("back").css({opacity: 1})
    sym.getSymbol("btnDiscovery").$("back").css({opacity: 1})
    var stage = sym.getComposition().getStage()
    stage.$("navVision").css({top: 65});
    stage.$("navIndustries").css({top: 65});
    stage.$("navResp").css({top: 65});
    stage.$("navCommunity").css({top: 65});
    stage.$("navDiscovery").css({top: 65});
    I should mentioned I tried sym.getSymbol for the bottom entries but that simply produced the same exact error. Sign.
    Anyone know what might be causing this? It doesn't seem to make sense to me. Here's the files.
    https://www.dropbox.com/s/xo90u6hvj65ix78/nav.zip

    Hi ladobeugm,
    The error message is rather cryptic, but this occurs when trying to access something not defined, as you already experienced with your misspelling.
    You should use Firebug to localize the error via step by step execution. There is a Scripts tab. In its menu, select <youProject>Actions.js. Then, define a breakpoint by clicking in the line number of statement var stage= etc. In the Spies area, you can look for the offending statement by monitoring variable values.
    Gil

  • Faces Servlet no getting called when accessing JSF portlet

    Hi,
    I have a JSF web application and I am exposing the functionality of this JSF web application using native Weblogic Portal JSF portlets. I have configured this JSF web application as a simple producer and I am consuming these portlets in my portal using WSRP.
    I have written a custom FacesServlet and configured it in the web.xml of the producer web application. When I access the pages in the producer web app like a normal web app, I see that my faces servlet is being called but when I consume these pages via the JSF portlet and view the portlets in the portal then the Faces servlet is not being called.
    Is this normal behavior or is WSRP causing this problem or am I missing something. Your help is greatly appreciated.
    Regards,
    Hitesh

    Hi Hitesh,
    What I was asking you to give a try was, configure the standard faces servlet for example if you are using JSF RI
    the configuration will look like
        <servlet>
            <servlet-name>FacesServlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>100</load-on-startup>
        </servlet>I am not very sure whether this can solve the problem.
    Thanks
    Sreeram
    Edited by sreeram.jonnalagadda at 06/10/2008 4:46 AM

  • Still getting Javascript error with new version of UIX

    I'm facing some problem after changing my UIX framework version (2.2.3030829.1626).
    Currently I'm using UIX version (2.2.3030829.1626) . Paging with table is not working with new frame work .
    It is giving me javacript error "object doesn't support property or method" when clicking 'Next' .
    It's working fine with old version.
    We had used proper cabo directory. These files are in sync with the version of the runtime
    Here is our finding
    I found a error in _updateFormActions() function from MarlinCoreb2.js file.
    In this function it is giving error at
    if(a8!=a6)
    a7.action=a6 line (line # 1841,1842). If I comment out this two lines page is
    working properly without any javascript error.
    This problem is a bit tricky....
    Because it seems to be a problem with the UIX framework that only occurs on some versions of the Internet Explorer. On some version (IE 6.0.2600.0000) it works fine
    and it also works on the Mozilla Firefox browser.
    Can any one advice on the same?
    Thanks in advance
    Anindya

    I answered this question on a different thread.
    Do NOT post the same question multiple times. If you require more complete or prompt assistance than you receive on these forums, contact Oracle Support.
    -brian

  • Javascript error in jsf page.

    Hi,
    I am trying to Do post form a script function in a jsf page. I am using the trh:script tag for adding the script. But when run it i am getting a lot of errors saying that the attributes cannot be recognised. I am trying to send a xml updated with some data after the click of a button to the server. Though its not showing any any errors when not run.
    Below is the code i am using :
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://myfaces.apache.org/trinidad/html" prefix="trh"%>
    <%@ taglib uri="http://myfaces.apache.org/trinidad" prefix="tr"%>
    <%@ taglib uri="http://xmlns.oracle.com/dss/trinidad/faces" prefix="dvtt"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich" prefix="af"%>
    <f:view>
    <trh:script text="
    var endpointURL = "http://localhost:7101/services/MobileManagerService";
    var xmlstring = '<?xml version="1.0"encoding="UTF-8"?>\
    <notifications>\
         <notification>\
              <id>1<\/id>\
                   <status>CLOSE<\/status>\               
              <\/notification>\
         <\/notifications>';
    var xmlobject = (new DOMParser()).parseFromString(xmlstring, "text/xml");
    var stautsXml = (new XMLSerializer()).serializeToString(xmlobject);
    alert(stautsXml);
    var http_request = false;
    function makePOSTRequest(method, url, parameters) {
    http_request = false;
    if(window.XMLHttpRequest) { // Mozilla, Safari,...
    http_request = new XMLHttpRequest();
    if (http_request.overrideMimeType) {
    // Set type accordingly to anticipated content type.
    http_request.overrideMimeType('text/xml');
    // http_request.overrideMimeType('text/html');
    } else if (window.ActiveXObject) { // IE
    try {
    http_request = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
    try {
    http_request = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (e) {}
    if (!http_request) {
    alert('Cannot create XMLHttpRequest object');
    return false;
    http_request.onreadystatechange = alertContents;
    // http_request.open(method, url, true);
    if(method=='GET'){
    http_request.open(method, url + parameters, true);
    http_request.setRequestHeader("Content-type", "text/xml");
    http_request.setRequestHeader("Content-length", parameters.length);
    http_request.setRequestHeader("Connection", "close");
    http_request.send(null);
    if(method=='POST') {
    http_request.open(method, url, true);
    http_request.setRequestHeader("Content-type", "text/xml");
    http_request.setRequestHeader("Content-length", parameters.length);
    http_request.setRequestHeader("Connection", "close");
    http_request.send(parameters);
    if(method=='PUT') {
    http_request.open(method, url, true);
    http_request.setRequestHeader("Content-type", "text/xml");
    http_request.setRequestHeader("Content-length", parameters.length);
    http_request.setRequestHeader("Connection", "close");
    http_request.send(parameters);
    if(method=='DELETE') {
    http_request.open(method, url+parameters, true);
    http_request.setRequestHeader("Content-type", "text/xml");
    http_request.setRequestHeader("Content-length", parameters.length);
    http_request.setRequestHeader("Connection", "close");
    http_request.send(null);
    function alertContents() {
    if (http_request.readyState == 4) {
    if (http_request.status == 200) {
    alert('Response received from server:\n'+http_request.responseText);
    result = http_request.responseText;
    // Turn < and > into &lt; and &gt; for displaying on the page.
    result = result.replace(/\<([^!])/g, '&lt;$1');
    result = result.replace(/([^-])\>/g, '$1&gt;');
    document.getElementById('serverresponse').innerHTML = result;
    } else {
    alert('There was a problem with the request.'
    +http_request.responseText +' '+http_request.status);
    document.getElementById('serverresponse').innerHTML = http_request.responseText;
    function postApproveForm() {
    var poststr = stautsXml ;
    alert('Sending XML to server:\n'+poststr);
    makePOSTRequest('POST', endpointURL , poststr);
    "/>
    <trh:html id="h2">
    <trh:head title="ApproveAlerts" id="h1">
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <link type="text/css" rel="stylesheet" href="css/iPhone.css"/>
    </trh:head>
    <trh:body id="b1">
    <!-- <jsp:useBean id="IdBean" class="oracle.application.IdBean" scope="application"/> -->
    <af:messages id="m1"/>
    <trh:body styleClass="body" id="b2">
    <!-- <td><input type="button" name="Approve" value="Approve" onclick="javascript:approveAlert();"></td> -->
    <td>
    <input type="button" name="Approve" value="Approve" onclick="postApproveform();" </input>
    </td>
    <af:outputText id="ot1" value='"#{requestScope.myId}"'/>
    </trh:body>
    </trh:body>
    </trh:html>
    </f:view>
    Do i need to add some taglib or something to make it work ?
    Regards
    Sishant
    Edited by: user784337 on May 24, 2010 3:37 AM

    Because :
    Session.getAtrribute is java-code that can only run on the server
    and
    var y = session.getAttribute is javascript-code run on the client.

  • Getting javascript error while opening offline adobe forms sent via email.

    ERROR: script failed(language is formcalc,context is xfa[0].form[0].data[0].FORM[0].
                  script = BODY.instanceManager.addInstance(1);
                  Error:accessor "BODY.instanceManager.addInstance(1)" is unknown.
    I have written the code in Javascript and run at client.
    Below is my sample code:
    var nlength = ROW.BODY.nodes.length;
    var nrow = 0;
    for(var nCount=0;nCount<nlength;nCount++)
    {nrow = nrow + 1;}
    if (nrow == 7)
    xfa.host.messageBox("Maximum allowable rows is 7","Warning",3);
    else
    {ROW.BODY.instanceManager.addInstance(1);
    xfa.form.recalculate(1);
    xfa.host.messageBox("Row added");}
    Rows are getting added.
    I am not getting the problem,Pls help me.

    Hello all,
                Thanks for your replies.
    I have made Show -> click and Language -> Javascript and Run at -> Client  for the button 'ADD'(this button inserts line) and in the blank space i have written the code as stated above.
    Then,i have activated the form.
    As per the Submit button it is working fine...
    I am new to adobe forms and i have done a self-training for this..
    Maybe I am doing something  wrong...
    Pls help.
    Thanks and regards,
    Raka.

Maybe you are looking for

  • In Safari on a MacBook Pro, how do you open a new blank tab while leaving the site you were on still on another tab?

    This is my first Mac computer, and this may be a silly question, but I can't find the answer anywhere else. Anyway, is there a way to open a new tab that's blank? Like in iPhones, you can click new page, and a blank page opens up. Anyway that's possi

  • Adding fields in table control of infotype 0591

    i want to add a column in table control of infotype 0591. i need to add age for every nominee. i cant edit standard sap mp prog. so i thouhgt of copying it into zprogram, and now i have to assign it to that standard infotype so that this infotype wil

  • "Cursor Window" Help Please

    Hello all... I need some help with creating roll-over effect in flash... if you click this link... http://www.triworks.net/triworks2008/index.php. Then click on website, (Not blog)... when the site loads, and you roll over the objects on the page, a

  • A2DP Bluetooth Transmitter Comparison Spreadsheet?

    Is anyone aware of a spreadsheet or google doc that has all the bluetooth transmitters listed and remarks about specs, compatibility, capabilities. And specifically is there one out there thats a newer version of the Zoom 4335. I want one that is Blu

  • Having problems with software

    Hey guys, i've been having some issues with my macbook pro (sorry if i have bad english)...i installed the Lion software (clear installation) about 2 weeks ago, since then, everytime i open any app (photoshop, iMovie, safari...Anything!) my mac resta