TextArea autoSize/ autowrap not working

Hi,
I did a search and found few solutions to this problem however it is not working in my case.
I am facing problem related to TextArea auto wrap.
I used the following code I found on net to fix this however it is not working.
PHP Code:
addEventListener(FlexEvent.CREATION_COMPLETE,onCreationComplete);
protected function  onCreationComplete(event:FlexEvent):void
            //textAreaControl is the id of the control you want to resize to contain it's text.
            updateSize();   
        protected function updateSize():void
            if(mx_internal::getTextField() != null)
                validateNow();
                mx_internal::getTextField().autoSize = TextFieldAutoSize.LEFT;
                height = mx_internal::getTextField().height + 1;
see the attached screenshot. the border is drawn incorrectly around textarea
Any help is appreciated.

This works for me:
            import mx.core.mx_internal;
            use namespace mx_internal;
            private function textareaCreationComplete(e:Event):void {
                var textfield:TextField = e.target.getTextField() as TextField;
                with(textfield){
                    autoSize = TextFieldAutoSize.LEFT;
                e.target.height = textfield.height;
However, again, this is a "hack" to me. The reason you'd use TextArea is you get scrollbars if the text does not fit to the given area. You are trying to resize the component to fit to its content, ie. trying not to show the scrollbars. In that case why not just use regular TextField, which you can auto resize easily without any hacks?

Similar Messages

  • Spry textarea character count not working in IE9

    Hi.
    I'm using DW CS5 for a ColdFusion form with a textarea field. The spry character count works in every browser but IE9. Anyone know how to fix this?
    Thanks!

    This feature will not work in IE9 and IE10.
    The problem is two-fold
    a) The Copyright notice shows 2006 as the last Spry update. This was around the time of IE7
    b) Microsoft tends to go off on a tangent where every release of IE behaves differently
    As always, we are in the hands of the Adobes and Microsofts.

  • In SSRS , after exporting report in excel,wrap text property for cell and freeze column for SSRS table header not working in Excel

    I am working no one SSRS my table headers are freeze cangrow property is false and my report is working perfect while rendering data on RDL and i want same report after exporting in Excel also , i want my table header to be freeze and wrap text property
    to work after exporting in my report in excel but its not working ,is there any solution ? any patch ? any other XML code for different rendering ? 

    Hi Amol,
    According to your description, you find the wrap text property and fix column is not working after exporting into Excel. Right?
    In Reporting Services, when exporting to excel file, it has limitation for textbox.
    Text boxes are rendered within one Excel cell. Font size, font face, decoration, and font style are the only formatting that is supported on individual text within an Excel cell.
    Excel adds a default padding of approximately 3.75 points to the left and right sides of cells. If a text box’s padding settings are less than 3.75 points and is just barely wide enough to accommodate the text, the text may wrap in Excel.
    In this scenario, it supposed to be wrap text unless you merge cells. If cells are merged, word-wrap does not work correctly. If any merged cells exist on a row where a text box is rendered with the
    AutoSize property, autosize will not work. For the Fix Data Property, it can't be working in Excel. These are features when exporting to Excel. We can't change it because it's by design.
    Reference:
    Exporting to Microsoft Excel (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • AutoSize not working properly in TextField when using non-zero line spacing

    When using non-zero line spacing, the autoSize property is not functioning as expected, causing text fields to scroll that shouldn't.  Also, when using device fonts, the sizes of the TextFields are wrong in the Flash IDE.
    I have a TextField whose height is supposed to be dynamic, depending the width of the TextField.  wordWrap is true, the text is left aligned, and the autoSize value is flash.text.TextFieldAutoSize.LEFT.
    When the TextField's width is adjusted, the height increases or decreases as expected, but when I scroll the mouse wheel over the TextField, it allows a single line to scroll out of view.  This should not be happening.  The autoSize property should ensure the TextField is large enough to neither require nor allow scrolling.
    Has anyone else encountered this issue or know how to fix it?
    Update: Been a problem since at least 2006! > http://blog.nthsense.net/?p=46
    http://www.kirupa.com/forum/showthread.php?288955-Disabling-textfield-scrolling   Bug is caused by using a line height ("line spacing" in Flash) larger than zero, for example 1.0pt.  It looks like when I reduce the line spacing of the text field to zero, the issue goes away.  There doesn't seem to be anything wrong with how autoSize is calculating the required height of the text (i.e. it is exactly textHeight + 4 pixel gutter, and drawing the rectangle (2,2,textWidth,textHeight) aligns visually with the text), so it must have to do with how the TextField is deciding whether it needs to scroll or not, and that separate calculation is being thrown off by the non-zero line spacing.  The additional non-zero spacing at the end of the last line could be making the TextField think it needs to scroll, even though it's hight is sufficient at "textHeight + 4".  Apparently the problem manifests when using a non-zero leading value as well.
    In fact, it has to be related to the leading value exactly, since the following code stops the textfield from scrolling.
    //body is TextField
    var tlm:TextLineMetrics = body.getLineMetrics(body.numLines - 1);
    trace(tlm.leading); //traces "1" here.  traces zero when line spacing is zero, and traces larger values with larger line spacing values
    body.autoSize = flash.text.TextFieldAutoSize.NONE; //turn off autosize so the height can be set manually
    body.height += tlm.leading; //increase height of textfield by leading value of last line to cause scrolling to be turned off.
    Honestly, this is pretty unacceptable bug.  First of all, scrolling should not be sensitive to trailing line spacing, because autoSize and textHeight do not include it. It need to be consistent, and I think textHeight and autoSize setting height = textHeight + 4 is correct.  Vertical scrolling should use textHeight as it's guage for whether scrolling is necessary, but instead, it's obviously involving the leading values of the last line.  At the very least, vertical scrolling should simply be disabled when autoSize is turned on and wordWrap is true, because the TextField should be big enough to fit all the text.  The workaround of manually adjusting the height is also no good, since turning autoSize back on will immediately change the size back and trigger scrolling again.  I also shouldn't have to set line spacing to zero just to use the autoSize feature, since the scrolling calculations are wrong in this way.

    No, lol.  Luckly, I replace most of my TextFields on the display list with my subclass TextFieldEx.  I just call a clone method that accepts a TextField and returns a TextFieldEx with identical properties.
    I corrected the problem via modifying the subclass to behave differently when autoSize is not NONE and wordWrap is true.  Under those conditions, the maxScrollV and scrollV property values are fixed at 1, and the class listens for its own SCROLL event and sets scrollV to 1 when it occurs.  That allows me to leave everything else alone, including text selection, and use whatever line spacing I want.
    The modification seems to work fine so far.
    For anyone interested in doing something similar, here is a clone method that will copy a TextField.
    public static function clone( t:TextField ):TextFieldEx
                                  var te:TextFieldEx = create( "", t.width, t.type, t.multiline, t.wordWrap, t.selectable, t.embedFonts, t.defaultTextFormat );
                                  te.alpha = t.alpha;
                                  te.alwaysShowSelection = t.alwaysShowSelection;
                                  te.antiAliasType = t.antiAliasType;
                                  te.autoSize = t.autoSize;
                                  te.background = t.background;
                                  te.backgroundColor = t.backgroundColor;
                                  te.blendMode = t.blendMode;
                                  //te.blendShader = t.blendShader;
                                  te.border = t.border;
                                  te.borderColor = t.borderColor;
                                  te.cacheAsBitmap = t.cacheAsBitmap;
                                  te.condenseWhite = t.condenseWhite;
                                  te.displayAsPassword = t.displayAsPassword;
                                  //te.embedFonts = t.embedFonts;
                                  te.filters = t.filters;
                                  te.gridFitType = t.gridFitType;
                                  te.height = t.height;
                                  te.opaqueBackground = t.opaqueBackground;
                                  te.restrict = t.restrict;
                                  //te.selectable = t.selectable;
                                  te.sharpness = t.sharpness;
                                  te.thickness = t.thickness;
                                  te.transform = t.transform;
                                  //te.type = t.type;
                                  te.useRichTextClipboard = t.useRichTextClipboard;
                                  //te.wordWrap = t.wordWrap;
                                  //Assign text last
                                  te.htmlText = t.htmlText;
                                  return te;
    //And the create method it uses
    public static function create( text:String = "", width:Number = NaN, type:String = null, multiline:Boolean = false, wordWrap:Boolean = false, selectable:Boolean = true, embedFonts:Boolean = false, font_or_textformat:*=null, size:Object=null, color:Object=null, bold:Object=null, italic:Object=null, underline:Object=null, url:String=null, target:String=null, align:String=null, leftMargin:Object=null, rightMargin:Object=null, indent:Object=null, leading:Object=null ):TextFieldEx
                                  var tf:TextFieldEx = new TextFieldEx();
                                  tf.width = isNaN(width) ? 100 : width;
                                  tf.defaultTextFormat = (font_or_textformat is TextFormat) ? (font_or_textformat as TextFormat) : new TextFormat( font_or_textformat as String, size, color, bold, italic, underline, url, target, align, leftMargin, rightMargin, indent, leading );
                                  tf.embedFonts = embedFonts;
                                  tf.multiline = multiline;
                                  tf.wordWrap = wordWrap;
                                  tf.selectable = selectable;
                                  tf.type = type;
                                  tf.text = text; //setting text last ensures the text line metrics returns correct values
                                  //Initialize the TextField's size to fit the text.
                                  if (!multiline)
                                            //When in single-line mode and no specific width is given,
                                            //expand width to entire line.
                                            if (isNaN(width))
                                                      tf.width = tf.textWidth + 4; //match width of text
                                  //Height is always automatically adjusted to fit the text by default.
                                  //It's better than the arbitrary 100px default height.
                                  var minimum_height = tf.getLineMetrics( 0 ).height;
                                  var h:Number = tf.textHeight;
                                  tf.height = (h < minimum_height) ? (minimum_height + 4) : (h + 4); //match height of text, ensuring height is at least enough to display one line, even if there is no text
                                  return tf;

  • Changing the font size does not work with Textarea with HTML Editor

    If you change the font size in the text area of a "Textarea with HTML Editor" item it does not work. I've searched the forum and the only solution I've seen is to use an HTML editor foriegn to APEX. Does anyone have a better solution? Thanks, Elizabeth

    I'm having a similar issue except with HTML Editor Standard.
    What I'm doing is allow someone to write to an HTML Editor Standard field and then an HTML marked up text is saved to a db CLOB column. In another page, I reference this DB column and show it in an HTML Region (I do a computation Before Regions for a hidden item that writes out the html with "htp.p")
    Everything shows up fine EXCEPT the font tags and headings. I'm finding that the HTML Region sets the font size only with the < d i v s t y l e="font-size: large" >and NOT < f o n t size:6 >. When the HTML Editor renders the user's text input, any size changes are made with the < f o n t > tag, which is depreciated anyways, and not with "style". That's why the size is not showing up.
    I can't really figure out why the headings aren't showing up except maybe the css style in the region is overridding it...
    Is there another APEX item type like HTML Editor (which uses FCKEditor) that I can use, or maybe another approach to remedy this issue? Or maybe this post calls for an enhancement with the HTML Editor?{size}{size}
    </div>
    Edited by: maui26 on Mar 4, 2009 10:43 AM

  • Why this code is not working??? java script

    gen_validatorv2.js
         JavaScript Form Validator
    Version 2.0.2
         Copyright 2003 JavaScript-coder.com. All rights reserved.
         You use this script in your Web pages, provided these opening credit
    lines are kept intact.
         The Form validation script is distributed free from JavaScript-Coder.com
         You may please add a link to JavaScript-Coder.com,
         making it easy for others to find this script.
         Checkout the Give a link and Get a link page:
         http://www.javascript-coder.com/links/how-to-link.php
    You may not reprint or redistribute this code without permission from
    JavaScript-Coder.com.
         JavaScript Coder
         It precisely codes what you imagine!
         Grab your copy here:
              http://www.javascript-coder.com/
    function Validator(frmname)
    this.formobj=document.forms[frmname];
         if(!this.formobj)
         alert("BUG: couldnot get Form object "+frmname);
              return;
         if(this.formobj.onsubmit)
         this.formobj.old_onsubmit = this.formobj.onsubmit;
         this.formobj.onsubmit=null;
         else
         this.formobj.old_onsubmit = null;
         this.formobj.onsubmit=form_submit_handler;
         this.addValidation = add_validation;
         this.setAddnlValidationFunction=set_addnl_vfunction;
         this.clearAllValidations = clear_all_validations;
    function set_addnl_vfunction(functionname)
    this.formobj.addnlvalidation = functionname;
    function clear_all_validations()
         for(var itr=0;itr < this.formobj.elements.length;itr++)
              this.formobj.elements[itr].validationset = null;
    function form_submit_handler()
         for(var itr=0;itr < this.elements.length;itr++)
              if(this.elements[itr].validationset &&
         !this.elements[itr].validationset.validate())
              return false;
         if(this.addnlvalidation)
         str =" var ret = "+this.addnlvalidation+"()";
         eval(str);
    if(!ret) return ret;
         return true;
    function add_validation(itemname,descriptor,errstr)
    if(!this.formobj)
         alert("BUG: the form object is not set properly");
              return;
         }//if
         var itemobj = this.formobj[itemname];
    if(!itemobj)
         alert("BUG: Couldnot get the input object named: "+itemname);
              return;
         if(!itemobj.validationset)
         itemobj.validationset = new ValidationSet(itemobj);
    itemobj.validationset.add(descriptor,errstr);
    function ValidationDesc(inputitem,desc,error)
    this.desc=desc;
         this.error=error;
         this.itemobj = inputitem;
         this.validate=vdesc_validate;
    function vdesc_validate()
    if(!V2validateData(this.desc,this.itemobj,this.error))
    this.itemobj.focus();
              return false;
    return true;
    function ValidationSet(inputitem)
    this.vSet=new Array();
         this.add= add_validationdesc;
         this.validate= vset_validate;
         this.itemobj = inputitem;
    function add_validationdesc(desc,error)
    this.vSet[this.vSet.length]=
         new ValidationDesc(this.itemobj,desc,error);
    function vset_validate()
    for(var itr=0;itr<this.vSet.length;itr++)
         if(!this.vSet[itr].validate())
              return false;
         return true;
    function validateEmailv2(email)
    // a very simple email validation checking.
    // you can add more complex email checking if it helps
    if(email.length <= 0)
         return true;
    var splitted = email.match("^(.+)@(.+)$");
    if(splitted == null) return false;
    if(splitted[1] != null )
    var regexp_user=/^\"?[\w-_\.]*\"?$/;
    if(splitted[1].match(regexp_user) == null) return false;
    if(splitted[2] != null)
    var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;
    if(splitted[2].match(regexp_domain) == null)
         var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;
         if(splitted[2].match(regexp_ip) == null) return false;
    }// if
    return true;
    return false;
    function V2validateData(strValidateStr,objValue,strError)
    var epos = strValidateStr.search("=");
    var command = "";
    var cmdvalue = "";
    if(epos >= 0)
    command = strValidateStr.substring(0,epos);
    cmdvalue = strValidateStr.substr(epos+1);
    else
    command = strValidateStr;
    switch(command)
    case "req":
    case "required":
    if(eval(objValue.value.length) == 0)
    if(!strError || strError.length ==0)
    strError = objValue.name + " : Required Field";
    }//if
    alert(strError);
    return false;
    }//if
    break;
    }//case required
    case "maxlength":
    case "maxlen":
    if(eval(objValue.value.length) > eval(cmdvalue))
    if(!strError || strError.length ==0)
    strError = objValue.name + " : "+cmdvalue+" characters maximum ";
    }//if
    alert(strError + "\n[Current length = " + objValue.value.length + " ]");
    return false;
    }//if
    break;
    }//case maxlen
    case "minlength":
    case "minlen":
    if(eval(objValue.value.length) < eval(cmdvalue))
    if(!strError || strError.length ==0)
    strError = objValue.name + " : " + cmdvalue + " characters minimum ";
    }//if
    alert(strError + "\n[Current length = " + objValue.value.length + " ]");
    return false;
    }//if
    break;
    }//case minlen
    case "alnum":
    case "alphanumeric":
    var charpos = objValue.value.search("[^A-Za-z0-9]");
    if(objValue.value.length > 0 && charpos >= 0)
    if(!strError || strError.length ==0)
    strError = objValue.name+": Only alpha-numeric characters allowed ";
    }//if
    alert(strError + "\n [Error character position " + eval(charpos+1)+"]");
    return false;
    }//if
    break;
    }//case alphanumeric
    case "num":
    case "numeric":
    var charpos = objValue.value.search("[^0-9]");
    if(objValue.value.length > 0 && charpos >= 0)
    if(!strError || strError.length ==0)
    strError = objValue.name+": Only digits allowed ";
    }//if
    alert(strError + "\n [Error character position " + eval(charpos+1)+"]");
    return false;
    }//if
    break;
    }//numeric
    case "alphabetic":
    case "alpha":
    var charpos = objValue.value.search("[^A-Za-z]");
    if(objValue.value.length > 0 && charpos >= 0)
    if(!strError || strError.length ==0)
    strError = objValue.name+": Only alphabetic characters allowed ";
    }//if
    alert(strError + "\n [Error character position " + eval(charpos+1)+"]");
    return false;
    }//if
    break;
    }//alpha
              case "alnumhyphen":
    var charpos = objValue.value.search("[^A-Za-z0-9\-_]");
    if(objValue.value.length > 0 && charpos >= 0)
    if(!strError || strError.length ==0)
    strError = objValue.name+": characters allowed are A-Z,a-z,0-9,- and _";
    }//if
    alert(strError + "\n [Error character position " + eval(charpos+1)+"]");
    return false;
    }//if                
                   break;
    case "email":
    if(!validateEmailv2(objValue.value))
    if(!strError || strError.length ==0)
    strError = objValue.name+": Enter a valid Email address ";
    }//if
    alert(strError);
    return false;
    }//if
    break;
    }//case email
    case "lt":
    case "lessthan":
    if(isNaN(objValue.value))
    alert(objValue.name+": Should be a number ");
    return false;
    }//if
    if(eval(objValue.value) >= eval(cmdvalue))
    if(!strError || strError.length ==0)
    strError = objValue.name + " : value should be less than "+ cmdvalue;
    }//if
    alert(strError);
    return false;
    }//if
    break;
    }//case lessthan
    case "gt":
    case "greaterthan":
    if(isNaN(objValue.value))
    alert(objValue.name+": Should be a number ");
    return false;
    }//if
    if(eval(objValue.value) <= eval(cmdvalue))
    if(!strError || strError.length ==0)
    strError = objValue.name + " : value should be greater than "+ cmdvalue;
    }//if
    alert(strError);
    return false;
    }//if
    break;
    }//case greaterthan
    case "regexp":
                   if(objValue.value.length > 0)
         if(!objValue.value.match(cmdvalue))
         if(!strError || strError.length ==0)
         strError = objValue.name+": Invalid characters found ";
         }//if
         alert(strError);
         return false;
         }//if
    break;
    }//case regexp
    case "dontselect":
    if(objValue.selectedIndex == null)
    alert("BUG: dontselect command for non-select Item");
    return false;
    if(objValue.selectedIndex == eval(cmdvalue))
    if(!strError || strError.length ==0)
    strError = objValue.name+": Please Select one option ";
    }//if
    alert(strError);
    return false;
    break;
    }//case dontselect
    }//switch
    return true;
         Copyright 2003 JavaScript-coder.com. All rights reserved.
    example.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Example for Validator</title>
    <script language="JavaScript" src="gen_validatorv2.js" type="text/javascript"></script>
    </head>
    <body>
    <form action="" name="myform" >
    <table cellspacing="2" cellpadding="2" border="0">
    <tr>
    <td align="right">First Name</td>
    <td><input type="text" name="FirstName"></td>
    </tr>
    <tr>
    <td align="right">Last Name</td>
    <td><input type="text" name="LastName"></td>
    </tr>
    <tr>
    <td align="right">EMail</td>
    <td><input type="text" name="Email"></td>
    </tr>
    <tr>
    <td align="right">Phone</td>
    <td><input type="text" name="Phone"></td>
    </tr>
    <tr>
    <td align="right">Address</td>
    <td><textarea cols="20" rows="5" name="Address"></textarea></td>
    </tr>
    <tr>
    <td align="right">Country</td>
    <td>
         <SELECT name="Country">
              <option value="" selected>[choose yours]
              <option value="008">Albania
              <option value="012">Algeria
              <option value="016">American Samoa
              <option value="020">Andorra
              <option value="024">Angola
              <option value="660">Anguilla
              <option value="010">Antarctica
              <option value="028">Antigua And Barbuda
              <option value="032">Argentina
              <option value="051">Armenia
              <option value="533">Aruba     
         </SELECT>
         </td>
    </tr>
    <tr>
    <td align="right"></td>
    <td><input type="submit" value="Submit"></td>
    </tr>
    </table>
    </form>
    <script language="JavaScript" type="text/javascript">
    //You should create the validator only after the definition of the HTML form
    var frmvalidator = new Validator("myform");
    frmvalidator.addValidation("FirstName","req","Please enter your First Name");
    frmvalidator.addValidation("FirstName","maxlen=20",
         "Max length for FirstName is 20");
    frmvalidator.addValidation("FirstName","alpha");
    frmvalidator.addValidation("LastName","req");
    frmvalidator.addValidation("LastName","maxlen=20");
    frmvalidator.addValidation("Email","maxlen=50");
    frmvalidator.addValidation("Email","req");
    frmvalidator.addValidation("Email","email");
    frmvalidator.addValidation("Phone","maxlen=50");
    frmvalidator.addValidation("Phone","numeric");
    frmvalidator.addValidation("Address","maxlen=50");
    frmvalidator.addValidation("Country","dontselect=0");
    </script>
    </body>
    </html>
    documentation.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
         <title>JavaScript Form Validator Documentation</title>
    <Style>
    BODY, P,TD{ font-family: Arial,Verdana,Helvetica, sans-serif; font-size: 10pt }
    H1{ font-family: Arial,Verdana,Helvetica, sans-serif; font-size: 18pt; color : #000066}
    H3{ font-family: Arial,Verdana,Helvetica, sans-serif; font-size: 12pt; color : #000066 }
    A{font-family: Arial,Verdana,Helvetica, sans-serif;}
    B {     font-family : Arial, Helvetica, sans-serif;     font-size : 12px;     font-weight : bold;}
    CODE {font-family : Courier,monospace;font-size: 10pt;color : #800000;}
    CODE.htm {font-family : "Courier New", Courier, monospace;     font-size : x-small;     color : #000080;}
    </Style>
    </head>
    <body>
    <center>
    <table cellspacing="2" cellpadding="2" border="0" width="600">
    <tr><td>
         <h1>JavaScript Form Validations Made Easy!</h1>
         <h3>Documentation for JavaScript Form Validator</h3>
         <HR size=1>
         <P>
         The Form validation script is distributed free from JavaScript-Coder.com<br>
         You can use the script in your web pages for free.
         </P>
         <P>
         You may please add a link to JavaScript-Coder.com,
         making it easy for others to find this script.<br>
         Checkout the <A href="http://www.javascript-coder.com/links/how-to-link.php
         target="_blank">Give a Link & Get a Link!</A> page.
         </P>
         <P>
         <B>JavaScript Coder</B><br>
         It precisely codes what you imagine!<br>
         Grab your copy here: http://www.javascript-coder.com
         </P>
         <HR size=1>
         <P>
         Using client side JavaScript is an efficient way to validate the user input
         in web applications. When there are many fields in the form, the JavaScript
         validation becomes too complex.
         </P>
         <P>
    The JavaScript class presented here makes the form validations many times easier.
         </P>
         <P>
         The idea is to create a set of "validation descriptors" associated with each element
         in a form. The "validation descriptor" is nothing but a string specifying the type of
         validation to be performed.
         </P>
         <P>
         Each field in the form can have 0, 1, or more validations. For example, the input should
         not be empty, should be less than 25 chars, should be alpha-numeric, etc
         </P>
         You can associate a set of validation descriptors for each input field in the form.
         <a name="3"></a>
         <h3>Using The Script</h3>
         1.Include gen_validatorv2.js in your html file just before closing the HEAD tag<br><br>
         <CODE>
         <script language="JavaScript" src="gen_validatorv2.js" type="text/javascript"></script><BR>
         </head><BR>
         </CODE><br>
         2. Just after defining your form,
         Create a form validator object passing the name of the form<br><br>
         <CODE class='htm'>
          <FORM name='myform' action=""><BR>
          <!----Your input fields go here --><BR>
          </FORM><BR>
         </CODE><CODE>
          <SCRIPT language="JavaScript"><BR>
          var frmvalidator  = new Validator("myform");<BR>
         </CODE>
         <br>
         <br>
         3. Now add the validations required<br><br>
         <CODE>
              frmvalidator.addValidation("FirstName","alpha");
         </CODE><br><br>
         the first argument is the name of the field and the second argument is the
         validation descriptor, which specifies the type of validation to be performed.<br>
         You can add any number of validations.The list of validation descriptors are provided
         at the end of the documentation.<br>
         The optional third argument is the error string to be displayed if the validation
         fails.<br>
         <br>
         <CODE>
              frmvalidator.addValidation("FirstName","alpha");<br>
              frmvalidator.addValidation("FirstName","req","Please enter your First Name");<br>
              frmvalidator.addValidation("FirstName","maxlen=20",<br>
                   "Max length for FirstName is 20");          <br>
         </CODE>     <br>
         <br>
         4. Similarly, add validations for the fields where validation is required.<br>
         That's it! You are ready to go.
         <A name="3"></A>
         <h3>Example</h3>
         The example below will make the idea clearer<br>
         <CODE class="htm">
                   <form action="" name="myform" ><BR>
                   <table cellspacing="2" cellpadding="2" border="0"><BR>
                   <tr><BR>
                     <td align="right">First Name</td><BR>
                     <td><input type="text" name="FirstName"></td><BR>
                   </tr><BR>
                   <tr><BR>
                     <td align="right">Last Name</td><BR>
                     <td><input type="text" name="LastName"></td><BR>
                   </tr><BR>
                   <tr><BR>
                     <td align="right">EMail</td><BR>
                     <td><input type="text" name="Email"></td><BR>
                   </tr><BR>
                   <tr><BR>
                     <td align="right">Phone</td><BR>
                     <td><input type="text" name="Phone"></td><BR>
                   </tr><BR>
                   <tr><BR>
                     <td align="right">Address</td><BR>
                     <td><textarea cols="20" rows="5" name="Address"></textarea></td><BR>
                   </tr><BR>
                   <tr><BR>
                     <td align="right">Country</td><BR>
                     <td><BR>
                          <SELECT name="Country"><BR>
                             <option value="" selected>[choose yours]<BR>
                             <option value="008">Albania<BR>
                             <option value="012">Algeria<BR>
                             <option value="016">American Samoa<BR>
                             <option value="020">Andorra<BR>
                             <option value="024">Angola<BR>
                             <option value="660">Anguilla<BR>
                             <option value="010">Antarctica<BR>
                             <option value="028">Antigua And Barbuda<BR>
                             <option value="032">Argentina<BR>
                             <option value="051">Armenia<BR>
                             <option value="533">Aruba     <BR>
                         </SELECT><BR>
                        </td><BR>
                   </tr><BR>
                   <tr><BR>
                     <td align="right"></td><BR>
                     <td><input type="submit" value="Submit"></td><BR>
                   </tr><BR>
                   </table><BR>
                   </form><BR>
                   </CODE><CODE>
                   <script language="JavaScript" type="text/javascript"><BR>
                    var frmvalidator = new Validator("myform");<BR>
                    frmvalidator.addValidation("FirstName","req","Please enter your First Name");<BR>
                    frmvalidator.addValidation("FirstName","maxlen=20",<BR>
                        "Max length for FirstName is 20");<BR>
                    frmvalidator.addValidation("FirstName","alpha");<BR>
                    <BR>
                    frmvalidator.addValidation("LastName","req");<BR>
                    frmvalidator.addValidation("LastName","maxlen=20");<BR>
                    <BR>
                    frmvalidator.addValidation("Email","maxlen=50");<BR>
                    frmvalidator.addValidation("Email","req");<BR>
                    frmvalidator.addValidation("Email","email");<BR>
                    <BR>
                    frmvalidator.addValidation("Phone","maxlen=50");<BR>
                    frmvalidator.addValidation("Phone","numeric");<BR>
                    <BR>
                    frmvalidator.addValidation("Address","maxlen=50");<BR>
                    frmvalidator.addValidation("Country","dontselect=0");<BR>
                   </script><BR>     
         </CODE>
         <A name="4"></A>
         <h3>Some Additional Notes</h3>
         <LI type="disc">The form validators should be created only after defining the HTML form
         (only after the </form> tag. )<br>
         <LI type="disc">Your form should have a distinguished name.
         If there are more than one form
         in the same page, you can add validators for each of them. The names of the
         forms and the validators should not clash.
         <LI type="disc">You can't use the javascript onsubmit event of the form if it you are
         using this validator script. It is because the validator script automatically overrides the
         onsubmit event. If you want to add a custom validation, see the section below
         </LI>
         <A name="5"></A>
         <h3>Adding Custom Validation</h3>
         If you want to add a custom validation, which is not provided by the validation descriptors,
         you can do so. Here are the steps:
         <LI type="disc">Create a javascript function which returns true or false depending on the validation.<br>
         <CODE>
              function DoCustomValidation()<BR>
              {<BR>
                var frm = document.forms["myform"];<BR>
                if(frm.pwd1.value != frm.pwd2.value)<BR>
                {<BR>
                  alert('The Password and verified password does not match!');<BR>
                  return false;<BR>
                }<BR>
                else<BR>
                {<BR>
                  return true;<BR>
                }<BR>
              }<BR>
         </CODE><br>
         <LI type="disc">Associate the validation function with the validator object.<br>
         <CODE>
         frmvalidator.setAddnlValidationFunction("DoCustomValidation");
         </CODE><br>
         </LI>
         <P>
         The custom validation function will be called automatically after other validations.
         </P>
         <P>
         If you want to do more than one custom validations, you can do all those
         validations in the same function.
         </P>
         <CODE>
              function DoCustomValidation()<BR>
              {<BR>
                var frm = document.forms["myform"];<BR>
                if(false == DoMyValidationOne())<BR>
                {<BR>
                  alert('Validation One Failed!');<BR>
                  return false;<BR>
                }<BR>
                else<BR>
                if(false == DoMyValidationTwo())<BR>
                {<BR>
                  alert('Validation Two Failed!');<BR>
                  return false;<BR>
                }<BR>
                else<BR>
                {<BR>
                  return true;<BR>
                }<BR>
              }<BR>
         </CODE><br>
         where DoMyValidationOne() and DoMyValidationTwo() are custom functions for
         validation.
         <A name="6"></A>
         <h3>Clear All Validations</h3>
         In some dynamically programmed pages, it may be required to change the validations in the
         form at run time. For such cases, a function is included which clears all validations in the
         validator object.<br><br>
         <CODE>
         frmvalidator.clearAllValidations();
         </CODE><br>
         <br>
         this function call clears all validations you set.<br>
         You will not need this method in most cases.
         <a name="7"></a>
         <h3>Table of Validation Descriptors</h3>     
    <table cellspacing="2" cellpadding="2" border="1" width="520px">
    <tr>
    <td><FONT face=Arial size=2>
         required<BR>
         req </FONT>
         </td>
    <td><FONT face=Arial size=2>The field should not be
    empty </FONT>
         </td>
    </tr>
    <tr>
    <td><FONT face=Arial size=2>
         maxlen=???<BR>
         maxlength=???
         </td>
    <td><FONT face=Arial size=2>checks the length entered data to the maximum. For
    example, if the maximum size permitted is 25, give the validation descriptor as "maxlen=25"
         </td>
    </tr>
    <tr>
    <td><FONT face=Arial size=2>
         minlen=???<BR>
         minlength=???
         </td>
    <td><FONT face=Arial size=2>checks the length of the entered string to the
    required minimum. example "minlen=5"
         </td>
    </tr>
    <tr>
    <td><FONT face=Arial size=2>
         alphanumeric /<BR>
         alnum </FONT>
         </td>
    <td><FONT face=Arial size=2>Check the data if it
    contains any other characters other than alphabetic or numeric characters
    </FONT>
         </td>
    </tr>     
    <tr>
    <td><FONT face=Arial size=2>num <BR>
         numeric </FONT>
         </td>
    <td><FONT face=Arial size=2>Check numeric data
    </FONT>
         </td>
    </tr>
    <tr>
    <td><FONT face=Arial size=2>alpha <BR>
         alphabetic </FONT>
         </td>
    <td><FONT face=Arial size=2>Check alphabetic data.
    </FONT>
         </td>
    </tr>     
    <tr>
    <td><FONT face=Arial size=2>email </FONT>
         </td>
    <td><FONT face=Arial size=2>The field is an email
    field and verify the validity of the data. </FONT>
         </td>
    </tr>
    <tr>
    <td><FONT face=Arial size=2>lt=???<BR>
         lessthan=???
         </td>
    <td><FONT face=Arial size=2>
         Verify the data to be less than the value passed.
         Valid only for numeric fields. <BR>
         example: if the
    value should be less than 1000 give validation description as "lt=1000"
         </td>
    </tr>
    <tr>
    <td><FONT face=Arial size=2>gt=???<BR>
         greaterthan=???     </td>
    <td><FONT face=Arial size=2>
         Verify the data to be greater than the value passed.
         Valid only for numeric fields. <BR>
         example: if the
    value should be greater than 10 give validation description as "gt=10"
         </td>
    </tr>
    <tr>
    <td><FONT face=Arial size=2>regexp=??? </FONT>
         </td>
    <td><FONT face=Arial size=2>
         Check with a regular expression the value should match the regular expression.<BR>
         example: "regexp=^[A-Za-z]{1,20}$" allow up to 20 alphabetic
         characters.
         </td>
    </tr>
    <tr>
    <td><FONT face=Arial size=2>dontselect=?? </FONT>
         </td>
    <td><FONT face=Arial size=2>This
    validation descriptor is valid only for select input items (lists)
    Normally, the select list boxes will have one item saying 'Select One' or
    some thing like that. The user should select an option other than this
    option. If the index of this option is 0, the validation description
    should be "dontselect=0"
         </td>
    </tr>
    </table>
         <P>
              <table cellspacing="2" cellpadding="2" border="1" width="520">
              <tr>
              <td>
                   <B>NOTE:</B><br>
                   The HTML Form Wizard included in JavaScript Coder contains still more
                   number of validations
                   (comparison validations, check box & radio button validations and more)<br>
                   Using the wizard, you can add validations to your forms
                   without writing a single line of code! <br>
                   JavaScript Coder takes care of
                   generating the code and inserting the code in to the HTML file.<br>
                   <A href="http://www.javascript-coder.com/index.phtml
                   target="_blank">Read more about JavaScript Coder</A>
                   </td>
              </tr>
              </table>
         </P>
         <A name="8"></A>
         <h3>Example Page</h3>     
         See the <a href="example.html target="_blank"
         >JavaScript form validation example here</a>
    </td>
    </tr>
    <tr><td align="center">
         <HR><br>
         Copyright &copy; 2003 JavaScript-Coder.com. All rights reserved.
    </td></tr>
    </table>     
    </center>
    </body>
    </html>

    The code is not working because you made a mistake somewhere, duh! So figure out what (hint: firefox javascript console, it's your friend) and fix it!
    And next time when you post code: use the [ code ]  tags to pretty format your code, as it is now it's unreadable.
    http://forum.java.sun.com/help.jspa?sec=formatting

  • Urgent: SAX parser bean is not working in JSP page

    Hi All,
    I have created a bean "ReadAtts" and included into a jsp file using
    "useBean", It is not working. I tried all possibilities. But Failed Plz Help me.
    Below are the details:
    Java Bean: ReadAtts.java
    package sax;
    import java.io.*;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import java.util.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.DefaultHandler;
    import javax.xml.parsers.ParserConfigurationException;
    public class ReadAtts extends DefaultHandler implements java.io.Serializable
         private Vector attNames = new Vector(); //Stores all the att names from the XML
         private Vector attValues = new Vector();
         private Vector att = new Vector();
         private Locator locator;
         private static String start="",end="",QueryString="",QString1="",QString2="";
    private static boolean start_collecting=false;
         public ReadAtts()
         public Vector parse(String filename,String xpath) throws Exception
    QueryString=xpath;
         StringTokenizer QueryString_ST = new StringTokenizer(QueryString,"/");
         int stLen = QueryString_ST.countTokens();
         while(QueryString_ST.hasMoreTokens())
              if((QueryString_ST.countTokens())>1)
              QString1 = QueryString_ST.nextToken();
    else if((QueryString_ST.countTokens())>0)
                   QString2 = QueryString_ST.nextToken();
         SAXParserFactory spf =
    SAXParserFactory.newInstance();
    spf.setValidating(false);
    SAXParser saxParser = spf.newSAXParser();
    // create an XML reader
    XMLReader reader = saxParser.getXMLReader();
    FileReader file = new FileReader(filename);
    // set handler
    reader.setContentHandler(this);
    // call parse on an input source
    reader.parse(new InputSource(file));
         att.add("This is now added");
         //return attNames;
    return att;
    public void setDocumentLocator(Locator locator)
    this.locator = locator;
    public void startDocument() {   }
    public void endDocument() {  }
    public void startPrefixMapping(String prefix, String uri) { }
    public void endPrefixMapping(String prefix) {  }
    /** The opening tag of an element. */
    public void startElement(String namespaceURI, String localName,String qName, Attributes atts)
    start=localName;
    if(start.equals(QString2))
    start_collecting=true; //start collecting nodes
    if(start_collecting)
    if((atts.getLength())>0)
    for(int i=0;i<=(atts.getLength()-1);i++)
    attNames.add((String)atts.getLocalName(i));
    attValues.add((String)atts.getValue(i));
    /** The closing tag of an element. */
    public void endElement(String namespaceURI, String localName, String qName)
    end = localName;
    if(end.equals(QString2))
         start_collecting=false; //stop colelcting nodes
    /** Character data. */
    public void characters(char[] ch, int start, int length) { }
    /** Ignorable whitespace character data. */
    public void ignorableWhitespace(char[] ch, int start, int length){ }
    /** Processing Instruction */
    public void processingInstruction(String target, String data) { }
    /** A skipped entity. */
    public void skippedEntity(String name) { }
    public static void main(String[] args)
    String fname=args[0];
    String Xpath=args[1];
    System.out.println("\n from main() "+(new ReadAtts().parse(fname,Xpath)));
    //System.out.println("\n from main() "+new ReadAtts().attNames());
    //System.out.println("\n from main() "+new ReadAtts().attValues());
    JSP File:
    <%@ page import="sax.*,java.io.*,java.util.*,java.lang.*,java.text.*;" %>
    <jsp:useBean id="p" class="sax.ReadAtts"/>
    Data after Parsing is.....
    <%=p.parse"E:/Log.xml","/acq/service/metrics/system/stackUsage")%>
    Expected Output:
    The jsp file should print all the vector objects from the "ReadAtts" bean
    Actual Output:
    Data after Parsing.......[]
    Thanks for your time.....
    Newton
    Bangalore. INDIA

    the problem is not because of java code insdie jsp page
    I have removed all things but the form and it is still not working
    here is the modified code:
    <!-- add news-->
    <%
    if(request.getParameter("addBTN") != null){
            out.print("addBTN");
    %>
    <!-- end of add news-->
    <form action="" method="post" enctype="multipart/form-data" name="upform" >
      <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1">
        <tr>
          <td colspan="2" align="right" bgcolor="#EAEAEA" class="borderdTable"><p>'6'A) .(1 ,/J/</p></td>
        </tr>
        <tr>
          <td width="87%" align="right"><label>
            <input name="title" type="text" class="rightText" id="title">
          </label></td>
          <td width="13%" align="right">9FH'F 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><textarea name="elm1" cols="50" rows="10" id="elm1" style="direction:rtl" >
              </textarea></td>
          <td align="right">*A'5JD 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input type="file" name="filename" id="filename">
          </label></td>
          <td align="right">5H1)</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input name="addBTN" type="submit" class="btn" id="addBTN" value="  '6'A) .(1 ">
          </label></td>
          <td align="right"> </td>
        </tr>
      </table>
    </form>
    <!-- TinyMCE -->
    <script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
    <script type="text/javascript">
            tinyMCE.init({
                    mode : "textareas",
                    theme : "simple",
                    directionality : "rtl"
    </script>
    <!--end of TinyMCE -->

  • WordWrsp not Working in JDK1.5?

    Hello All
    I am using JDK 1.5_03
    I have a editor kind of stuff for which I have used
    setLineWrap(true);for
    JTextAreaHowever this is not working. This is working in 1.4.2_X versions. Has any one encountered this problem?

    Using JDK1.5.0_04 on Fedora core 3 this wraps OK! Check it out on you configuration.
    import java.awt.*;
    import javax.swing.*;
    public class Fred4 extends JFrame
        public Fred4()
            super("ZZZZZZZZZZZZZZZZ");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JTextArea textArea = new JTextArea();
            textArea.setPreferredSize(new Dimension(100, 100));
            textArea.setLineWrap(true);
            getContentPane().add(textArea);
            textArea.setText("Some very very long long text text to see if it wraps");
            pack();
        public static void main(String a[])
            new Fred4().setVisible(true);
    }

  • Writing to file not working, might be 1.4 problem

    Hi:
    I am trying to writing the content of a JTextArea onto a file. The content is pretty big, has newlines. I have been struggling with this in 1.4 and it just doesn't write to the file I specified. In 1.3, it works great. Here is the rough code:
    public void loadDisplayFrame()
         JMenuItem save = new JMenuItem("Save");
         //Save Action Listener
         save.addActionListener(new ActionListener()
            public void actionPerformed(ActionEvent ae)
               String filePath;
               //Save the  gsgl sample file
               if(filePath!=null && filePath.length()>0)
                  try
                  int state = saveChooser.showSaveDialog(null);
                  File f;
                  f = saveChooser.getSelectedFile();
                  if(f!=null && state==JFileChooser.APPROVE_OPTION)
                        savedName = f.getPath();
                        if(!savedName.endsWith(".gsgl"))
                           JOptionPane.showMessageDialog(null, "Invalid file name", "error", JOptionPane.ERROR_MESSAGE);
                        }else
                           processSaving();
                        }catch(Exception e)
                            e.printStackTrace();
                    }else
                        JOptionPane.showMessageDialog(null, "Please load a file first", "error",
                            JOptionPane.ERROR_MESSAGE);
              myMenu.add(save);
              JMenuBar displayMenu = new JMenuBar();
              displayMenu.add(myMenu);
      public void processSaving()
             try
                 System.out.println("Saved Name is " + savedName);
               PrintWriter out
               = new PrintWriter(new BufferedWriter(new FileWriter(savedName)));
               //name of TextArea is <display>
               String saveCode = display.getText();
              System.out.println(saveCode);                 
                 out.print(saveCode);
              out.close();
            }catch(Exception e)
              System.out.println("Exception in writing" + e.toString());
         Anyone knows what is going on? I am hoping to use 1.4 for my project. But this thing is not working. Any way around it? Thanx

    Try putting in this line before your close:
    out.flush();
    PrintWriter buffers the data and won't send it until you exit or enough data gets into the buffer to cause a flush. I assume that you are getting a zero byte file. You can also construct a PrintWriter with a boolean to indicate if it should auto flush the buffer.
    Hope that it helps.
    Paul

  • HTML multipart form is not working in jsp page

    Hi
    i have jsp page, has a HTML from with file upload field , when i click the send button , nothing happened as if the button did not submit the form. ie the message at line 12 is not printed out.
    can any one help please.
    <%@ page errorPage="..\error\error.jsp" %>
    <%@ page pageEncoding="windows-1256" %>
    <%@ page language="java" import="javazoom.upload.*,java.util.*,java.sql.ResultSet" %>
    <jsp:useBean id="upBean" scope="page" class="javazoom.upload.UploadBean" >
      <jsp:setProperty name="upBean" property="folderstore" value="<%=request.getRealPath("thuraya//uploads")%>"  />
    </jsp:useBean>
    <jsp:useBean id="dbc" class="mypackage.DBConnection" scope="session" />
    <!-- add news-->
    <%
    if(request.getParameter("addBTN") != null){
            out.println("addbtn");
            //do upload file + insert in database
             if (MultipartFormDataRequest.isMultipartFormData(request))
             // Uses MultipartFormDataRequest to parse the HTTP request.
             MultipartFormDataRequest mrequest = new MultipartFormDataRequest(request);
             String todo = null;
             if (mrequest != null) todo = mrequest.getParameter("todo");
                 if ( (todo != null) && (todo.equalsIgnoreCase("upload")) )
                    Hashtable files = mrequest.getFiles();
                    if ( (files != null) && (!files.isEmpty()) )
                        UploadFile file = (UploadFile) files.get("filename");
                        if (file != null)
                                            out.println("<li>Form field : uploadfile"+"<BR> Uploaded file : "+file.getFileName()+" ("+file.getFileSize()+" bytes)"+"<BR> Content Type : "+file.getContentType());
                                            String fileName=file.getFileName();
                                            String ran=System.currentTimeMillis()+"";
                                            String ext=fileName.substring(   ( fileName.length()-4),fileName.length() );
                                            file.setFileName(ran+ext);
                        // Uses the bean now to store specified by jsp:setProperty at the top.
                        upBean.store(mrequest, "filename");
                                            String title=request.getParameter("title");
                                            String content=request.getParameter("elm1");
                                            int x=dbc.addNews(title,content,file.getFileName(),2,1);
                                            if(x==1)
                                                     out.print("New Vedio has been addedd Successfully");
                                                      response.setHeader("Refresh","1;URL=uploadVedio.jsp");
                                                     else{
                                                      out.print("An Error Occured while adding new Vedio");
                                                      response.setHeader("Refresh","1;URL=uploadVedio.jsp");
                    else
                      out.println("<li>No uploaded files");
             else out.println("<BR> todo="+todo);
    %>
    <!-- end of add news-->
    <form action="" method="post" enctype="multipart/form-data" name="upform" >
      <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1">
        <tr>
          <td colspan="2" align="right" bgcolor="#EAEAEA" class="borderdTable"><p>'6'A) .(1 ,/J/</p></td>
        </tr>
        <tr>
          <td width="87%" align="right"><label>
            <input name="title" type="text" class="rightText" id="title">
          </label></td>
          <td width="13%" align="right">9FH'F 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><textarea name="elm1" cols="50" rows="10" id="elm1" style="direction:rtl" >
              </textarea></td>
          <td align="right">*A'5JD 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input type="file" name="filename" id="filename">
          </label></td>
          <td align="right">5H1)</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input onClick="submit()" name="addBTN" type="button" class="btn" id="addBTN" value="  '6'A) .(1 ">
          </label></td>
          <td align="right"> </td>
        </tr>
      </table>
    </form>
    <!-- TinyMCE -->
    <script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
    <script type="text/javascript">
            tinyMCE.init({
                    mode : "textareas",
                    theme : "simple",
                    directionality : "rtl"
    </script>
    <!--end of TinyMCE -->

    the problem is not because of java code insdie jsp page
    I have removed all things but the form and it is still not working
    here is the modified code:
    <!-- add news-->
    <%
    if(request.getParameter("addBTN") != null){
            out.print("addBTN");
    %>
    <!-- end of add news-->
    <form action="" method="post" enctype="multipart/form-data" name="upform" >
      <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1">
        <tr>
          <td colspan="2" align="right" bgcolor="#EAEAEA" class="borderdTable"><p>'6'A) .(1 ,/J/</p></td>
        </tr>
        <tr>
          <td width="87%" align="right"><label>
            <input name="title" type="text" class="rightText" id="title">
          </label></td>
          <td width="13%" align="right">9FH'F 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><textarea name="elm1" cols="50" rows="10" id="elm1" style="direction:rtl" >
              </textarea></td>
          <td align="right">*A'5JD 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input type="file" name="filename" id="filename">
          </label></td>
          <td align="right">5H1)</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input name="addBTN" type="submit" class="btn" id="addBTN" value="  '6'A) .(1 ">
          </label></td>
          <td align="right"> </td>
        </tr>
      </table>
    </form>
    <!-- TinyMCE -->
    <script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
    <script type="text/javascript">
            tinyMCE.init({
                    mode : "textareas",
                    theme : "simple",
                    directionality : "rtl"
    </script>
    <!--end of TinyMCE -->

  • Access to Outlook Anywhere does not work

    Good evening,
    I recently installed an Exchange Server 2013 CAS / MB.
    Until now, the server presented a few errors (mainly in the
    event log) that does not seem to significantly influence functionality.
    This week I published the server on the Internet and verified various malfunctions
    related to the access from outside.
    In particular from outside:
    1 - OWA does not work with Windows integrated authentication, it works with the Forms based authentication;
    2 - Outlook Anywhere does not work from internet.
    I've done a lot of research and testing without success.
    With regard to the first issue (which is not a priority but can relate to second one)
    add that in Firefox I get a first authentication request. If
    I enter credentials it ask again for identical authentication (repeatly), if I cancel it shows a second one that instead allows me access (are slightly different).
    I assume that the first is the integrated Windows application and the second is basic authentication.
    Internet Explorer shows me only the first authentication request and if I cancel shows blank page.
    The problem is
    priority 2:
    Outlook connects without problems on LAN network, the Internet
    seems to download the correct information
    (autodiscover), but then does not connect
    to the server (connection to Microsoft Exchange is unavailable).
    If you manually edit the settings,
    auto-configuration server returns as
    a [email protected]. If I change
    manually the server (and proxy settings
    http), the result does not change.
    - Setting information -
    The server is installed
    in the LAN network and is exposed on the Internet through
    a firewall (Pat on port 443, et al. not 80)
    on a public address.
    The public and private DNS have been configured with a
    host record (A) and two
    CNAME (webmail and autodiscover).
    The internal Outlook clients connect
    with autodiscover and HTTPS /
    NTLM / SSL (Outlook connectivity
    status).
    IMAP, SMTP, POP, ActiveSync function.
    Exchange remote connectivity analizer retrieves Autodiscover information but doesn't pass test for RPC/HTTP access (it discard accesson
    port 443 and try port 80, SPF isn't configured).
    The navigation to the url
    https://proxyexternalURL/rpc/rpcproxy.dll  has the same behaviour like problem 1.
    Test-OutlookConnectivity returns unmanaged error ('WARNING: An unexpected error has occurred and a Watson dump is being generated: Failed to find the probe result for invoke now request id -- and probe workdefinition id --').
    Errors in eventviewer: 5011 - WAS (one time), 139 - MSExchange OWA (some not ripetitive), 3028 - MSExchangeApplicationLogic (every 6 hours), 106 - MSExchange common (many during working hour), 65535 - application (some at nighttime 00.00 - 03.00 a.m.), 1006
    - MSExchangeDiagnostic (every 30 min), 6002 - MSExchange Mid-Tier Storage (about every 5 minutes), 5 - MSExcahnge Workload Management (one time).
    Ask for further information.
    - Cmdlet and Autodiscover output -
    Get-OutlookAnywhere | fl name,*auth*,*ssl*,*host*
    Name                               : Rpc (Default Web site)
    ExternalClientAuthenticationMethod : Basic
    InternalClientAuthenticationMethod : Ntlm
    IISAuthenticationMethods           : {Basic, Ntlm, Negotiate}
    SSLOffloading                      : True
    ExternalClientsRequireSsl          : True
    InternalClientsRequireSsl          : True
    ExternalHostname                   : webmail.name_domain.test
    InternalHostname                   : webmail.name_domain.test
    Get-OutlookProvider | ft -autosize
    Name     Server CertPrincipalName                      TTL
    EXCH            msstd:webmail.name_domain.test         1  
    EXPR             msstd:webmail.name_domain.test         1  
    WEB                                              
         1  
    Get-AutodiscoverVirtualDirectory | fl name,*auth*,*url*
    Name                          : Autodiscover (Default Web site)
    InternalAuthenticationMethods : {Basic, WSSecu.testy, OAuth}
    ExternalAuthenticationMethods : {Basic, WSSecu.testy, OAuth}
    LiveIdNegotiateAuthentication : False
    WSSecu.testyAuthentication      : True
    LiveIdBasicAuthentication     : False
    BasicAuthentication           : True
    DigestAuthentication          : False
    WindowsAuthentication         : False
    OAuthAuthentication           : True
    AdfsAuthentication            : False
    InternalUrl                   :
    ExternalUrl                   :
    Get-MapiVirtualDirectory | fl name,*auth*,*url*
    Name                          : mapi (Default Web site)
    IISAuthenticationMethods      : {Basic, Ntlm, Negotiate}
    InternalAuthenticationMethods : {Basic, Ntlm, Negotiate}
    ExternalAuthenticationMethods : {Basic, Ntlm, Negotiate}
    InternalUrl                   : https://webmail.name_domain.test/mapi
    ExternalUrl                   : https://webmail.name_domain.test/mapi
    Autodiscover.xml
    <?xml version="1.0" encoding="utf-8"?>
    <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
      <Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
        <User>
          <DisplayName>user</DisplayName>
          <LegacyDN>/o=organization_name/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=e4c0c18c8f214afbb5152bb08823179d-user</LegacyDN>
          <AutoDiscoverSMTPAddress>user@name_domain.test</AutoDiscoverSMTPAddress>
          <DeploymentId>d60c71c9-3740-404c-a38c-aa24e6105432</DeploymentId>
        </User>
        <Account>
          <AccountType>email</AccountType>
          <Action>settings</Action>
          <MicrosoftOnline>False</MicrosoftOnline>
          <Protocol>
            <Type>EXCH</Type>
            <Server>72036b30-a4d4-4b42-9c39-445bd04c23a6@name_domain.test</Server>
            <ServerDN>/o=organization_name/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=72036b30-a4d4-4b42-9c39-445bd04c23a6@name_domain.test</ServerDN>
            <ServerVersion>73C082C8</ServerVersion>
            <MdbDN>/o=organization_name/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=72036b30-a4d4-4b42-9c39-445bd04c23a6@name_domain.test/cn=Microsoft Private MDB</MdbDN>
            <PublicFolderServer>webmail.name_domain.test</PublicFolderServer>
            <AD>DC2.name_domain.test</AD>
            <ASUrl>https://webmail.name_domain.test/EWS/Exchange.asmx</ASUrl>
            <EwsUrl>https://webmail.name_domain.test/EWS/Exchange.asmx</EwsUrl>
            <EmwsUrl>https://webmail.name_domain.test/EWS/Exchange.asmx</EmwsUrl>
            <EcpUrl>https://webmail.name_domain.test/ecp/</EcpUrl>
            <EcpUrl-um>?rfr=olk&amp;p=customize/voicemail.aspx&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-um>
            <EcpUrl-aggr>?rfr=olk&amp;p=personalsettings/EmailSubscriptions.slab&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-aggr>
            <EcpUrl-mt>PersonalSettings/DeliveryReport.aspx?rfr=olk&amp;exsvurl=1&amp;IsOWA=&lt;IsOWA&gt;&amp;MsgID=&lt;MsgID&gt;&amp;Mbx=&lt;Mbx&gt;&amp;realm=name_domain.test</EcpUrl-mt>
            <EcpUrl-ret>?rfr=olk&amp;p=organize/retentionpolicytags.slab&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-ret>
            <EcpUrl-sms>?rfr=olk&amp;p=sms/textmessaging.slab&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-sms>
            <EcpUrl-publish>customize/calendarpublishing.slab?rfr=olk&amp;exsvurl=1&amp;FldID=&lt;FldID&gt;&amp;realm=name_domain.test</EcpUrl-publish>
            <EcpUrl-photo>PersonalSettings/E.testAccount.aspx?rfr=olk&amp;chgPhoto=1&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-photo>
            <EcpUrl-tm>?rfr=olk&amp;ftr=TeamMailbox&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-tm>
            <EcpUrl-tmCreating>?rfr=olk&amp;ftr=TeamMailboxCreating&amp;SPUrl=&lt;SPUrl&gt;&amp;.testle=&lt;.testle&gt;&amp;SPTMAppUrl=&lt;SPTMAppUrl&gt;&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-tmCreating>
            <EcpUrl-tmE.testing>?rfr=olk&amp;ftr=TeamMailboxE.testing&amp;Id=&lt;Id&gt;&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-tmE.testing>
            <EcpUrl-extinstall>Extension/InstalledExtensions.slab?rfr=olk&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-extinstall>
            <OOFUrl>https://webmail.name_domain.test/EWS/Exchange.asmx</OOFUrl>
            <UMUrl>https://webmail.name_domain.test/EWS/UM2007Legacy.asmx</UMUrl>
            <OABUrl>https://webmail.name_domain.test/OAB/e66d9a4a-6ed2-4512-b72f-522381524dd9/</OABUrl>
            <ServerExclusiveConnect>off</ServerExclusiveConnect>
            <CertPrincipalName>msstd:webmail.name_domain.test</CertPrincipalName>
          </Protocol>
          <Protocol>
            <Type>EXPR</Type>
            <Server>webmail.name_domain.test</Server>
            <SSL>On</SSL>
            <AuthPackage>Basic</AuthPackage>
            <ASUrl>https://webmail.name_domain.test/ews/exchange.asmx</ASUrl>
            <EwsUrl>https://webmail.name_domain.test/ews/exchange.asmx</EwsUrl>
            <EmwsUrl>https://webmail.name_domain.test/ews/exchange.asmx</EmwsUrl>
            <EcpUrl>https://webmail.name_domain.test/ecp/</EcpUrl>
            <EcpUrl-um>?rfr=olk&amp;p=customize/voicemail.aspx&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-um>
            <EcpUrl-aggr>?rfr=olk&amp;p=personalsettings/EmailSubscriptions.slab&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-aggr>
            <EcpUrl-mt>PersonalSettings/DeliveryReport.aspx?rfr=olk&amp;exsvurl=1&amp;IsOWA=&lt;IsOWA&gt;&amp;MsgID=&lt;MsgID&gt;&amp;Mbx=&lt;Mbx&gt;&amp;realm=name_domain.test</EcpUrl-mt>
            <EcpUrl-ret>?rfr=olk&amp;p=organize/retentionpolicytags.slab&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-ret>
            <EcpUrl-sms>?rfr=olk&amp;p=sms/textmessaging.slab&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-sms>
            <EcpUrl-publish>customize/calendarpublishing.slab?rfr=olk&amp;exsvurl=1&amp;FldID=&lt;FldID&gt;&amp;realm=name_domain.test</EcpUrl-publish>
            <EcpUrl-photo>PersonalSettings/E.testAccount.aspx?rfr=olk&amp;chgPhoto=1&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-photo>
            <EcpUrl-tm>?rfr=olk&amp;ftr=TeamMailbox&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-tm>
            <EcpUrl-tmCreating>?rfr=olk&amp;ftr=TeamMailboxCreating&amp;SPUrl=&lt;SPUrl&gt;&amp;.testle=&lt;.testle&gt;&amp;SPTMAppUrl=&lt;SPTMAppUrl&gt;&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-tmCreating>
            <EcpUrl-tmE.testing>?rfr=olk&amp;ftr=TeamMailboxE.testing&amp;Id=&lt;Id&gt;&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-tmE.testing>
            <EcpUrl-extinstall>Extension/InstalledExtensions.slab?rfr=olk&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-extinstall>
            <OOFUrl>https://webmail.name_domain.test/ews/exchange.asmx</OOFUrl>
            <UMUrl>https://webmail.name_domain.test/ews/UM2007Legacy.asmx</UMUrl>
            <OABUrl>https://webmail.name_domain.test/OAB/e66d9a4a-6ed2-4512-b72f-522381524dd9/</OABUrl>
            <ServerExclusiveConnect>on</ServerExclusiveConnect>
            <CertPrincipalName>msstd:webmail.name_domain.test</CertPrincipalName>
            <EwsPartnerUrl>https://webmail.name_domain.test/ews/exchange.asmx</EwsPartnerUrl>
            <GroupingInformation>LAN</GroupingInformation>
          </Protocol>
          <Protocol>
            <Type>WEB</Type>
            <Internal>
              <OWAUrl AuthenticationMethod="Basic, Fba">https://webmail.name_domain.test/</OWAUrl>
              <Protocol>
                <Type>EXCH</Type>
                <ASUrl>https://webmail.name_domain.test/EWS/Exchange.asmx</ASUrl>
              </Protocol>
            </Internal>
            <External>
              <OWAUrl AuthenticationMethod="Basic">https://webmail.name_domain.test/</OWAUrl>
              <Protocol>
                <Type>EXPR</Type>
                <ASUrl>https://webmail.name_domain.test/ews/exchange.asmx</ASUrl>
              </Protocol>
            </External>
          </Protocol>
          <Protocol>
            <Type>EXHTTP</Type>
            <Server>webmail.name_domain.test</Server>
            <SSL>On</SSL>
            <AuthPackage>Ntlm</AuthPackage>
            <ASUrl>https://webmail.name_domain.test/EWS/Exchange.asmx</ASUrl>
            <EwsUrl>https://webmail.name_domain.test/EWS/Exchange.asmx</EwsUrl>
            <EmwsUrl>https://webmail.name_domain.test/EWS/Exchange.asmx</EmwsUrl>
            <EcpUrl>https://webmail.name_domain.test/ecp/</EcpUrl>
            <EcpUrl-um>?rfr=olk&amp;p=customize/voicemail.aspx&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-um>
            <EcpUrl-aggr>?rfr=olk&amp;p=personalsettings/EmailSubscriptions.slab&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-aggr>
            <EcpUrl-mt>PersonalSettings/DeliveryReport.aspx?rfr=olk&amp;exsvurl=1&amp;IsOWA=&lt;IsOWA&gt;&amp;MsgID=&lt;MsgID&gt;&amp;Mbx=&lt;Mbx&gt;&amp;realm=name_domain.test</EcpUrl-mt>
            <EcpUrl-ret>?rfr=olk&amp;p=organize/retentionpolicytags.slab&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-ret>
            <EcpUrl-sms>?rfr=olk&amp;p=sms/textmessaging.slab&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-sms>
            <EcpUrl-publish>customize/calendarpublishing.slab?rfr=olk&amp;exsvurl=1&amp;FldID=&lt;FldID&gt;&amp;realm=name_domain.test</EcpUrl-publish>
            <EcpUrl-photo>PersonalSettings/E.testAccount.aspx?rfr=olk&amp;chgPhoto=1&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-photo>
            <EcpUrl-tm>?rfr=olk&amp;ftr=TeamMailbox&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-tm>
            <EcpUrl-tmCreating>?rfr=olk&amp;ftr=TeamMailboxCreating&amp;SPUrl=&lt;SPUrl&gt;&amp;.testle=&lt;.testle&gt;&amp;SPTMAppUrl=&lt;SPTMAppUrl&gt;&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-tmCreating>
            <EcpUrl-tmE.testing>?rfr=olk&amp;ftr=TeamMailboxE.testing&amp;Id=&lt;Id&gt;&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-tmE.testing>
            <EcpUrl-extinstall>Extension/InstalledExtensions.slab?rfr=olk&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-extinstall>
            <OOFUrl>https://webmail.name_domain.test/EWS/Exchange.asmx</OOFUrl>
            <UMUrl>https://webmail.name_domain.test/EWS/UM2007Legacy.asmx</UMUrl>
            <OABUrl>https://webmail.name_domain.test/OAB/e66d9a4a-6ed2-4512-b72f-522381524dd9/</OABUrl>
            <ServerExclusiveConnect>On</ServerExclusiveConnect>
            <CertPrincipalName>msstd:webmail.name_domain.test</CertPrincipalName>
          </Protocol>
          <Protocol>
            <Type>EXHTTP</Type>
            <Server>webmail.name_domain.test</Server>
            <SSL>On</SSL>
            <AuthPackage>Basic</AuthPackage>
            <ASUrl>https://webmail.name_domain.test/ews/exchange.asmx</ASUrl>
            <EwsUrl>https://webmail.name_domain.test/ews/exchange.asmx</EwsUrl>
            <EmwsUrl>https://webmail.name_domain.test/ews/exchange.asmx</EmwsUrl>
            <EcpUrl>https://webmail.name_domain.test/ecp/</EcpUrl>
            <EcpUrl-um>?rfr=olk&amp;p=customize/voicemail.aspx&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-um>
            <EcpUrl-aggr>?rfr=olk&amp;p=personalsettings/EmailSubscriptions.slab&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-aggr>
            <EcpUrl-mt>PersonalSettings/DeliveryReport.aspx?rfr=olk&amp;exsvurl=1&amp;IsOWA=&lt;IsOWA&gt;&amp;MsgID=&lt;MsgID&gt;&amp;Mbx=&lt;Mbx&gt;&amp;realm=name_domain.test</EcpUrl-mt>
            <EcpUrl-ret>?rfr=olk&amp;p=organize/retentionpolicytags.slab&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-ret>
            <EcpUrl-sms>?rfr=olk&amp;p=sms/textmessaging.slab&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-sms>
            <EcpUrl-publish>customize/calendarpublishing.slab?rfr=olk&amp;exsvurl=1&amp;FldID=&lt;FldID&gt;&amp;realm=name_domain.test</EcpUrl-publish>
            <EcpUrl-photo>PersonalSettings/E.testAccount.aspx?rfr=olk&amp;chgPhoto=1&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-photo>
            <EcpUrl-tm>?rfr=olk&amp;ftr=TeamMailbox&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-tm>
            <EcpUrl-tmCreating>?rfr=olk&amp;ftr=TeamMailboxCreating&amp;SPUrl=&lt;SPUrl&gt;&amp;.testle=&lt;.testle&gt;&amp;SPTMAppUrl=&lt;SPTMAppUrl&gt;&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-tmCreating>
            <EcpUrl-tmE.testing>?rfr=olk&amp;ftr=TeamMailboxE.testing&amp;Id=&lt;Id&gt;&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-tmE.testing>
            <EcpUrl-extinstall>Extension/InstalledExtensions.slab?rfr=olk&amp;exsvurl=1&amp;realm=name_domain.test</EcpUrl-extinstall>
            <OOFUrl>https://webmail.name_domain.test/ews/exchange.asmx</OOFUrl>
            <UMUrl>https://webmail.name_domain.test/ews/UM2007Legacy.asmx</UMUrl>
            <OABUrl>https://webmail.name_domain.test/OAB/e66d9a4a-6ed2-4512-b72f-522381524dd9/</OABUrl>
            <ServerExclusiveConnect>On</ServerExclusiveConnect>
            <CertPrincipalName>msstd:webmail.name_domain.test</CertPrincipalName>
          </Protocol>
        </Account>
      </Response>
    </Autodiscover>
    Get-OwaVirtualDirectory | fl name,*auth*,*url*
    Name                          : owa (Default Web Site)
    ClientAuthCleanupLevel        : High
    InternalAuthenticationMethods : {Basic, Fba}
    BasicAuthentication           : True
    WindowsAuthentication         : False
    DigestAuthentication          : False
    FormsAuthentication           : True
    LiveIdAuthentication          : False
    AdfsAuthentication            : False
    OAuthAuthentication           : False
    ExternalAuthenticationMethods : {Basic}
    Url                           : {}
    SetPhotoURL                   :
    Exchange2003Url               :
    FailbackUrl                   :
    InternalUrl                   : https://webmail.name_domain.test/
    ExternalUrl                   : https://webmail.name_domain.test/

    Follow the results of the test
    Outlook Anywhere (RPC over HTTP).
    Has been used an account for which
    outlook anywhere works. The account
    for which the outlook anywhere does not work is
    an administrative account and therefore
    can not be used in the test.
    Autodiscovery returns the
    same result for both mailbox.
    I'm testing RPC/HTTP connectivity.
    Testing RPC over HTTP has not been exceeded.
    Test steps
    Microsoft connectivity Analyzer is attempting to test the Autodiscover service for user_test@domain_name.test.
    Test the Autodiscover service has not been exceeded.
    Test steps
    I'm trying to contact the Autodiscover service with each method available.
    I was not able to contact the Autodiscover service with no method.
    Test steps
    I'm trying to test the possible URL for the Autodiscover service https://domain_name.test/AutoDiscover/AutoDiscover.xml
    The test of this potential URL for the Autodiscover service has not been exceeded.
    Test steps
    I'm trying to resolve the host name domain_name. DNS test.
    I was able to resolve the host name.
    IP addresses are returned: xxx.yyy.zzz.www
    I'm testing the TCP port 443 on the host domain_name. tests to check that is open and listening.
    The door has been opened properly.
    I'm testing the validity of your SSL certificate.
    The SSL certificate has not exceeded one or more validation controls.
    Test steps
    Microsoft connectivity Analyzer is attempting to obtain the SSL certificate from the remote server domain_name. test on port 443.
    Microsoft connectivity Analyzer got the remote SSL certificate.
    Remote certificate subject: E = it_staff@domain_name.test, CN = * domain_name. test, OU = it staff, O = domain_name, L = city, S = state, C = test issuer: E = it_staff@domain_name.test, CN = * domain_name. test, OU = it staff, O = domain_name,
    L = city, S = state, C = test.
    I am validating the certificate name.
    I could not validate the certificate name.
    More info about this issue and how to resove it
    The host name domain_name. testing does not match any name found on the certificate and server = it_staff@domain_name.test, CN = * domain_name. test, OU = it staff, O = domain_name, L = city, S = state, C = test.
    I'm trying to test the possible URL for the Autodiscover service https://autodiscover.domain_name.test/AutoDiscover/AutoDiscover.xml
    The test of this potential URL for the Autodiscover service has not been exceeded.
    Test steps
    I'm trying to resolve the host name autodiscover. domain_name. DNS test.
    I was able to resolve the host name.
    IP addresses are returned: xxx.yyy.zzz.kkk
    I'm testing the TCP port 443 on the host autodiscover. domain_name. tests to check that is open and listening.
    The door has been opened properly.
    I'm testing the validity of your SSL certificate.
    The SSL certificate has not exceeded one or more validation controls.
    Test steps
    Microsoft connectivity Analyzer is attempting to obtain the SSL certificate from the remote server autodiscover. domain_name. test on port 443.
    Microsoft connectivity Analyzer got the remote SSL certificate.
    Other details
    Remote certificate subject: CN = webmail. domain_name. test, OU = it staff, O = domain_name, L = city, S = city, C = test issuer: CN = domain_name-DC1-CA, DC = domain_name, DC = test.
    I am validating the certificate name.
    I validated the certificate name.
    Other details
    I found the host name autodiscover. domain_name. test in the voice of the alternative name of the certificate object.
    Elapsed time: 1 ms.
    I am validating the reliability of certificates.
    I was not able to validate the reliability of the certificate.
    Test steps
    Microsoft connectivity Analyzer is attempting to generate certificate chains to a certificate CN = webmail. domain_name. test, OU = it staff, O = domain_name, L = city, S = city, C = test.
    I failed to build a certificate chain for the certificate.
    Other details
    Failed to generate the certificate chain.
    May be missing the required intermediate certificates.
    I'm trying to contact the Autodiscover service using the HTTP redirect method.
    I was not able to contact the Autodiscover service using the HTTP redirect method.
    Test steps
    I'm trying to resolve the host name autodiscover. domain_name. DNS test.
    I was able to resolve the host name.
    IP addresses are returned: xxx.yyy.zzz.kkk
    I'm testing the TCP port 80 on the host autodiscover. domain_name. tests to check that is open and listening.
    The specified port is blocked, is not listening or doesn't produce the expected response.
    More info about this issue and how to resove it
    I encountered a network error while communicating with the remote host.
    I'm trying to
    find the
    SRV DNS record _audiscover._tcp.domain_name.test.
    I failed to find
    the SRV record of the
    Autodiscover service
    in DNS.
    Some clarifications:
    1 - xxx.yyy.zzz.www and xxx.yyy.zzz.kkk
    are two static public addresses
    of which only the latter exposes Exchange services;
    2 - The certificate
    *. Domain_name.test is not related
    to Exchange services;
    3 -I imported the certificate
    of the issuing CA on the standalone test PC to validate the certificate.
    3- The port 80 is not open and are not published SRV records.
    Best regards.

  • Publishing a flash with AS3.0 on website does not work

    Okay, I'm finally at the end of my flash card. Here's the whole code.
    //import classes
    import com.greensock.TweenLite;
    import com.greensock.easing.*;
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    //end of importing
    //start of sound section is for sound
    var cssLoader:URLLoader;
    var css:StyleSheet;
    var soundReq:URLRequest=new URLRequest("audioFiles/PaukenBrumfiel_AngelsOnHigh.mp3");
    var sound:Sound = new Sound();
    sound.load(soundReq);
    sound.addEventListener(Event.COMPLETE, onComplete);
    //end of sound section
    //Loading external texts
    var weiss:Font = new Weiss();
    var weissBold:Font = new WeissBolder18();
    var weissBolder:Font = new WeissBolder();
    var slideXTween:Tween;
    var txtAlphaTween:Tween;
    var txtNextText:Tween;
    var txtContainer:Sprite;
    var txtField:TextField = new TextField();
    var myTxtField:TextField = new TextField();
    var txtFldwebImages:TextField = new TextField();
    var textRequest:URLRequest=new URLRequest("happyHoliday.txt");
    var textLoad:URLLoader = new URLLoader();
    var txtFormat:TextFormat = new TextFormat();
    var myLinkFormat:TextFormat = new TextFormat();
    var strLink:String;
    var numXPos:Number;
    var numYPos:Number;
    //end of loading external texts
    function onComplete(event:Event):void {
        sound.play();
    function textReady(event:Event):void {
        //txtFormat.font= weiss.fontName;
        txtFormat.color=0x000066;
        txtFormat.size=24;
        //txtField.x = stage.stageWidth;
        //txtField.width = 800;
        txtField.autoSize=TextFieldAutoSize.LEFT;
        //txtField.height = txtField.autoSize
        txtField.wordWrap=false;
        txtField.text=event.target.data;
        txtField.setTextFormat(txtFormat);
        //txtField.y = 350;
        txtField.embedFonts=true;
    textLoad.load(textRequest);
    txtFormat.font= weiss.fontName;
    textLoad.addEventListener(Event.COMPLETE, textReady);
    txtField.x=stage.stageWidth;
    addChild(txtField);
    txtField.y=350;
    TweenLite.to(txtField, 40, {x:-stage.stageWidth*2.25, ease:Linear.easeNone, delay:0.5, onComplete:Inspiration});
    function Inspiration():void {
        txtFormat.font= weissBolder.fontName;
        textLoad.load(new URLRequest("inspiration.txt"));
        txtField.x=130;
        txtField.y=330;
        txtField.alpha=0;
        TweenLite.to(txtField, 5, {alpha:1, onComplete:GoogleFunc});
    function GoogleFunc():void {
        //create and initialize css
        addChild(myTxtField);
        strLink = "<a href='http://www.google.com/' target='_blank'>Google</a>";
        numXPos = 180;
        numYPos = 370;
        var myCSS:StyleSheet = new StyleSheet();
        myCSS.setStyle("a:link", {color:'#000066',textDecoration:'none'});
        myCSS.setStyle("a:hover", {color:'#FF6600',textDecoration:'underline'});
        txtFormat.font = weissBold.fontName;
        //txtFormat.color=0x000066;
        txtFormat.size=20;
        //txtFormat.bold = true;
        myTxtField.setTextFormat(txtFormat);
        myTxtField.defaultTextFormat=txtFormat;
        myTxtField.styleSheet = myCSS; // Linking CSS to TextField
        myTxtField.htmlText="";
        myTxtField.htmlText=strLink;
        myTxtField.wordWrap=false;
        //myTxtField.embedFonts = true;
        myTxtField.width = strLink.length*2;
        myTxtField.x=numXPos;
        myTxtField.y=numYPos;
        //trace("Third txtField.y: " + txtField.y);
        myTxtField.alpha=0;
        TweenLite.to(myTxtField, 1, {alpha:1, onComplete:webImages});
        //trace("tween done");
    function webImages():void {
        addChild(txtFldwebImages);
        var myCSS:StyleSheet = new StyleSheet();
        myCSS.setStyle("a:link", {fontsize:'20',color:'#000066',textDecoration:'none'});
        myCSS.setStyle("a:hover", {fontsize:'20',color:'#FF6600',textDecoration:'underline'});
        txtFormat.font = weissBold.fontName;
        //txtFormat.color=0x000066;
        txtFormat.size=20;
        //txtFormat.bold = true;
        txtFldwebImages.setTextFormat(txtFormat);
        txtFldwebImages.defaultTextFormat=txtFormat;
        txtFldwebImages.styleSheet = myCSS; // Linking CSS to TextField
        txtFldwebImages.htmlText = "";
        txtFldwebImages.htmlText="<a href='http://www.google.com/webImages/' target='_blank'>Google Images</a>";
        txtFldwebImages.wordWrap=false;
        //myTxtField.embedFonts = true;
        txtFldwebImages.width = 300;
        txtFldwebImages.x=300;
        txtFldwebImages.y=370;
        txtFldwebImages.alpha=0;
        TweenLite.to(txtFldwebImages, 1, {alpha:1});
    //end of loading external texts
    Okay, the problem is when I publish the .swf files and put it in an html or .aspx page, it does not work. The audio is not there and a few others things ar enot working. However, it does work if I click on the.html file that Flash created during the publication.
    Here are the folder structions:
    www.mysite.com/myFlashPage.aspx
    www.mysite.com/flashFileFolder/
    www.mysite.com/flashFileFolder/audioFiles/
    So, the myFlashPage.aspx containsthe myFlash.swf file that is inside the flashFileFolder. For some reason, it does not work. Any suggestion is much appreciated.

    The .html file does work if I publish it into the same folder as I created the Flash project. However, when I publish the
    flash .swf to my web site folder (mapped), it's no longer working. The mapped web site drive structher are as follows:
    D:\Mysite\ contains the .html file
    D:\Mysite\flashFileFolder\ contains the .swf file
    D:\Mysite\flashFileFolder\audioFiles contains the PaukenBrumfiel_AngelsOnHigh.mp3 file
    D:\Mysite\flashFileFolder\greensock-tweening-platform-as3 contains all the tweenlite files
    The .html file does not work either. What else do I need to change?

  • Serialization not working in one way

    I tried to serialize a String object from and to an applet. The servlet to applet communication is working properly. But applet to servlet serialization is not working, but no exceptions are thrown. Please help me. Thank you very much.(I have given the complete source code bellow)
    =================================
    APPLET SOURCE CODE
    =================================
    import java.net.*;
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    public class TestApplet extends Applet {
    Button send = new Button();
    Button receive = new Button();
    TextArea textarea = new TextArea();
    BorderLayout borderLayout1 = new BorderLayout();
    public void init() {
    send.setLabel("send");
    send.addActionListener(new Send_Listener());
    receive.setLabel("receive");
    receive.addActionListener(new Receive_Listener());
    this.setLayout(borderLayout1);
    this.add(send, BorderLayout.NORTH);
    this.add(textarea, BorderLayout.CENTER);
    this.add(receive, BorderLayout.SOUTH);
    void sendObject(){
    try{
    URL url = new URL(getCodeBase(), "/servlets/testservlet");
    URLConnection servletConnection = url.openConnection();
    servletConnection.setDoInput(true);
    servletConnection.setDoOutput(true);
    servletConnection.setUseCaches (false);
    servletConnection.setDefaultUseCaches (false);
    servletConnection.setRequestProperty ("Content-Type", "application/octet-stream");
    ObjectOutputStream outputToServlet = new ObjectOutputStream(servletConnection.getOutputStream());
    outputToServlet.writeObject("some string here");
    outputToServlet.flush();
    outputToServlet.close();
    textarea.append("aplet has send the object to the servlet\n");
    }catch(Exception e){
    textarea.append("EXCEPTION THROWN IN THE APPLET IN SENDOBJECT\n");
    void getObject(){
    try{
    URL url =new URL(getCodeBase(), "/servlets/testservlet");
    URLConnection servletConnection = url.openConnection();
    servletConnection.setUseCaches (false);
    servletConnection.setDefaultUseCaches(false);
    ObjectInputStream inputFromServlet = new ObjectInputStream(servletConnection.getInputStream());
    String aString=(String)inputFromServlet.readObject();
    textarea.append(aString+"\n");
    textarea.append("aplet has received the object from the servlet\n");
    }catch(Exception e){
    textarea.setText("EXCEPTION THROWN IN THE APPLET IN GETOBJECT\n");
    class Send_Listener implements ActionListener{
    public void actionPerformed(java.awt.event.ActionEvent e){
    sendObject();
    class Receive_Listener implements ActionListener{
    public void actionPerformed(java.awt.event.ActionEvent e){
    getObject();
    ===================================
    SERVLET SOURCE CODE
    ===================================
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class TestServlet extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    try
    ObjectOutputStream outputToApplet = new ObjectOutputStream(response.getOutputStream());
    String aString= (String) request.getSession().getAttribute("ID");
    outputToApplet.writeObject("this is the string object: "+aString);
    outputToApplet.flush();
    outputToApplet.close();
    System.out.println("object send to applet:"+aString+"\n");
    catch (IOException e)
    System.out.println("EXCEPTION IN DOGET\n");
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    try {
    ObjectInputStream inputFromApplet = new ObjectInputStream(request.getInputStream());
    String aString = (String) inputFromApplet.readObject();
    request.getSession().setAttribute("ID", aString);
    inputFromApplet.close();
    System.out.println("object received from applet:"+aString+"\n");
    catch(Exception e)
    System.out.println("EXCEPTION IN DOPOST\n");

    There are some things in Java which can't be serialized. When contained within a higher-level class such as Buttons. A button can be associated with an Action Listener. Now, you can serialize a button; however you can't serialize an action listener - for what should be to you obvious reasons. This is NOT an error and so there is no need to throw an exception when serializing the button.
    Basically: Applet sends servlet button, but not listener.

  • Applet not Working.Why???

    I have written an applet program but it does not work
    It works when i did it as an application.
    I have installed JAVA plug in.The HTML and Applet codes
    are in the same directory as JDK
    The web browser comes up with a grey area & the following messages:
    Exception:java.lang.ClassNotFoundException:testing4.class
    (on the grey area)
    Applet testing4 not loaded (at the bottom of the browser)
    Why is this so?
    The code i have used are as follows:
    HTML CODE
    <html>
    <title>LPC
    </title>
    <applet code="testing4.class"  width=400 height=110>
    </applet>
    </html>APPLET PROGRAM CODE
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    //import java.lang.Object;
    public class testing4 extends JApplet
    { private JTextArea display;
      private JScrollPane scrollPane2;
      private JButton paste;
      private JPanel P2;
      private File fileName;
      public void init()
        paste=new JButton("paste");
        paste.setMinimumSize(new Dimension(90,20));
        paste.setPreferredSize(new Dimension(90,20));
        paste.setMaximumSize(new Dimension(90,20));
        copyhandler pa=new copyhandler();
        paste.addActionListener(pa);
        display=new JTextArea();
        scrollPane2=new JScrollPane(display);
        scrollPane2.setVerticalScrollBarPolicy(
                            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        scrollPane2.setMinimumSize(new Dimension(200,58));
        scrollPane2.setPreferredSize(new Dimension(200,58));
        scrollPane2.setMaximumSize(new Dimension(200,58));
        P2=new JPanel();
        P2.setMinimumSize(new Dimension(200,80));
        P2.setPreferredSize(new Dimension(200,80));
        P2.setMaximumSize(new Dimension(200,80));
        P2.setLayout(new BoxLayout(P2,BoxLayout.Y_AXIS));
        scrollPane2.setAlignmentX (Component.LEFT_ALIGNMENT);
        P2.add(scrollPane2);
        paste.setAlignmentX(Component.LEFT_ALIGNMENT);
        P2.add(paste);
       Container c=getContentPane();
        c.add(P2);
       //COPIES TEXT FROM FILE ON MY DISK TO THE TEXTAREA
       private class copyhandler implements ActionListener
       { public void actionPerformed(ActionEvent event)
         { JFileChooser fileChooser = new JFileChooser();
           fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY );
           int result = fileChooser.showOpenDialog(testing4.this);
           // user clicked Cancel button on dialog
           if ( result == JFileChooser.CANCEL_OPTION )
             return;
           fileName = fileChooser.getSelectedFile();
           if ( fileName == null ||
              fileName.getName().equals( "" ) )
           JOptionPane.showMessageDialog( null,"Invalid File Name",
                                            "Invalid File Name",
                                          JOptionPane.ERROR_MESSAGE );
           else
           { try
             { FileReader in = new FileReader(fileName);
               BufferedReader reading= new BufferedReader(in);
               String store="";
               while (reading.ready())
               { StringTokenizer st = new StringTokenizer(reading.readLine());
                 store=store+st.nextToken()+"\n";
               display.setText(store);
             catch ( IOException e )
             { JOptionPane.showMessageDialog( null,
                                          "Error Opening File", "Error",
                                          JOptionPane.ERROR_MESSAGE );
      public static void main (String [] args)
      { testing4 done =new testing4();
        JFrame frame = new JFrame("testing");
        frame.addWindowListener(new WindowAdapter()
                                 public void windowClosing(WindowEvent e)
                                   System.exit(0);
        done.init();
        frame.getContentPane().add(done);
        frame.pack();
        frame.setSize(205,110);
        frame.setVisible(true);
    }

    It Still giving a blank page.
    New Code
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    //import java.lang.Object;
    public class testing4 extends JApplet
    { private JTextArea display;
      private JScrollPane scrollPane2;
      private JButton paste;
      private JPanel P2;
      private File fileName;
      public void init()
        paste=new JButton("paste");
        paste.setMinimumSize(new Dimension(90,20));
        paste.setPreferredSize(new Dimension(90,20));
        paste.setMaximumSize(new Dimension(90,20));
        copyhandler pa=new copyhandler();
        paste.addActionListener(pa);
        display=new JTextArea();
        scrollPane2=new JScrollPane(display);
        scrollPane2.setVerticalScrollBarPolicy(
                            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        scrollPane2.setMinimumSize(new Dimension(200,58));
        scrollPane2.setPreferredSize(new Dimension(200,58));
        scrollPane2.setMaximumSize(new Dimension(200,58));
        P2=new JPanel();
        P2.setMinimumSize(new Dimension(200,80));
        P2.setPreferredSize(new Dimension(200,80));
        P2.setMaximumSize(new Dimension(200,80));
        P2.setLayout(new BoxLayout(P2,BoxLayout.Y_AXIS));
        scrollPane2.setAlignmentX (Component.LEFT_ALIGNMENT);
        P2.add(scrollPane2);
        paste.setAlignmentX(Component.LEFT_ALIGNMENT);
        P2.add(paste);
       Container c=getContentPane();
        c.add(P2);
       //COPIES TEXT FROM FILE ON MY DISK TO THE TEXTAREA
       private class copyhandler implements ActionListener
       { public void actionPerformed(ActionEvent event)
         { JFileChooser fileChooser = new JFileChooser();
           fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY );
           int result = fileChooser.showOpenDialog(testing4.this);
           // user clicked Cancel button on dialog
           if ( result == JFileChooser.CANCEL_OPTION )
             return;
           fileName = fileChooser.getSelectedFile();
           if ( fileName == null ||
              fileName.getName().equals( "" ) )
           JOptionPane.showMessageDialog( null,"Invalid File Name",
                                            "Invalid File Name",
                                          JOptionPane.ERROR_MESSAGE );
           else
           { try
             { FileReader in = new FileReader(fileName);
               BufferedReader reading= new BufferedReader(in);
               String store="";
               while (reading.ready())
               { StringTokenizer st = new StringTokenizer(reading.readLine());
                 store=store+st.nextToken()+"\n";
               display.setText(store);
             catch ( IOException e )
             { JOptionPane.showMessageDialog( null,
                                          "Error Opening File", "Error",
                                          JOptionPane.ERROR_MESSAGE );
      public static void main (String [] args)
      { testing4 done =new testing4();
        //you did not set applet's width and height:
        //applet is a container too
        done.setWidth(205);
        done.setHeight(110);
        JFrame frame = new JFrame("testing");
        frame.addWindowListener(new WindowAdapter()
                                  public void windowClosing(WindowEvent e)
                                  { System.exit(0);
        done.init();
        frame.getContentPane().add(done);
        frame.pack();
        frame.setSize(205,110);
        frame.setVisible(true);
    }

  • Array to DataGrid not working. Please help before I lose my mind (and my hair) completely.

    Hi,
    I'm new to the whole flex/as/flash builder, but I'm trying to do a seemingly simple thing and it's not working.
    Flex Mobile project has a button and data grid. When I press the button a 2 dimensional array is build with random numbers. Then I want to show the array on datagrid.
    The array does get build but it's not showing up on data grid.
    Any help would be appreciated as I've spent lots of time on this without any solution.
    Thanks,
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView">
    <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
      <![CDATA[
       import flash.events.Event;
       import mx.collections.ArrayList;  
       import mx.collections.ArrayCollection;
       import spark.events.ViewNavigatorEvent;
       protected function cmdStart1_clickHandler(event:MouseEvent):void
        DataGridTest1();
       protected function DataGridTest1():void
        var board:Array = [];
        var arrList:ArrayList = new ArrayList();
        var i:int = 1;
        var j:int;
        text.text = "";
        for(i; i<=5; i++)
         board[i] = [];
         j = 1;
         for(j; j<=6; j++)
          board[i][j] = Math.round(Math.random() * 10);
        arrList.source = board;
        grid.dataProvider = arrList; 
      ]]>
    </fx:Script>
    <s:Button id="cmdStart1" x="53" y="100" width="394" height="62" label="DataGridTest1 (ArrayList to Grid)"
         click="cmdStart1_clickHandler(event)"/>
    <s:TextArea id="text" x="53" y="240" width="394" height="162"/>
    </s:View>

    Sorry, the <s:TextArea shouldn't be there, I was using it to debug the array. I removed the  <s:DataGrid> instead of <s:TextArea> by mistake.
    Also, I tried to move arrList out of the function but that didn't work.
    Here's the entire code again:
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView">
    <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
      <![CDATA[
       import flash.events.Event;
       import mx.collections.ArrayList;  
       import mx.collections.ArrayCollection;
       import spark.events.ViewNavigatorEvent;
       protected function cmdStart1_clickHandler(event:MouseEvent):void
        DataGridTest1();
       protected function DataGridTest1():void
        var board:Array = [];
        var arrList:ArrayList = new ArrayList();
        var i:int = 1;
        var j:int;
        text.text = "";
        for(i; i<=5; i++)
         board[i] = [];
         j = 1;
         for(j; j<=6; j++)
          board[i][j] = Math.round(Math.random() * 10);
        arrList.source = board;
        grid.dataProvider = arrList; 
      ]]>
    </fx:Script>
    <s:Button id="cmdStart1" x="53" y="100" width="394" height="62" label="DataGridTest1 (ArrayList to Grid)"
         click="cmdStart1_clickHandler(event)"/>
    <s:DataGrid id="grid" x="500" y="100" width="236" height="226" />
    </s:View>

Maybe you are looking for

  • Dropdown listbox getting values from domain

    Hi, I want to create a Dropdown listbox that gets its values from a dictionary domain. I usually get the values from a table but there's a case where I need to get them from a domain. Is it possible? Thanks.

  • Vendor Master Contact details

    Hi, I am currently working on a data migration project to migrate the data from the SAP 4.7 to ECC 6.0. We are working on migrating the vendor master data and I am struck up in extracting the comments maintained in the Vendor master Telephone details

  • Saving in Adobe 9 and Opening file in Adobe 8... text wrap does not workIwo

    I work with a client who has Acrobat 8, I use Acrobat 9. I am saving a pdf that has form fields that need to wrap text and scroll. They have the properties of "multi-line" and "scroll text" already checked, and when I test it on my computer, the text

  • SQL Error: ORA-12801: error signaled in parallel query server P012 ORA-0001

    Dear all We are in BI 7.0 and oracle 10.2.02 and OS AIX 5.3 and we are getting the ORA -12801 while attribute change run and aggregates rollup. plz help Regards Amiya Kumar

  • Can't add additional Google Calendars

    On all my other devices running iOS 5.1, I can see all the other calendars associated with my Google account. (I have it set up as an Exchange account), however on the new iPad (iPad 3), all that is being pulled in is the main Google calendar. None o