Javascript in BSP

Hi,
  Can anybody help me that I have defined a window from page1like below for getting email values from the user.
var result = window.open("emailpopup.htm?LV_PRNUM=<%= LV_PRNUM %> ", "helpWindow", "top=320,left=300,height=300,width=500,status=no, menubar=no");
  this window will popup once we click save button in page1 I can find the window is poping up but it is going behind the page because as when we clicked save button that on input processing takes the control to the page.
  I need the above window will always appears in the foreground.
Senthil.

Adding more points on above posting...
We could make a pop-under script from this by simply adding the <b>window.focus(</b>) method (the new code is underlined):
<script language="javascript">
<!-- begin
function popup(){
window.open('URL/to/popup.html','PopupName','toolbar=0,
location=0,status=0,menubar=0,scrollbars=0,resizable=0,
width=345,height=400');
window.focus();
// end -->
</script>
<b>
Reward each useful answer.</b>
Raja T

Similar Messages

  • Handling ActiveX events with Javascript inside BSPs

    Hi,
    Has anyone any experience with handling events from ActiveX objects (using the <object> tag) with Javascript, inside BSPs?
    I'm developing solely for the IE browser. Reading other threads, I know that the usual way this is done is via the below code excerpt:
    <i><script type="text/javascript" for="MyObject" event="Object_Event">
         js_function();
    </script></i>
    I create a HTML page, with the <object>, <script..for..event> tags, etc. Everything works fine when the page is run from my local system. However, when the code is run from WebAS (Activate then Test (F8)), the ActiveX object loads fine. But the javascript does not respond to events thrown by the ActiveX object.
    I wonder if anyone can share their experiences on this issue.
    Thank you.
    Amos

    It's the Skype4COM (v1.0.0.17) wrapper for the SkypeAPI, available at https://developer.skype.com/Download
    (Note: NOT the v1.0.0.16, which comes with the Skype ActiveX Tools package).
    I'm trying to use javascript to handle the event "CallStatus", thrown by Skype4COM, as shown in the code excerpt below.
    <i><script language="javascript" type="text/javascript" for="Skype" event="CallStatus(Call, Status)">
                 handleCallStatus (Call, Status);
    </script></i>
    It works locally, but not when in a BSP.
    It's rather interesting to mess with Skype calls from a webpage. Do let us know how your experience goes
    Amos

  • Javascript and BSPs

    I have a BSP application where I am displaying the contents of a table on a BSP page, and allowing the user to change the table items.  I also want to add some javascript to update some of the fields in the table, but I am having trouble with the indexes.
    Here is a sample of my code:
    <% loop at t_qtitems into w_qtitems. %>
    <input type="text" name="t_qtitems[<%=sy-tabix%>].rqmult"
        size="2" maxlength="5" value="<%=w_qtitems-rqmult%>">
    <% endloop. %>
    I want to add a button to use javascript to update the input text fields using javascript.  However, when I view the web page, I see this as the field name:
    <input type="text" size="2" maxlength="5"
      name="t_qtitems[1 ].rqmult">
    When I try to use javascript to update this input field, for example:
    frmInput.t_qtitems[1 ].rqmult.value=100;
    I receive a javascript error "frmInput.t_qtitem.1 is null or is not an object".  How do I change the indexed items from this table using javascript?

    Hai Hartman,
    I have faced a similar problem,Here when u are naming
    the ID or names of  input fields make sure that does not
    contain "],[,,." special characters.
    Make sure you specify the id of the input field.
    I am including a sample program where I am updating a
    hidden field with the value entered in the input prompt
    with javascript .
    Page with flowlogic
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="Input prompt " >
      <script language="JavaScript" type="text/javascript">
                     function save_input_prompt()
                      var varient_name = prompt("Save Varient as ?","");
                       if (varient_name == null )
                       return false;
                       else if (varient_name == "" || varient_name == " ")
                          alert("Enter a valid input");
                              return false;
                       document.mainform.if_varient_name.value =varient_name;
                       alert( document.mainform.if_varient_name.value );
                      return true;
          </script>
        <htmlb:form id="mainform" >
          <htmlb:inputField id    = "if_varient_name"
                            value = "abc"
                            visible = "false" />
          <htmlb:button id            = "save_query_open"
                        text          = "Save as"
                        onClick       = "EVT_SAVE_QUERY"
                        onClientClick = "if(!save_input_prompt()) htmlbevent.cancelSubmit=true;"
                        tooltip       = "Save Query" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    input processing .
    DATA lv_string TYPE string.
    lv_string = request->get_form_field( 'if_varient_name' ).
    DATA: data TYPE REF TO cl_htmlb_inputfield.
    data ?= cl_htmlb_manager=>get_data( request      = runtime->server->request
                                        name         = 'inputField'
                                        id           = 'if_varient_name' ).
    IF data IS NOT INITIAL.
      lv_string = data->value.
    ENDIF .
    Put a break pointer in inputprocessing to check if you
    can retrive the value properly. I have included two ways of retiving
    value from the form fields.
    Hope this would help you.
    Finally,
    This is the wrong forum that u have posted this question.
    There is a seperate forum for BSP
    best regards,
    venkatesh.

  • How to combine ABAP and javascript in BSP

    I have a variable "w_temp" in ABAP(defined in page attributes) and another variable "x" in javascript.
    I can assign value of w_temp to x as follows :-
    x = <% w_temp. %>
    but I want to do vice versa i.e. assign value of x to w_temp.
    How to do that ???????

    You can do this by using a javascript function. Like :
    <%
    fun(){
    return x;
    %>
    <%
    w_temp = fun();
    %>
    Regards,
    Animesh

  • JavaScript for BSP (Dropdownlistbox in a tableview iterator)

    ...unfortunatly i have problems to put the generated html into the post...if anyone would like to have it i will be glad to send it to you by email.

    This parameter does not actually allow you to enter your own style - I got annoyed by it myself when I started working with iterators.
    If you debug a bit into the code of the method R_TXT_CELL of class CL_SAPTABLECELL you come across this part:
    IF p_style IS NOT INITIAL.
      SPLIT p_style AT ';' INTO TABLE styletable.
      LOOP AT styletable ASSIGNING <style>.
        SPLIT <style> AT ':' INTO stylename stylevalue.
        TRANSLATE stylename TO LOWER CASE.
        IF stylename EQ 'celldesign'.
    From this (and the follow-up lines) we can learn that the only style attribute that can be used has to be called <b>'celldesign'</b>, and its allowed values are the ones in the table m_tableview->m_htmlb_tableview->mc_render_lib_d2_rt_validation->_et_stcd (runtime name of course).
    For a quick reference, here are the values of this table:
    STANDARD
    ALTERNATING
    TRANSPARENT
    NEGATIVE
    POSITIVE
    TOTAL
    SUBTOTAL
    SUBTOTAL_LIGHT
    BADVALUE_DARK
    BADVALUE_MEDIUM
    BADVALUE_LIGHT
    CRITICALVALUE_DARK
    CRITICALVALUE_MEDIUM
    CRITICALVALUE_LIGHT
    GOODVALUE_DARK
    GOODVALUE_MEDIUM
    GOODVALUE_LIGHT
    GROUP_HIGHLIGHTED
    GROUP_HIGHLIGHTED_LIGHT
    KEY_MEDIUM
    GROUP_LEVEL1
    GROUP_LEVEL2
    GROUP_LEVEL3
    MARKED
    FILTER
    FILTERICON
    POPIN
    So, we have to live with this possibility - otherwise you would have to use a HTML element which you place into the cell, and which you can apply your styles to.
    Cheers,
    Max

  • Enabling button in BSP

    The query goes like this
    OnClientclick of one button i am calling a function which enables another button which is in disabled mode.
    Now the issue is buttonname.disabled = false ; does not work in this case
    Isthere any other way to do the  same in javascript using BSP.
    Thanks

    HI Bhavana,
    Maybe a little workaround can achieve this.We can use an invisible input field with no value initially.BOth the buttons would be visible and would call javascript functions.
    The following code will make it clear
    <head>
    <script language="JavaScript" type="text/javascript">
             function fun1()
               document.form1.ip1.value = "hi";             
              function fun2()
                  if(document.form1.ip1.value == "hi")
                  alert("value is set");
                  return true;
                  else
                  alert("value not set");
                  return false;
              </script>
    </head>
    <htmlb:content design="design2003" >
      <htmlb:page title=" " >
        <htmlb:form id="form1" >
          <center>
         <br><htmlb:inputField id      = "ip1"
                            type    = "STRING"
                            visible = "FALSE" />
       <br><htmlb:button id       = "but1"
                        text     = "Button1"
                        onClientClick = "fun1()"
                         />
       <br><br<br>
        <htmlb:button id = "but2"
                      text          = "Button2"
                      onClick = "myEvent"
                      <b>onClientClick = "if(!fun2(this))htmlbevent.cancelSubmit=true;"</b>/>
          </center>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    If the second button is pressed,it triggers the javascript function fun2(),which checks the value of invisible input field,if it is initial,the onClick event is not trigerred.
    If first button is pressed,it sets the value of the inputfield.Now if the second button is pressd,the values is set and the onClick event is trigerred.
    BUt,in this case,both the buttons are visible as enabled.
    So,with a little more effort,you can use the HTMLB image tag instead of buttons(they also have <b>onClick</b> and <b>onClientClick</b> attributes).Initially,you can show image of disabled button,but on click of first button,you can change the image on client side itself,by preloading it.
    HOpe this solves your problem.
    Regards,
    Siddhartha Jain

  • Triggerring error messages in bsp

    Hi,
    I have 2 screens in bsp,first screen with 2 input fields and 5 checkbox,if the user doesn't select any of the checkbox and excute ,the error message should trigger in the same page .
    please provide me the code on javascript with bsp application as example.
    Thanks & Regards,
    Naveen

    Hi Naveen,
    Exactly similar issue is discussed in [THIS|Error messages in BSP; thread.
    Please search before posting.
    Regards,
    Anubhav

  • BSP island in WD4A possible?

    Hello,
    I currently attending a WD4A training.
    I know that it is poosible to integrate Sliverlight and Flash Island in WD4A.
    Is it also possible to integrate a BSP island in WD4A in order to add flexiblity to WD4A?
    Which things on architecture and programming have to be considered for the integration?
    How to transfer data between BSP and WD4A application?
    All the best,
    Guido Brune

    >Why it would not BSP spefic?
    Why would you want something BSP specific?  If we were to do some sort of HTML Island, it would be open so that any HTML based content could run in it.  We would use JavaScript as the communication mechanism for events and data into and out of the Island.  This would work fine with BSP as well.
    >Is BSP supporting HTML5?
    Absolutely.  Since you can write your own custom HTML and JavaScript in BSP you can write HTML5 content today.  I wrote some HTML5 prototypes using BSP over the summer.
    Don't expect an HTML5 version of the SAP BSP Extension Elements (HTMLB) anytime soon - if ever. I'm sure our focus will be on an HTML5 version of the Web Dynpro renderer first.
    >How to transfer data between WD4A and BSP island?
    Considering these Islands don't exist (yet), it would just be sepeculation on how to transfer data. If you come to TechEd and attend the What's New in Web Dynpro ABAP session, you might see more on this topic.
    Of the approaches we mentioned that you could do today, you could communicate in a variety of ways. For example if you use the two iViews appraoch you could use Portal Eventing between BSP<->WDA in either direction.

  • Hostname problem

    we have about 30 BW web reports being displayed in our portal ep5 sp 6. i have added a custom help context menu option and this should call a bsp using javascript.
    the bsp url is formed:
    url = "http://" + location.host + "/sap/bc/bsp/sap/z_bpa_help_app/help_docs.do";
    i use exactly the same javascript code in all the reports but it doesn't work in four of them because the port is not being returned by location.host in these four instances.
    any idea why this might be occurring or is there another way of retrieving the hostname and port??

    I don't really know if the client name is part of the OSI model.
    You could just setup up static ips for the machines and then disable dhcp on the lan side so each client will log the router's table under a single and consistent ip.
    then you can monitor who's not in bed????

  • SRM-EBP: Link in mailbox to view cutomized report

    Hi All,
    I have a requirement to show the report to EBP managers. SRM will send the link to manager's email inbox to execute the report. Manager will logon to EBP system.
    Is it possible to show the report directly or manager needs to execute that manually?
    Is it possible to send the dynamic link to manager's inbox as the link remains same whatever you click by using URL (As some JavaScript or BSP runs).
    Can you please provide me any clue?
    Thanks - Kumar

    The question is processed in the thread
    FM  "BBP_PD_PO_GETDETAIL " not working

  • Auto Accept a CTI call on WebIC

    When call is routed to WebIC, Accept/Reject starts blinking. We want to make it an auto accept.
    Is it possible to trigger Accept w/o user interaction with Accept button.
    If possible auto confirm too.. We had auto confirm in WinIC.
    Pls let me know if we can achieve this thru any Javascript or BSP changes..
    Thanks in advance
    --Prasee.

    Hi,
    Can anyone help us on this too. We have a IC Webclient 4.0 system.  When we hide the accept and reject buttons then the inbound call is not automatically connected/accepted. The system keeps waiting for the agent to accept the call and the phone keeps ringing.
    I checked and the Genesys system seems to be sending call with status as 3 alerting, we also see alerting on the context area on top right. We want auto acceptance of the call and then we shoudl see connected and BP details screen should come up.
    Can anyone please help on how do we retain the auto accept fucntionality after hiding the Accept and Reject buttons.
    Thanks,
    Prasoon

  • Javascript error calling a bi 7.0 webapplication from a bsp application

    Hi everyone,
    This is the scenario we're facing a javascript error :
    Enterprise Portal is calling a custom bsp application ( via an iview in the enterprise portal ) in the bi system with a parameter "template_id" and a value, which is the technical name of a bi web application.
    The bsp application is evaluating the parameter by some custom code and creating a html page with a redirect or a maintenance message to the bi web application passed with the parameter "template_id".
    The html link to the bi web application is created according to this documentation :
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/46/03d4ac801467e6e10000000a1553f6/content.htm
    Purpose of the bsp application :
    in the bi system there is a database table to maintain a flag for each webtemplate and infocube, which should not be called via the enterprise portal for a certain time ( some kind of maintenance switch ). The bsp application then decides to show a maintenance page for the called webtemplate or to send the redirect page to the client.
    The process described above is :
    working with the bi 7.01 sp7 in the bi ( enterprise portal sp22 ) in the productive system.
    working in the Q&A system bi 7.01 sp8 with bi 3.5 web applications.
    not working in the Q&A system bi 7.01 sp8 with bi 7.0 web applications.
    The javascript error calling bi 7.0 web applications is :
    Webpage error details
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET4.0C; .NET4.0E)
    Timestamp: Mon, 6 Jun 2011 09:11:04 UTC
    Message: Object doesn't support this property or method
    Line: 96
    Char: 11
    Code: 0
    URI: https://mlptb1.mlp-ag.com:58001/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?TEMPLATE=B_221_002_KUNDEN_POSTEN_AD
    We've opened a message. Support center is saying that this method isn't supported by sap. We should ommit the bsp application and the used functionality.
    Is there any way to find out, what is causing this object is missing ?
    Is there another way than a bsp application to use this custom maintenance function in the described system setup ?
    system components :
    production system
    SAP NetWeaver 7.0 Portal SP22
    SAP BI 7.01 SP 7
    q&a system
    SAP NetWeaver 7.0 Portal SP22
    SAP BI 7.01 SP 8
    Kind regards.
    Dirk

    Hello everyone,
    we did some further analysis on this problem und we think we found the problem.
    The error occurs while trying to execute the standard url for web templates inside a Enterprise Portal Frame, for example
    https://XXX:XXX/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?TEMPLATE=XXX
    While executing the URL a HTML-Page with some embeded Javascript-code is sent back to the browser.
    In this Javascrip-Code, the method-call "dsmObj.registerAll" leads to a script error in Internet Explorer.
    dsmObj.registerAll("pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.ip.bi/iViews/com.sap.ip.bi.bex", "GUSID:6FC9SuhGDPIMMLwOdeHEIg--_7WQud13yeLJDz2kYoQFSg--", "1307605928212");
    In SP7, the method "dsmObj.registerFullKey" is called instead of "dsmObj.registerAll". This has changed in SP8.
    dsmObj.registerFullKey("GUSID:iBPvyska9*xE_JBalkQG2g--YyKv2C3NToP0I79Mw7EO8w--", "1307606479963");
    The object "dsmObj" seems to reference the parent frame of the Enterprise Portal.
    Has anyone seen this before? Any ideas how we can fix this?
    Kind regards,
    Matthias
    Edited by: Matthias Keller on Jun 9, 2011 2:07 PM

  • How to return values from a BSP page to Javascript

    Hi All,
    I want to call a BSP page which reads a single value from a table and returns that value I want the Javascript in the HTML code to get the value from the BSP page.
    Can you kindly let me know how I can return the value from the BSP page to JavaScript.
    Kindly please provide me a simple code of a BSP page and the Javascript
    Thanks
    Karen

    Hi,
    you need 3 elements to make the javascript code read the value in any field in the table: table´s name, line and column. This is how your code could look like:
    script language="javascript>
       var row = 0;
       function display(){
          row = row + 1;
          campo = 'tabla1_' + row + '_4';                 " <-- table, line, column
          valor = document.getElementById(campo).value;
    </script>
    ROW works as a counter. You have in variable valor the value of the field and can do with it what you want, perhaps display it with ALERT. I am reading the values from field 1 to n in column 4 in table TABLA1. Pay attention to the '_' in the concatenation of field´s name. The table in my BSP is very simple:
    <htmlb:tableView id                = "tabla1"
                           table             = "<%= mytable %>"
                           width             = "100%"
                           allRowsEditable   = "X"/>
    and somewhere I must call function display in my javascript code:
    <htmlb:button  id="boton" text="Texto aqui" onClientClick="display()" />
    So, give it a try.

  • How Can I Set a Javascript Value into an Attribute of BSP PAGE

    Hi
    Can anyone tell me.
    How Can I Set a Javascript Value into an Attribute of BSP PAGE

    Hi Mithlesh,
    javascript runs on client side and you cannot assign the value to a Page attribute directly.
    As a workaround,you can use an Inputfield,hidden if required,and set the value using javascript.Then the form will have to be submit to be able to read the value in onInputProcessing and then can be assigned to any variable.
    In Layout
    <head>
    <script language="javascript">
    function pass()
       txt1 = document.getElementById("ip_mrf");
       txt.value = "hello" ;
    </script>
    </head>
    <htmlb:inputField  id="ip_mrf"
                               value="<%=mrf_number%>"
                               visible="FALSE"/>
    in onInputProcessing
    cha1 = request->get_form_field( 'ip_mrf' ).
    where cha1 is the page attribute
    hope this helps,
    Regards,
    Siddhartha
    Message was edited by: Siddhartha Jain

  • BSP-App not working after upgrade to Netweaver 7 / Javascript error

    Hey Gurus,
    after our upgrade the BSP Application which runs before the upgrade now displays just a plain-Design - not the Design2003 and i got Javascript errors. This results in no function whatsoever.
    Maybe someone have tipps what to look for (customizings, etc) to get this back runing?
    reg, JR

    I got the same problem but I saw in an another thread :
    BSP - non Unicode caracters - need to put an "InpuField" after a "Tray"
    Mr. bindiya have try on the same release without any problem. I sent to him an email to check.
    Regards,
    Francesco

Maybe you are looking for

  • Profit Center in Vendor Line Item (T.Code:MIRO or F-02)

    Hi Friends, We are using ECC 6 but Document Splitting is not activated. We need Profit Center in Vendor Line Item (MIRO or F-02). How we can make this settings. Thanks Harani

  • I've my iphone stolen ,Can you help me ?

        Hi, your heigherness. My iphone 4 (white 8G) was stolen in night of 2013-03-09 Hangzhou China, and I'm here to ask for your help, the info about my set is: SERIAL NO. : C3*******PMW     I've do what I can(such like 'find my iphone',which shows  o

  • How to access same ejb from different applications

    Hi I have two applications (.ear). Each application has 4 EJBs. These EJBs are same in both applications including their names. JNDI names are also same in each application. in detail ApplicationA (appA.ear) contains web1.war ejb1.jar ejb2.jar ejb3.j

  • Ess/mss configuration for ep 7.0

    Hi, I want to configure ess/mss for ep 7.0 system. My backend system is ecc 6.0. Can any one guide me on this configuraiton. Regards, Venkat

  • Flex Builder 3 - Web Service Proxy Generator

    Hi guys, I am investigating the web service proxy generator that is part of FB3. I can't seem to get it working properly and wondered if anyone else has managed to succeed. I am using WSDL files that are generated from RFC-enabled function modules us