Confirm in Java Script

hi friends,
Can anyone say me how to change the captions on the buttons of the confirm method in Java Sript.
That is i want it to be changed in to Yes and No . Instead of Ok and Cancel respectively
Thanks all
Aski

JavaScript != JavaYou should search for a JavaScript forum to ask these questions, and a GoOgLe search always gives some results.
http://www.irt.org/script/1444.htm
I don't think there is a way of modifying the default dialog button text in JavaScript. If you would use VbScript, you could create buttons as you want.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vsfctmsgbox.asp

Similar Messages

  • Column link - call java script & assign current report column value to item

    Hi,
    How to call java script and assing current report column value to item?
    I have a button column in the report to 'delete' the selected row.
    I want to first show dialog box with message 'Are you sure?'. If yes, process to delete
    will be executed, else no action.
    In order to fire JS, I used Column Link ->Target=URL.
    Problem: The alert is showing but I don't know how to pass selected row's primary
    key value to process (to delete selected row).
    I have a item which can be used to store selected primary key value but don't know how to assign the value
    when button pressed.
    Thanks in advance
    Dip

    Ok. The issue has been resolved by following way.
    PAGE PROCESS: delete_request
    begin
    delete xyz
    where id = :P8_id;
    commit;
    end;BUTTON URL:
    javascript: DelRec(null,'CREATE', 'f?p=&APP_ID.:8:&SESSION.:delete_request:NO::P8_id:#id#');Java Script:
    <script language="JavaScript1.1" type="text/javascript">
    function DelRec(msg, req, url){
    var confDel = msg;
    if(confDel ==null){
    confDel= confirm("Are you sure?");
    }else{
    confDel= confirm(msg);}
    if (confDel== true){
    redirect(url);           }
    </script>

  • Using a java script comfirmation in delete record function?

    Hello;
    I am trying to write a confirmation script in Java to delete
    a record. I don't want it to delete the whole table of information,
    just the record teh delete button is attached to using the ID. Here
    is my script, and then the code on the page:
    <script language="JavaScript">
    function confirmDelete(id) {
    if (confirm ("Are you sure you want to delete this record?"))
    document.HREF.action="ProjectCat-Action.cfm?id="+id;
    document.HREF.submit();
    return false;
    </script>
    Here is the query I am trying to use it with:
    <cfquery name="catMan" datasource="#sitedatasource#"
    username="#siteUserID#" password="#sitePassword#">
    SELECT Categories.Name AS ViewField1, Categories.CategoryID
    AS ID
    FROM Categories
    </cfquery>
    <head>
    </head>
    <body>
    <cfloop query="catMan" startRow="#URL.startRow#"
    endrow="#endRow#">
    <cfoutput>
    #ViewField1#
    <form action="ProjectCat-Action.cfm" method="post">
    <input type="hidden" name="ID" value="#ID#">
    <input type="submit" name="proj_Delete" onClick="return
    confirmDelete('#ViewField1#')" value="Delete"></form>
    </cfoutput>
    </cfloop>
    </body>
    #Note: there is code here in my loop query for next and
    previous buttons, I just didn't post that code because it doesn't
    pertain to this question.
    Is there also a way to make the Java Script state in the spot
    where it says, "Are you sure you want to delete this record" to
    make it say "Are you sure you want to delete #ViewField1#?" (the
    name of the record being deleted) ?
    Thank you!
    Phoenix

    just pass 2 arguments to your js function - id AND name of
    category:
    <input type="submit" name="proj_Delete" onClick="return
    confirmDelete(#ID#,'#ViewField1#')" value="Delete">
    and the function:
    function confirmDelete(id,name) {
    if (confirm ("Are you sure you want to delete " + name + "
    category?"))
    document.HREF.action="ProjectCat-Action.cfm?id="+id;
    document.HREF.submit();
    return false;
    but creating a separate form for each category displayed on
    the page is
    very inefficient - you should revise your code... you do not
    even need a
    form, really... just use <a href=...> to call your js
    function, or an
    <input type=button ...> (without any <form ..>
    tags) if you absolutely
    must have a button to click...
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com

  • Using Java Script With Item Button

    Hi All,
    please i want to know how can i call any java script function from an item button?
    i cannot find the "Action When Button Clicked" tab which is exist in a region button.
    Thanks in advance,
    Ola

    Hi,
    i am having a strange problem with java script
    i have defined the following commandlink in an af:table
    <af:commandLink
    text="lockUser"
    disabled="#{!bindings.lockUser.enabled}"
    id="cl1"
    partialTriggers="cl1"
    action="#{searchBean.lockUser}">
    <af:clientListener method="onlock1" type="click"/>
    </af:commandLink>
    I have defined the following java script function.
    <f:facet name="metaContainer">
    <af:resource type="javascript" >
    function onlock1(){
    if(confirm("Do you want to cancel")){return true;}
    else {
    return false;}
    </af:resource>
    </f:facet>
    when i click on the link, the dialog box appears asking if i want to cancel: when i press yes still the link action is activated. Kindly suggest where i am going wrong.
    the behaviour i need is to if cliked on yes then the link action does not activate and nothing happens. if i press any other button the link functionality should be activated and it should perform the locking functionality

  • Button executing CloseWindow Java Script and raising event on server

    Hi All.
    Somebody can help me with this:
    <b>What i'm needing:</b> an 'END' button on a BSP, when the user click on this button just show an aswer box asking if the user wants to close the windows, in case to click yes close the current window and execute a business logic in the controller.
    <b>What i have:</b> a button with the event onClientClick invoking a Java Script function which is showing the answer box and the event onClick which raise the event on the server side. The thing is if the user click on yes then i'm closing the current window and the server event never is triggered. This is not working !!!
    Any ideas ? some sample code ?
    Thanks in advance.
    Armando.

    Hi Armando,
    The 'Yes' on the <i>Confirm dialog box</i> (Client Side Scripting) has to tell the application (Server side scripting) to call your METHOD XXX. This is done by passing querystring <i>exit=X</i> to the URL.
    1. Comment onClick event of the button.
    2. Modify the code the JS function of your End button as follows
       func_end()
    //if no
      // your original code
    // if yes
    document.location.href = document.location.href + '?exit=X';
    3. Add following code to DO_REQUEST
      IF REQUEST->GET_FORM_FIELD( NAME = 'exit' )  ne space.
    *your method will be called only when there is an exit=x in the url
           call method XXX.
    *set a page attrib as follows
           l_exit = 'X'.
      ENDIF.
    4. Add following code to your layout
    <%if l_exit = 'X'.%>
    <script>
    window.close();
    </script>
    <%endif.%>      
    Regards,
    Alwyn

  • Calling java script from a button

    Hi,
    I have a Form and I would like to let the end-user to confirm some action that was initiated by pressing a button. The best way would be to call Java script, but the button is an 'item' button and not a 'region' button - i..e it is placed between items and not above the region, like Save, Cancel etc.
    In case of 'item' buttons I do not have 'Optional URL Redirect' field where to place the javascript call.
    Tamas

    You can try this..
    Instead of using button
    Edit the Item to which you want to associate a button.
    Go to Element tab
    Under Post Element Text enter
    </ br> <a href="#" -onclick=call_me() class="t20Button">Click me</a>Note : you need to change class="t20Button", i'm using theme 20 and in that the look and feel of button is derive from t20Button.
    remove the hyphen before onclick ..
    Regards,
    Shijesh

  • Java script--Version 6, update 21.  Is this legitimate?

    I keep getting a message that I MUST! make a critical update to Java script--Version 6, update 21.  The only way I can get out of it is by foreced quit. Is this legitimate?

    Java, rather than Javascript ?
    Post a screenshot, & confirm that Software Update isn't showing any new updates.
    You should also typically Un-check Safari - Preferences - Security - Allow Java unless you're on a trusted site that requires it.

  • How to call backing bean method from java script

    Hi,
    I would like to know how to call backing bean method from java script.
    I am aware of serverListener and [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
    but i am running in to some issues with [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
    regarding which i asked for help in other thread with subject ....Question on AjaxAutoSuggest article (Ajax Transactions Using ADF and J...)
    The reason why i posted is ( though i realise both are duplicates) .. that threads looks as a specific question to that article hence i would like to ask the quantified problem is asked in this thread.
    So could any please letme know how to call backing bean method from java script
    Thanks
    Murali
    Edited by: mchepuri on Oct 24, 2009 6:17 PM
    Edited by: mchepuri on Oct 24, 2009 6:20 PM

    Hello,
    May know how to submit a button autoamtically on onload of page with clicking a welcome alert box. the submit button has managed button too to show a message on console using SOP.
    the problem is.
    1. before loading the page a javascript comes on which i clicked ok
    2. the page gets loaded and the button is there which gets automatically clicked and the managed bean associated with prints a message on console using SOP.
    I m trying to do this through server listener and click listener. the code is(adf jspx page)
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1" binding="#{backingBeanScope.backing_check4.d1}">
    <af:form id="f1" binding="#{backingBeanScope.backing_check4.f1}">
    <af:commandButton text="commandButton 1"
    binding="#{backingBeanScope.backing_check4.cb1}"
    id="cb1" action="#{beanCheck4.submit1}"/>
    <af:clientListener type="click" method="delRow"/>
    <af:serverListener type= "jsServerListener"
    method="#{backingBeanScope.backing_check4.submit1}"/>
    <f:facet name="metaContainer">
    <af:resource type ="javascript">
    x=confirm("hi");
    // if(x){
    delRow = function(event){
    AdfCustomEvent.queue(event.getSource(), "jsServerListener", {}, false);
    return true;
    </af:resource>
    </f:facet>
    </af:form>
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_check4-->
    </jsp:root>
    the backing bean code is -----
    public class classCheck4 {
    public classCheck4() {
    public String submit1() {
    System.out.println("hello");
    return null;
    }

  • YouTube and Yahoo problems - Enable Java Script or Download Latest Flash???

    For a number of weeks, I have had problems with browsing certain sites. I initially noticed that some adverts had a connection error on web pages that were displaying their content fine in every other way.
    I then noticed that I couldn't access any page to do with Yahoo (connection error). I assumed that Yahoo was down until I tried to access YouTube where all that is displayed is a white page with all the text from the page in columns down the left hand side.
    There is an error message that tells me to check that Java Script is Enabled or to download the latest Flash Player.
    I have checked Java Script (enabled) and uninstalled / reinstalled latest Adobe Flash, but still have the same issue. I have the same problem with Firefox 2 and 3, and even installed Opera and got the same problem.
    All the forums and support pages I can find don't seem to come up with a definitve answer.
    This is the first REAL issue I have had with my Mac since I have had it and it has never let me down untill now......HELP!!
    Thanks (I hope!!) in advance.

    Could it be a routing problem even though I never used to have this problem with the current router and provider?
    There are also three other laptops using the same router and provider (all PCs), they all have no problems connecting to YouTube, Yahoo, etc.
    Is it possible that a routing problem would only affect my Mac?
    I have tried Safari, Firefox (2 & 3) and Opera. All have same issue.
    I think I have cleared cache, can someone confirm the correct procedure?
    Message was edited by: Lekseon

  • Java script popup functionality not working on af:commandLink

    Hi,
    i am having a strange problem with java script
    i have defined the following commandlink in an af:table
    <af:commandLink
    text="lockUser"
    disabled="#{!bindings.lockUser.enabled}"
    id="cl1"
    partialTriggers="cl1"
    action="#{searchBean.lockUser}">
    <af:clientListener method="onlock1" type="click"/>
    </af:commandLink>
    I have defined the following java script function.
    <f:facet name="metaContainer">
    <af:resource type="javascript" >
    function onlock1(){
    if(confirm("Do you want to cancel")){return true;}
    else {
    return false;}
    </af:resource>
    </f:facet>
    when i click on the link, the dialog box appears asking if i want to cancel: when i press yes still the link action is activated. Kindly suggest where i am going wrong.
    the behaviour i need is to if cliked on yes then the link action does not activate and nothing happens. if i press any other button the link functionality should be activated and it should perform the locking functionality

    <!-- TWO STEPS TO INSTALL LINE WRAPPER:
    1. Copy the coding into the HEAD of your HTML document
    2. Add the last code into the BODY of your HTML document -->
    <!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
    <HEAD>
    <SCRIPT LANGUAGE="JavaScript">
    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->
    <!-- Begin
    function showLines(max, text) {
    max--;
    text = "" + text;
    var temp = "";
    var chcount = 0;
    for (var i = 0; i < text.length; i++) // for each character ...
    var ch = text.substring(i, i+1); // first character
    var ch2 = text.substring(i+1, i+2); // next character
    if (ch == '\n') // if character is a hard return
    temp += ch;
    chcount = 1;
    else
    if (chcount == max) // line has max chacters on this line
    temp += '\n' + ch; // go to next line
    chcount = 1; // reset chcount
    else // Not a newline or max characters ...
    temp += ch;
    chcount++; // so add 1 to chcount
    return (temp); // sends value of temp back
    // End -->
    </script>
    </HEAD>
    <!-- STEP TWO: Copy this code into the BODY of your HTML document -->
    <BODY>
    <>
    <form name=form1>
    <textarea name=text1 rows=15 cols=50>This is just an example of a long textbox entry that just went on and on and on and on</textarea><br>
    <input type=button value="Wrap Lines to 50 Spaces"
    onClick="this.form.text1.value = showLines(50, this.form.text1.value)">
    <br><br>
    <textarea name=text2 rows=15 cols=50 wrap=virtual>This is another example, but this time the textarea box has the "wrap=virtual" attribute, which makes each line wrap in the box rather than scrolling out the right side. The script also correctly deals with this type of box. Like before, notice that hitting <enter> after each line, like this:
    This is on another line
    And so is this one.....
    Still wraps correctly. Neat!</textarea><br>
    <input type=button value="Wrap Lines to 50 Spaces"
    onClick="this.form.text2.value = showLines(50, this.form.text2.value)">
    </form>
    </center>
    Edited by: user7236892 on May 6, 2011 11:45 PM

  • Java Script to move up a BSP Page

    Hi all,
    I've a problem with a BSP page.
    The BSP application is an Frame of an URL, where there's a page with height="4000".
    So who manage the URL have decided to create for BSP pages an Frame height of 4000 pixel.
    But after insert the information on SAP, I call a BSP page of confirmation with the height of 8 lines.
    I've insert a href to select the top of frame.
    But I need that it's been called by a script, so I can manage a possible table of error messages.
    Is there a java script instruction to upload the page on the top of frame?
    Thanks in advance.
    Luca

    Hi Raja,
    I call the page from Event Hendler "On Input Process" and it's working correctly.
    But the application is inside a Web Site, where I can't controll it. I can't controll the scroll bar of Web Site.
    I've used this code
    <script language="javascript" type="text/javascript">
    function SearchRef() {
        location.href='#top';
    </script>
    and call it from Body of page.
    Thank you for help
    KR
    Luca

  • How to load a java script in oracle database

    Is it possible to load d java script in Oracle database. while the object type is
    java resource ..

    RENUJP wrote:
    I meant to load a javascript to oracle database not to oracle appliocation.
    like loadjava....
    I can load a javascript to oracle database.. but i can't call it...Please re-read the comments above, especially the part about this not being a javascript nor oracle forum. Exactly what part about this information don't you understand?

  • Adobe Dreamweaver CS5.5 - Windows 7 - Java Script Problem

    I am having trouble with Anchor.htm.
    When I try to insert an anchor in the text (Insert > Named Anchor> I get this error message:
    "While executing insertObject in Anchor.htm a Java Script error occurred."
    I recently downloaded both the 32- and 64-bit Java Script applications when I received a message that the existing version of Java Script was out-of-date. Anchor.htm worked before I installed the update.
    The files I downloaded and installed are:
    jre-7u9-windows-i586.exe
    jre-7u9-windows-x64.exe
    Please can anyone help me with this problem?

    From Dreamweaver FAQ
    http://forums.adobe.com/thread/429114
    "If Dreamweaver is acting erratically, or if you see a message saying "the following JavaScript error(s) occurred",  it's usually a sign of a corrupt cache file. The first thing to try should always be to delete the file cache. If that doesn't work, delete your personal Configuration folder. Full instructions are in Deleting a corrupted cache file.
    http://forums.adobe.com/thread/494811"
    Nancy O.

  • Can we use Java Script in SAP BusinessObjects Web Intelligence 4.1?

    Can we use Java Script or any other Script in BI 4.1 Web Intelligence? If possible please do let me know the method/process

    Hi Kranthi,
    You have option to read a cell content as html. else you will have to go for SDK. I think you will get better suggestions, if you can explain your requirement in a little detailed manner.
    refer below links for more details about SDK.
    http://bukhantsov.org/2013/04/how-to-create-a-webi-document-using-java-report-engine-sdk/
    Regards,
    Nikhil Joy

  • In a Conversion file, Using Java Script - IF statement with Greater,Less definitions

    Hail to All Gurus,
    Well, I've been trying to make a conversion file by using if statement of Java script with < , > definitions. unfortunately i got "Evolution error" over and over again.
    Actually i want to convert all dates before 2009 as 2008.12. And the dates which is greater than 2009 will be converted as they are (e.g. 2009.01 or 2010.02 etc.).
    Code is:
    js:if(%external%.toString().substring(0,4)<"200900"){"2008.12"}else{%external%.toString().substring(0,4) + "." + %external%.toString().substring(4,6)}
    SAP EPM version 10.0 SP15 Patch 2
    Build 8586
    Thanks for your help in advance

    Sadi,
    You can write if Statement in transformation not conversion.
    Look at this docs,
    How to Import Master Data and Hierarchies into SAP BusinessObjects BPC 7.5 from SAP NetWeaver BW
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c02d0b47-3e54-2d10-0eb7-d722b633b72e?QuickLink=index&…
    Thanks

Maybe you are looking for

  • [solved] Arch linux access point with multiple interfaces for the NAT

    Hi, I have a router running Arch linux. It is connected via LAN (let's call it eth0) to the internet. It has a second LAN interface, eth1, and a wireless interface in master mode, wlan0. Now, Everything works perfectly except providing network connec

  • Script works in PowerGUI, not in ISE or from powershell.exe

    Hi, I am trying to integrate with the Manage Engine Password Manager PRO Rest API.. I have some code working on my desktop where I currently use PowerGUI this was all seemingly working correctly.. I have then gone to execute the code from a window on

  • How to get responses to topics posted on forum

    I have submitted multiple requests to the forum in the past, on multiple topics, and received sporadic responses. My most recent request was originally posted on Dec 18. I have yet to receive a response from anyone. I have reposted to the same topic,

  • Problem opening form: FRM-41041

    hello... i am working on the customization of a standard form in order management. I have done all the customizations. but having one problem, when i open my form from the responsibilty it shows a error saying. FRM-41041 Cannot find form module: inva

  • I `m not showing my fb page in skype accounts

    o