Javascript in MAM 3.0 SP03

Hello all,
Is it possible to use self made javascript functions in MAM 3.0 SP03?
For example:     function displayText(message) { alert(message) };
If yes, how and where can/must I declare what?
TIA
Patrick Willems

Hello,
I suggest to put javascripts in a different .js file. Then you reference that file on the page using the
data:addjs
tag (same thing for CSS files,
data:addcss
Then you can call you javascript functions using any of the predefined events on each controls (refer to the tag library documentation for more details).
Thank you,
Julien.

Similar Messages

  • Helper.eventURL( , , ) in MAM CODE - What this function does ??

    Hi all,
    Following are few code lines from MAM code :
    // this is in common.inc"
    <jsp:useBean id="helper"
        class="com.sap.mbs.core.web.ViewHelper" scope="request"/>
    String allOrderURL = helper.eventURL("onOrderList", "orderListType", "ALL_ORDERS");
    helper.getApplicationURL()
    Could anyone please tell what this eventURL ,getApplicationURL methods are for ?
    I couldnt find any documentation that explains it.
    Regards,
    Vipin

    Hello Vipin.
    Jo is rite.
    The class is abstract but the class which is used to create the bean is the implementation class:
    <b>DefaultViewHelper</b>
    This is the implementation of the abstract class ViewHelper.
    The ViewHelper is used to create URLs which are used to load a new page with our without submitting a form.
    You can use eventURL to build an URL for a link you want to create (JO's example).
    You can use submitEventURL in order to submit your form.
    This method builds a call to a JavaScript method.
    You can find this method in the file:
    app-root/include/common.inc
    function submitURL(url).
    This function uses url as action for the submit.
    So if you use something like this:
    onClick="<%=helper.submitEventURL("onOK")%>"
    all the form content is written to the context and the onOK method of the corresponding controller class is called. You can get the form content using the context in this controller method then.
    When I started working with MAM I was also confused about the mbs.core Framework.
    Read this maybe it helps:
    SAP MAU MVC
    Best regards,
    Sascha
    Message was edited by: Sascha Dingeldey

  • New SLC features in SP03

    Hi Experts,
    where to find more information about the following new Secure Login Client features
    found in 1975482 - Release Note SAP NetWeaver Single Sign-On 2.0 SP03
    SLC ActiveX Control for SLS profiles with virtual application policy support to trigger an SLS profile enrollment from an HTML page
    ActiveX for Internet Explorer to control SLC and SSL with SLS profiles (including SSL certificates in IE)
    Currently we have one customer using Citrix XenApp with Internet Explorer as published application and to trigger certificate enrollment for the SLS Profile on the SLC we like to use the ActiveX Control, but don't know how. I can not find anything in the manuals.
    Please let me know
    Regards,
    Carsten

    Hello,
    this is an example, you can use JavaScript or Visal Basic and call the ActiveX functions, as example in the onLoad() function.
    You are right, all functions are not documented, I will take care of adding it to the current documentation.
    Here is the list of functions for normal Enrollment (Without the SNC virtual application policy support):
    bool ProfileIsEnrolled(BSTR szProfile)
    Return Values:
    true: Profile exists and is enrolled
    false: anything else
    Throws an exception when szProfile is to long or contains invalid characters
    bool ProfileEnroll(BSTR szProfile)
    Return Values:
    true: Profile exists and is enrolled
    false: anything else
    Throws an exception when szProfile is to long or contains invalid characters
    void ProfileLogout(BSTR szProfile)
    No return value, this function is assumed to succeed so that further calls of ProfileIsEnrolled will return false
    Throws an exception when szProfile is to long or contains invalid characters
    void ClearSSLCache()
    Clear the Internet Explorer SSL Cache, no new entrolled Profiles are availbale for the next SSL connection.
    No return value, this function is assumed to succeed always
    best regards
    Alex

  • Javascript  - is there something like an "active row count" property??

    Lets say I have a tabular form. Every time I use the form, the # of rows returned by the query will vary. Maybe first time I go to the page, the select statement returns only 5 rows, but the next day it returns 25 rows.
    Is there some type of system variable to stores the # of rows visible on the page at a given time within this tabular form?
    I realize that if I have an tabular form item with an id of f03 for example, then on each row it will be referenced as f03_0001, then f03_0002 on the next row and then f03_0003 on the next row etc...
    In pseudocode, here is what I want to do:
    For i = 1 to ACTIVE_ROW_COUNT (assuming this is the # of rows in the HTML table)
    perform some operation on 'f03_000' + ACTIVE_ROW_COUNT
    Do you see what I'm after? I checked the APEX api, but I couldn't find such a property. It seems like you can't do much if you can't figure out this current index # or the max on the page.
    Also, I tried playing around with the "this" keyword in hopes of finding a pointer to the "current item" that would have triggered the onchange event, but no luck either.
    Thanks in advance.

    Hi:
    Within javascript you can reference the columns of the tabular form as
    <script>
    col1 = document.forms0.f01;  // the first updateable column of your report
    alert (col1.length) ;   //  number of rows
    </script>varad
    Edited by: varad acharya on Dec 8, 2008 5:53 PM

  • Problem with JavaScript in my PDF Form buttons

    I am trying to have my user click on a button in my form on my website and e-mail the form data to me.
    I am using the following JavaScript with my form button:
    this.mailForm(false, "[email protected]", "", "", "Subject", "Message Body");
    Protected mode is off.
    When I use the above statement (whether the 1st parameter is set to true or false), nothing happens – no email gets sent and no mail dialog box appears. If I change from this.mailForm(...) to this.mailDoc(...), I get a mail dialog box but, as expected, it sends the blank form without the filled-in data due to low user privileges.
    How can I send the form data with this.mailForm(...)? (Note that I prefer to use this.mailForm(...) rather than mailto:(...) because this.mailForm(...) supposedly allows me to e-mail the form without user interaction.)
    -- Don

    Thanks for responding.  I have been using “Submit a form” in the Mouse up event.  I had that operation do a mailto: and it worked, but required user interaction on the part of the web page visitor.  I have successfully created an equivalent JavaScript including:
        var url = "mailto:[email protected]?subject=mySubject&body=MyMessage"; 
        this.submitForm(url, true);
    The above sent the FDF file successfully, but again, it required user interaction.
    Then I tried this JavaScript - as I mentioned in a previous post - after you said to use doc.submitForm():
        var url = "http://mydomain.com/submit_notice.php";
        doc.submitForm(url, false);
    The above script seemed to do nothing (with no error message). Shouldn't it bring up the PHP file in the web browser?
    I have that php file, submit_notice.php, created, but I have not written any PHP scripts to e-mail the FDF file.  I have never written a PHP script to take the posted FDF data and email it, but I have used the PHP mail() function and posted variables.
    As for what I want to happen on the client side after the submit takes place: I simply want the FDF file to go to an e-mail that I specify.  Additionally, I need it to happen without any client interaction on the part of the web page visitor.  I can expect that visitor to have Adobe reader, but no add-ons or protected mode requirement.
    Please give me an example that emails the FDF file without any user interaction.
    Thank you.
    -- Don

  • Open and Close Popup With Javascript

    Using Apex 3.2
    I have probably done this loads of times in my old job, but do not have access to the code and today I just can't get it to work properly.
    I have opened a pop up window with javascript
    Now I need to close it and refresh the calling page, but only if it passes the validation on the popup.
    I have a hidden item on my pop up called P7_FLAG.
    I have a page process after validation that sets P7_FLAG to (only set to 1, if passes validation).
    I also have a SUBMIT button.
    So once I click my SUBMIT button the page should look at the validations, if ok, set P7_FLAG to 1, then close the popup and refresh the calling page.
    My current javascript look like this
    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    var test = $x('P7_FLAG').value;
    if(test == '1')
    window.close();
    window.opener.doSubmit('REFRESH');
    </script>On my button
    javascript:saveChanges();The problem is that I need to click the SUBMIT button twice.
    First time it sets P7_FLAG
    Second time it closes page and refreshes.
    I have probably made some basic error, but today I cannot see it.
    Cheers
    Gus
    Edited by: Gus C on May 10, 2012 12:48 AM

    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    var test = $x('P7_FLAG').value;
    if(test == '1')
    window.close();
    window.opener.doSubmit('REFRESH');
    </script>javascript does not wait for the current action to complete and then perform the next line.
    means in your function call
    doSubmit('SUBMIT');is triggered and it carry on's to next line that is
    $x('P7_FLAG').value;this will not be set because you are setting the value of P7_FLAG to 1 in plsql and trying to check in javascript, which will not work.
    what you need to do is amend your js function like below
    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    </script>create a page branch to procedure and make it conditional to when P7_FLAG = 1
    and set the branch source to below
    htp.p('window.close();');
    htp.p('window.opener.doSubmit(''REFRESH'');');

  • It appears to be a javascript problem, but firefox cannot open pages from ebscohost websites.

    I'm a librarian at DePauw University. People who have upgraded to Firefox 5.0 or higher can get to Ebscohost pages but once there cannot do anything. For example, if I am on the Ebscohost Scientific American page and I try to expand +2011 in order to see the 2011 Scientific American issues nothing happens. It looks like javascript is supposed to expand the +2011. Everything works fine in Firefox 3.6.

    When you have a problem with one particular site, a good "first thing to try" is clearing your Firefox cache and deleting your saved cookies for the site.
    1. Clear Firefox's Cache
    Tools > Options > Advanced > Network > Offline Storage: "Clear Now"
    2. If needed, delete the site's cookies here
    right-click a page on the site, choose View Page Info > Security > "View Cookies"
    Remove all cookies on servers ending with sympatico.ca
    Then try reloading the page. If you need to log in to read stories, you probably will have to log in again after removing their cookies.
    Does it help?

  • Adobe Flash & Javascript don't work even though Enabled

    Ever since what I think was either a Firefox upgrade (I don't know which one) or installation of Quicktime, my Adobe Flash Plugin is perpetually crashed and I cannot play any Flash content on any website. All that displays in place of the video is a gray screen with the sad-face Lego icon and the message: “The Adobe Flash Plugin has crashed. Please reload the page to try again.” (See attached image.) But it will not resolve when reloaded.
    No Flash videos on any sites work. HTML5 videos work on YouTube when tested, but non-HTML5 videos won't work.
    Also, my Javascript does not seem to be working since at least some displays requiring javascript don't work. Sometimes the display just doesn't work, and sometimes I get a message that javascript is disabled and must be enabled, but it is already enabled (set to “true” in about:config).
    I have spent days scouring every help forum entry I can find on troubleshooting Flash Player and Javascript. Everything on my end seems to be in order and I cannot find or fix either problem. I think it is possible the issue could have its roots in the fact that Javascript seems to not be working which may be preventing Flash Player content from working...??
    Also, Flash content does work in I.E. but not in Firefox (I do not have Chrome installed so did not test in Chrome). I have too many window tabs open in Firefox and can't switch to I.E. (nor do I like to use I.E.).
    PLEASE HELP as this is crippling for very important work deadlines I have.
    This is what else I know and have tried:
    I have a Toshiba Satellite C75D-A Laptop;
    Processor: AMD A6-5200 APU with Radeon HD Graphics; x64; 2.00 Ghz;
    RAM: 8 MB;
    OS: 64-bit system; Windows 8.1 (but some auto-check utilities detect it as 8.0 because it was upgraded.);
    Graphics Card: “Desktop Graphics” System – AMD Radeon HD 8400 (0x9830);
    Installed Graphics Driver Version: AMD 13.352.1004.1007 (Driver Date: 4/22/2014)
    My Device Manager graphics driver updater states: “driver software is up to date.”
    From the AMD website: the graphics driver auto-detect utility recommended the AMD Catalyst Driver (amd-catalyst-omega-14.12-without-dotnet45-win8.1-64bit.exe) I tried installing this driver, but it won't install. After trying to install, I got a message stating: “We are unable to find a driver for your system.” But Device Manager states I have a current driver, and my graphics card & driver seem to be working fine, so I do not believe this is part of the issue.
    I am using Latest Firefox version 35.0.1; and
    Using Latest Flash Player: 32-bit NPAPI Plug-in Version: 16.0.0.296; designated: “always activate” (Downloaded new update several times, including fresh install after uninstall; system & web address icons indicate Flash is enabled).
    I turned off hardware acceleration in FF Tools>Options>Advanced>General
    I disabled WebGL as explained here: https://support.mozilla.org/en-US/kb/upgrade-graphics-drivers-use-hardware-acceleration
    I am using Ad-Block Plus which has never affected things in the past. I have not tried starting FF in Safe Mode because I believe I will lose all open tabs and not be able to recover them (I may have over 200 open). But disabling add-ons has no effect (I disabled all except for Sessions Manager in case of a crash). (My No-Script has been disabled for at least six months.)
    I have Windows Media Player and Quicktime installed.
    Quicktime is most recent upgrade (7.7.6) so should not be a problem according to:
    “QuickTime plugin takes over Flash” at:
    http://kb.mozillazine.org/Flash#Disabling_Protected_Mode_in_Flash_11.3
    (note underscores in place of spaces in string; underscores not insertable here)
    Disabling Quicktime had no effect in the prior version of FF (ver. 35.0), but in latest FF ver. 35.0.1, Flash videos only display a plain (blank) gray screen instead of the sad-faced icon and crash message.
    (I tried to uninstall Quicktime altogether, but was not able to due to Error codes 2502 & 2503. I tried troubleshooting that as well with no luck using methods successful for other programs, including here:
    http://www.fixkb.com/2014/01/error-2503-and-2502-when-uninstalling-on-windows-8.html;
    & here:
    http://answers.microsoft.com/en-us/windows/forum/windows_8-winapps/re-internal-error-codes-2502-and-2503-for/ba5f2145-aa6e-4cc0-81a7-e4346f43b698.)
    Disabling my FF theme and using the default brought back the sad-faced icon and crash message in the place of videos on some YouTube pages, but not other YouTube pages (where video was still blank gray screen). It also enabled a still Flash image (an ad) to display on a different website page that previously had a Flash Plugin crash message. I have been using this same theme for a couple of years without previous issue. While turning it off did generate an effect on some still imagery, it didn't fix the video problem.
    I tried Disabling Protected Mode in Flash 11.3 as explained here:
    http://kb.mozillazine.org/Flash#Disabling_Protected_Mode_in_Flash_11.3
    (note underscores in place of spaces in string; underscores not insertable here).
    It did not solve the issue.
    I also deleted all storage & data in Flash Player as advised. This had no effect either.
    I've tried all solutions I've been able to find and am at a loss for what to try next. Please help and advise ASAP. Thank you!!

    ''guigs2 [[#answer-684038|said]]''
    <blockquote>
    I truely admire the efforts that have been made to make this work.
    "“We are unable to find a driver for your system.” "
    For it not installing, you need to follow these instructions to install them: see the comments: [http://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_devices/windows-10-atiamd-display-drivers/50944d10-dde3-4e08-8244-d54eb2b1e7de] --> take warning though it looks like it has caused issues for others as well.
    Since it was working for some youtube videos and not others, there might be an issue with a particular video codec. DO you have OpenH264 Video Codec provided by Cisco Systems, Inc. plugin?
    Is it possible to try Safe Mode after saving your session with [https://addons.mozilla.org/en-US/firefox/addon/session-manager/ Session Manager Addon]? IT would test hardware acceleration in Firefox.
    </blockquote>
    Thank you, guigs2! Sorry for my delayed reply...I didn't realize I hadn't gotten back to you. Update is that I did try a whole slew of other troubleshooting steps including starting FF in safe mode, to no avail. However, I was FINALLY (after months) able to solve this problem just today by pure chance!
    The problem was that hardware acceleration was enabled in the Flash settings. I had not been able to turn it off because I didn't have access to the Flash Player settings as long as the crash error message was visible, which was all the time! Today, by a sheer fluke, I saw a static picture in place of the crash message on a Flash video. I snagged the opportunity to call up the settings and turn off hardware acceleration, and it fixed the problem for my whole browser! This has been a frustrating issue because I did not have access to the settings utility as long as I had the crash message, which was always, so my Flash was crippled without the ability for me to fix it until pure luck gave me this window of opportunity.
    Does anyone know another way to access the settings utility if this ever happens again in the future? I could not find a way. (Incidentally, I had tried disabling hardware acceleration via my graphics driver settings, but it didn't fix the problem.) We need Adobe to allow some other way to access the Flash Player settings utility when this problem arises since they aren't accessible when there is a static crash message.
    Thanks again!

  • Just had Javascript update done and now Firefox won't open,,,keeps coming up with XML Parsing error not well formed. how can I get rid of this?

    also awindow pops up NS error XPC Bad convert JS cannot convert JAVASCRIPT argument arg 4 (NSL window watcher open window)
    == This happened ==
    Every time Firefox opened
    == just today ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.5))

    There's a lot there, so I'll start with the parts I can answer quickly.
    The "ACL found but not expected..." messages can be safely ignored, so says this article
    http://docs.info.apple.com/article.html?artnum=306925
    (look below all the "SUID" examples)
    I had changed my Desktop image earlier but when the "Installing 1 item" window came up it changed back to the back ground that you first see on your desktop after installation.
    Leopard installs updates a bit differently. If it's simply an application that does not change system files, it installs them like before, without having to restart. If the update is to the system, then you must immediately "restart," It then goes to that stars and purple screen to perform the installation. Before, it would do the installation while you still had control of the Mac and would prompt you to restart when it finished the installation. This change probably make things more secure and reliable, because you aren't allowed to do other things on the Mac while system updates are being installed.
    Please post back with the remaining point of concern.

  • 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 can we remove javascript completly from J2EE based web application?

    java script produce lots of problem in web application i just want to remove them comletly

    rinku5259 wrote:
    java script produce lots of problem in web application i just want to remove them comletly3 easy steps
    1. using the mouse or keyboard, select the javascript code
    2. press the delete button on the keyboard
    3. save the file
    do that for each file that has JavaScript in it

  • Feature Request: Javascript libraries of which the versions are in better control

    This essentially aimed at the developpers:
    Anyone who browsed with noscript, or used ghostery, knows the web is full of javascript. These are often downloaded from separate websites.(for no apparent reason, they can easily be hosted locally) This is a bad thing:
    * Accessing these gives the the http-referrer(presumably) so it indicates someone where you are browsing.(though other resources do this too)
    * Javascript is nowhere as secure as html in terms of potential weaknesses.
    * Javascript is -plainly- designed to have access to the web page, or the current url.
    * These are often accessed via http, it could be spoofed to return a different
    * The servers it came from can outright change it at any point, and the user has little control, even if the javascript source code unobfuscated, there is no time to do so as it is in the hands of the users immediately.
    For this reason i suggest implementing a library(package system) for these javascripts, of which the packages are signed, and the user controls when they are updated. It should be easy to use and add these libraries for developpers, preferably, additional people can attest they read the source code and approve of it.
    Well, to be honest, i cannot really suggest entirely how to do it, i just dont know enough. And it has to be entirely transparent to users, at least. Some kind system that detects that people have checked the source code, and/or a default time duration.(depending on the package)
    Of course this has to be coordinated with other browsers/standards creation. This sounds hard and it seems like you're already doing a really good job at it.(And at developping FF in general)

    Hi Jasper, to give a specific example, if Firefox were to find a site using a particular version of jQuery then it would instead use a pre-validated copy of that library from a trusted site or from the Firefox program folder?
    I think this would be a complex project, but perhaps an extension developer would consider building it, at least to demonstrate how it could be done?
    This forum is like an emergency room so your suggest may get lost here. You can submit a version to the Input site (Help > Submit Feedback connects you) or on a Mozilla mailing list. Not sure which one would be right for this idea, but you could take a look here: [https://lists.mozilla.org/].

  • I need to add a mileage calculation box to an existing form created by someone other than me. Please help, I am new to javascripting.

    I have the book 'Creating Dynamic Forms with Adobe LiveCycle Designer, but none of the javascript or formcalc script is working. Can someone tell me step-by-step how to go about adding this to the existing dynamic form?
    I added a small table on the existing subform, with the other 2 tables already in the form. This looked like a straight forward project. But, I have not any experience in java script other than googling for script and adding it to Adobe Acrobat fillable forms. So, I am sure I am going at this wrong.
    Respectfully

    Hi,
    can you provide the script you have tried and what exactly you want to do. What is the calculation you are trying to do?

  • Assigning a java value(filepath) to a javascript variable

    I have a JSP where I have a java variable(obtained from session) which is nothing but a filepath(say C:\superb.xpdl). When I try to use the variable in javascript using var scriptVar = "<%= sessionVar %>";, the sessionVar value i.e. the filepath is getting modified (like C:superb.xpdl). Slashes are interpredted in a different way(\t for tab, \n for new line etc.,) How to get the filepath with no modifications while assigning to javascript variable? will encoding(using escape()) and decoding help?

    unfortunately you need to double up the slashes
    maybe this will work
    scriptVar = "<%= sessionVar.replaceAll("\\", "\\\\") %>";
    or maybe it will cause a infinite recursion problem (i'm too lazy to try it)

  • Assigning a javascript value to a JSP variable

    How do i assign a javascript value to a JSP variable?
    eg
    <%
    String JSPvar;
    %>
    <script language="JavaScript1.2">
    <!--
    var javascriptVar="hey"
    -->
    </script>
    <%
    JSPvar = javascriptVar ???
    %>

    You do know that the JSP runs on the server and generates HTML, including Javascript, that is executed on the client, don't you?

Maybe you are looking for

  • Prcc error Currency GBP is not in table TCURR

    Hi, While importing the credit card transaction using PRCC for canadian employyees an error message was obtained "Currency GBP is not in table TCURR". In the table V_PTRV_CCC i can see that there is the orignal GBP amount and also the excahange rate

  • Drag and drop to my clipboard

    Hi Is it possible to drag and drop not to the system clipboard but to an instance of clipboared i have created? How? TIA Noam

  • Document date in J1IH

    Hi All, When we are posting additional excise through J1IH that time sytem taking the current date as document date. Even we are changing the document date manual before posting then also its taking current date. So, please help me out. Thanks..... S

  • Price determination for BOM

    Hi guys, how are you. One scenario : I am using the header level BOM(printer) Alternative 1 : 2tray                 :  1no hard disk(20GB) : 1no Duplex kit          :  1no Alternative 2 : Hard disk(20GB)  : 1no Stand                 :  1no Duplex kit

  • WD ALV  read only property

    Hi, Is there a read only property for the cell editor in the ALV table? (I prefer it to the enabled/disabled) visually. Many thanks!