Use alert box in javascript using xsl:message in Xalan

There appears to be a xsl:message tag in XSLT. According to W3C, the implementation is dependent on the XSLT transformer.
However, this tag output the message to my console.
I would on the other hand like to output the message
in a javascript alert box. I am using jaxp 1.1, the XSLT
transformer is Xalan.
Thanks in advance,
taybw

As you surely know, Xalan is running on the server. That's why the <xsl:message> appears there. As far as I know, the only options available to XSLT implementors are whether the message will appear or not, or possibly whether it will end the translation abnormally.
Presumably you have Xalan producing HTML that will be rendered on the browser. If that's the case, then just replace the <xsl:message> element by some Javascript code that will pop up the alert box as soon as the browser loads the page you are writing.

Similar Messages

  • Validation in JSF using alert boxex with javascript

    Hi,
    I want to validate the input of the user as client-side validation, without returning to the server..
    So, if for example he doesn't fill in a field, an alert box should be displayed : " No valid input !!"
    Can soemone help me..
    Thanks

    <h:selectOneRadio id="myradio" required="true" ... >
    </h:selectOneRadio>
    <h:message for="myradio" />Submit the form, if the radio is not selected while the 'required' attribute is set to true, you will get a default validation error in the h:message.
    Get through a good JSF book/tutorial and read on about the validation. JSF offers a robust and highly customizeable validation framework. The error messages are also customizeable. The only difference with the Javascript approach is that it costs one trip to the server as well. But the big advantage is that it is much more robust. As Javascript is clientside, it can easily be disabled by the client or even hacked by the client.
    Here are some useful links:
    JSF book: http://www.amazon.com/JavaServer-Faces-Complete-Reference/dp/0072262400
    JSF specification: http://jcp.org/aboutJava/communityprocess/final/jsr252/index.html
    JSF tutorial (Java EE tut chapter 10 and on): http://java.sun.com/javaee/5/docs/tutorial/doc/bnaph.html

  • Alert boxes when I use ebay

    Hi people,
    I'm suddenly getting Safari ‘alerts’ when I view my summary page on ebay.
    When I click on my ebay page in top sites (or refresh my summary page when I’m already on ebay, or return to the summary page from another ebay page) I get the summary page but am also getting a pop up little (4 inches x 1.5 inches approx) Safari alert box with the Safari symbol on the left, with http://my.ebay.co.uk in bold type and the number 3 in plain type under that and the blue OK button to click on on the right.
    I click on it and the alert disappears to be replaced by an identical box. I click on the OK button on that one and it disappears completely and I can use safari properly.
    Can anyone tell me what’s going on? I tried resetting Safari but it’s still happening. It’s a bit irritating to have to get rid of the two alerts every time I want to view that page.
    Thanks.

    From the Safari menu bar, select
    Safari ▹ Preferences ▹ Extensions
    Turn all extensions OFF and test. If the problem is resolved, turn extensions back ON and then disable them one or a few at a time until you find the culprit.
    If you wish, you may be able to salvage the malfunctioning extension by uninstalling and reinstalling it. That will revert its settings to the defaults.

  • Commit delay when using alerts

    I know that using Headstart it is possible to have the standard FRM messages displaying either in an alert box or in the status bar at the bottom of the screen. I have been involved with two applications that are 100% generated using Headstart and we have chosen to display the messages in an alert box. I have recently discovered that in certain circumstances there is a potentially serious problem with this.
    If the user commits a record, an alert box is displayed with the message FRM-40400: Transaction complete. x records applied and
    saved. I had always believed that at this stage, the records were safely written to the database but this is not the case. If the user leaves the alert box displayed on screen the records have not been saved. If the database goes down at this point the changes are rolled back and not saved to the database.
    I still want to display the majority of the FRM messages in alert boxes. What I want to know is, can I display FRM-40400 in the status bar but every other FRM message in an alert box?

    This is news to me too!!!
    You can make a small customization to your qmslib50 library to always put FRM-40400 on the message line.
    In package qms$forms_errors, procedure ErrorMessageAlert:
    /* customization */
    if p_errorrec.msg_code = 'FRM-40400'
    then
    p_errorrec.severity := 'M';
    end if;
    /* end customization */
    Put this code just before the lines...
    /* Show message */
    IF p_errorrec.severity <> 'M'
    THEN
    Regards,
    Lauri

  • When can I use ALERTS

    Hi All,
    I have small doubt which was asked by my client,
    How and when are the alerts can be used... I know how to use these alerts in BPM...
    But my question is Can the ALERTS can be used in Normal scenarios i.e not BPM... lets say 1:N mapping without BPM ... can I use ALERT if an error occurs in Message Mapping in 1: N without BPM..
    Please give your valuable suggestions...
    Thanks and Regards,
    sirhdar reddy

    to triger an alert inside a UDF chdck with the blog
    <a href="/people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function:///people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
    and for config of alerts:
    <a href="/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step: Alerts - Step by step</a>

  • Flex Alert box not showing text after single inverted comma

    Hi friends,
    I am launching a flex app (swf) from a JSP page. i am sending a value using flashvars like below.
    flashvars.message = '<c:out value="${requestScope.message}"/>';
    This message consists a single inverted comma in between...ex:- L'impression des pages
    But when i want to show this message using alert box in flex like Alert.show(message);, it just shows
    'L'.  i mean it is not showing complete message. the text after inverted comma is missing....
    it will be great if anyone can help me here...
    Thanks,
    Krish

    Hi friends,
    I am launching a flex app (swf) from a JSP page. i am sending a value using flashvars like below.
    flashvars.message = '<c:out value="${requestScope.message}"/>';
    This message consists a single inverted comma in between...ex:- L'impression des pages
    But when i want to show this message using alert box in flex like Alert.show(message);, it just shows
    'L'.  i mean it is not showing complete message. the text after inverted comma is missing....
    it will be great if anyone can help me here...
    Thanks,
    Krish

  • How to use JOptionPane in jsp, instead of javascript message alert box?

    HI,
    How to use JOptionPane in jsp,
    instead of javascript "message alert box"?
    I hate javascript,
    I'd like to only use java in jsp. don't use javascript.
    javascript is client side,
    jsp is server side. i know that.
    how to... instead of javascript box?
    how to use ... message box in webpage?
    don't use applet,,,, don't use javascript,,,
    hm...zzzZzz
    I hate javascript..T.T
    <SCRIPT language=JavaScript>
    alert("hate javascript");
    </SCRIPT>
    ===>>>>
    In this way,,
    JOptionPane.showOptionDialog(null,"I love java")
    I'd like to only use jsp and java and html...in webpage.
    don't use javascript....
    Why? don't sun provide message box in jsp, instead of javascrip box?
    Why?
    Edited by: seong-ki on Nov 4, 2007 8:38 PM

    Drugs are bad, m'kay?

  • How to Send Emails for failed messages without using Alert

    Hi Experts,
    In our project, we need to trigger Emails for the failed messages in SXMB_MONI / Adapter Engine without using Alert Framewrok.
    Please let me know the below :
    1. Is this really possible to avoid Alert?
    2. If possible, then can we accomplish this by creating any PI Scenario? Please provide me some knowledge.
    3. Can we do it by writing any ABAP Code? If ABAP report can make it, then please provide me the code/ tables which will be needed. If any Blog/ Wiki is there, then please let me know the URLs. 
    Thanks,
    Nabendu.

    Hi Nabendu,
       If your customer asks for mails with specific text for message failure, tell that it is not possible. Because Message will go through several engines like Adapter Engine, Integration Engine, BPE. You can not generate mails for the message failures in all these areas with out standard alert mechanism. These are pure technical alerts which only PI people can understand, not business alerts.
    Example: assume your sender channel is unable to connect FTP Server, in this case you can not generate even though you will develop adapter module to generate alerts.
                            So for message validation only you can send mails not for message failures.
    thanks,
    madhu

  • Bug: error message in error console if i reload a page while a javascript alert() box is displayed.

    bug: i have an alert("haha"); displayed from an inpage button with javascript, and while the alert message is still open, if i do a refresh i get this error in the error console:
    Timestamp: 2/5/2012 12:27:27 μμ
    Error: uncaught exception: [Exception... "prompt aborted by user" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: resource:///components/nsPrompter.js :: openTabPrompt :: line 457" data: no]
    it happens on every site that shows an alert dialogue box
    online example:
    [http://www.w3schools.com/js/tryit.asp?filename=tryjs_alert w3schools example]
    press the "show alert box" button and as the alert box is open do a page refresh.

    I didn't realize you could reload in that situation; I thought alert() was application modal. Hmmm...
    In Firefox 13 beta 4 on Windows 7 I still see the error:
    Timestamp: 5/22/2012 7:41:13 PM<br>
    Error: uncaught exception: [Exception... "prompt aborted by user" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: resource:///components/nsPrompter.js :: openTabPrompt :: line 457" data: no]
    I don't think it has any negative consequence. Did you just want to get it on someone's list to look at, or is it a problem for your page/application?
    I looked in Bugzilla briefly and these sound related:
    [https://bugzilla.mozilla.org/show_bug.cgi?id=655181 Bug 655181 – modal dialog (e.g. via window.alert()) opened with meta refresh tag refresh page in background causes this uncaught exception: "prompt aborted by user" .. resource://gre/components/nsPrompter.js]
    [https://bugzilla.mozilla.org/show_bug.cgi?id=717248 Bug 717248 – Pressing backspace on alert() modal closes alert and triggers "back" functionality without firing onkeydown]
    Both note the error when navigating the tab in different ways with the alert displayed. But... not much attention to them so far.

  • Always use the default account when composing new messages box missing in Outlook 2010 after updating the product key.

    I have 2 accounts in outlook 2010. 1 is for me and the other I have delegate access to. When I am in the delegates email and want to reply it automatically uses the account the email is in. So if I am in my email, the from is me but if I am in the delegates
    email and hit reply the from is them. Now this is not working and I can't figure out how to get it to work. The only thing that changes is that office asked me to activate recently, which is weird since I have had this same computer with the same version of
    office for almost a year now. I did a ton of searching and came across an option on the internet: "Always use the deafult account when composing new messages" but this option is not there on my computer. I checked another computer I have with Office
    2010 also and the option is available so it must be something to do with the office activation because I haven't done it on this computer yet. PLEASE HELP!!!

    Seems this is a hot issue recently, I've post a reply to another thread with the similar topic, please reference that:
    http://social.technet.microsoft.com/Forums/en-US/57289ddd-0dd5-4938-92f7-ee420d8b0d7c/outlook-2010-does-not-reply-to-emails-using-the-same-address-that-received-it?forum=officeitproprevious
    Thanks for your updating.
    Tony Chen
    TechNet Community Support

  • Javascript alert boxes are wrapped in Windows 7 with IE 8

    I can't count the number of JavaScript alert boxes I have throughout my systems and they have always made the transition between IE browsers from 6 to 8 without a hitch.  Without a hitch until I setup my first Windows 7 machine.  It is a 64 system that has both 32 & 64 bit IE browsers.
    It doesn't matter which of the two versions I use, the JavaScript messages that I have so carefully crafted with just the proper layout are now wrapped.  The resultant text in the new W7 popups is almost unintelligible because it is so badly scrambled/wrapped on the new white background.
    Since an alert box is simplicty itself, there is no way that I can think of to change the inherent size of the box.
    Has anyone else notice this phenomena???   If so, do you have a way around it short of redoing all of the text in the effected boxes???
    Len
    XP machine's JavaScript Alert popup in IE 8
    W7 machine's JavaScript Alert popup in IE 8 with wrapped text

    HMM I have the same problem. My researches suggest that the Zone.Identifier ADS is still being used for the internet zone, but not the Intranet zone. I too can get an intranet location out of IE, but not by querying Zone.Identifier eg using Powershell. This
    issue is present in XP as well as Win 7. It appears to extend to trusted zone ids.
    One hypothesis is that this is being stored in hidden form to prevent zone ids that decrease security being applied by malware.
    I had thought that maybe the intranet zone id was only present during download - but your experiment suggests otherwise.

  • Acrobat v9 JavaScript Alert Box - any way to add space or line break after each array item?

    I have a Document level Javascript used to identify blank required fields and is triggered on document actions, Print and Save. The script identifies the blank required fields, counts them, and outputs to an Alert box indicating the number of required fields blank and lists the fields by tooltip name. The script identifies the required fields by an asterisk at the end of each tool tip.
    My question is there any way to add a space or a line break after the comma for each listed item?
    Here is an image of the output where the listed items are all run together.
    Here is the code:
    function validateFields()
    //a counter for the number of empty fields
    var flg = 0
    // count all the form fields
    var n = this.numFields
    //create an array to contain the names of required fields
    //if they are determined to be empty
    var fArr = new Array();
    //loop through all fields and check for those that are required
    // all fields that have a '*' in their tool tip are required
    for(var i = 0;i<n;i++){
    var fn = this.getNthFieldName(i);
    var f = this.getField(fn);
    //tool tip is the fields\'s 'userName' property;
    var tt = f.userName
    //test for the '*';
    if(tt.indexOf('*')!=-1 && f.value == f.defaultValue){
    //increment the counter of empty fields;
    flg++;
    //add the fields userName (tool tip) to the list of empty field names;
    fArr[fArr.length] = tt;
    //now display a message if there are empty fields
    if(flg>0){
    app.alert('There are '+flg+' fields that require a value\n\n'+ fArr,3)
    else{
    this.print();

    Thank you! The alert box array items now have a line break, image below.  You know you have made my day and possibly several weeks as now I have more understanding about how to apply everything I have been reading in the Acrobat JavaScript guide and of course as soon as you pointed out using a "join", that triggered some old-days of working with Access and SQL queries.
    I will work on the required attribute to see how I might reference it.  I am laughing at myself now - good luck to me in figuring it out as I was very stick-in-the-mud regarding the line break issue.
    Thanks again and here is the result of the updated code:

  • Message missing from alert box & Can you disable everything until user selects an answer?

    Question 1 - My alert box window is working, and the title and buttons function as they should, but does anyone know why my message is not showing up?
    Question 2 - How do you program the alert box window so that no other buttons on your application work until the user selects one of your alert window buttons? I can do this manually by setting everything to enabled = false, but I know this happens automatically every other time I've used the alert window component, but it's not working for me now.
    Question 3 - How can I prevent multiple alert windows from popping up? My alert comes up when a user clicks a button called 'Delete'. Would be solved if I had the answer to question 2.
    var myMess:String = '';
    var myTitle:String = '';
    function confirmDelete(){
        selectedAlt = list_dg.selectedItem.ALT_CODE;
        myMess = "Are you sure you want to delete this ALT code: "+selectedAlt+"?";
        myTitle = "Confirm Delete ALT Code Function                                                    ";
        var alertBox:Object = Alert.show(myMess,myTitle,Alert.YES|Alert.NO,this,deleteConfirmHandler);
        alertBox.setSize(450, 125);
    // HANDLER FOR CONFIRM DELETE ALT ALERT WINDOW
    deleteConfirmHandler = function(evt_obj:Object):Void {   
        var myAnswer = evt_obj.detail;
        // returns 1 if yes, 2 if no.
        if (myAnswer == 1){
                deleteAlt();
        else {   
            altDetail.moveAssign_btn.enabled       = false;
            altDetail.moveAvail_btn.enabled        = false;
            altDetail.avail_list.selectedIndex     = null;
            altDetail.assigned_list.selectedIndex  = null;

    I think you were on the right track, it did have something to do with the parent fla file. Once I complied it's parent file (and imported the window and alert classes into the parent), my message appeared in the alert box.
    It doesn't make any sense, because the component is not in the parent file, it's in the sub-parent fla file, but I guess you just have to compile all the files in the hierarchy for it to work... It also doesn't make sense why everything else worked before (the title, the yes and no buttons) except for the message.
    Thanks for the suggestion (to look at the depths, etc), however, I'm still unable to understand why the alert is not modal as it should be. If anyone has any suggestions on how to fix the buttons to make them modal, please let me know. Thanks.

  • Javascript alert boxes?

    I'm looking to incorporate an alert box which launches when a
    user clicks on exit to confirm the click. Is there an easy way to
    do this within Captivate 2's "execute javascript" command?

    In general, you can close a window with JavaScript but my
    understanding is that it can't be done at all in Firefox 2.x unless
    the window you're trying to close was originally created using
    JavaScript. This would be a deal-breaker for most general-purpose
    solutions.
    If you're sure you only have to deal with IE, then there are
    some ideas in
    this discussion
    thread that might work for you.
    When testing such solutions, it's a good idea to run your
    files from the environment they will ultimately be accessed from
    (i.e., a Web server). Unless you monkey with your IE security
    settings, running JavaScript-enhanced Captivate files from the
    local machine will result in false negatives due to browser
    security restrictions.

  • Javascript alert box due to inactivity

    Can anyone give me an example how to use javascript to display an alert box after a certain time of inactivity?

    After drag it is not going to "String name=request.getParameter("fname")".....i
    debugged and confirmed this.
    A similar issue was reported in IE9 also. Please find the link for more details
    https://connect.microsoft.com/IE/feedback/details/793230/javascript-alert-box-duplicated-if-moved-ie-9

Maybe you are looking for