Click here to Skip to main content
15,915,093 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Add/Edit in ModalPopupExtender Pin
StianSandberg12-Mar-09 2:50
StianSandberg12-Mar-09 2:50 
Questionhtml source code Pin
patrice pilgrim11-Mar-09 9:48
patrice pilgrim11-Mar-09 9:48 
AnswerRe: html source code Pin
Ashfield12-Mar-09 2:38
Ashfield12-Mar-09 2:38 
AnswerRe: html source code Pin
Mohammad Dayyan13-Mar-09 3:53
Mohammad Dayyan13-Mar-09 3:53 
AnswerRe: html source code Pin
Marc Firth15-Mar-09 23:30
Marc Firth15-Mar-09 23:30 
Questionquestion Pin
mohprog11-Mar-09 6:42
mohprog11-Mar-09 6:42 
AnswerRe: question Pin
fly90411-Mar-09 11:43
fly90411-Mar-09 11:43 
GeneralRe: question Pin
Naruki23-Mar-09 20:21
Naruki23-Mar-09 20:21 
QuestionPadding in dropdown Pin
Brendan Vogt11-Mar-09 6:29
Brendan Vogt11-Mar-09 6:29 
AnswerRe: Padding in dropdown Pin
Marc Firth15-Mar-09 23:31
Marc Firth15-Mar-09 23:31 
GeneralRe: Padding in dropdown Pin
Brendan Vogt16-Mar-09 5:41
Brendan Vogt16-Mar-09 5:41 
GeneralRe: Padding in dropdown Pin
Marc Firth16-Mar-09 5:55
Marc Firth16-Mar-09 5:55 
GeneralRe: Padding in dropdown Pin
Brendan Vogt16-Mar-09 5:58
Brendan Vogt16-Mar-09 5:58 
GeneralRe: Padding in dropdown Pin
Marc Firth16-Mar-09 6:02
Marc Firth16-Mar-09 6:02 
QuestionVertical Alignment in divs Pin
Brendan Vogt11-Mar-09 6:26
Brendan Vogt11-Mar-09 6:26 
AnswerRe: Vertical Alignment in divs Pin
Riaan Booyzen12-Mar-09 1:14
Riaan Booyzen12-Mar-09 1:14 
AnswerRe: Vertical Alignment in divs Pin
Marc Firth15-Mar-09 23:34
Marc Firth15-Mar-09 23:34 
QuestionJavascript Permission Denied when using get and post Pin
HatakeKaKaShi10-Mar-09 19:23
HatakeKaKaShi10-Mar-09 19:23 
AnswerRe: Javascript Permission Denied when using get and post Pin
Johnny ²13-Mar-09 9:58
Johnny ²13-Mar-09 9:58 
QuestionGzip Compression in VBScript? Pin
Member 232448310-Mar-09 14:09
Member 232448310-Mar-09 14:09 
AnswerRe: Gzip Compression in VBScript? Pin
tech60318-Mar-09 16:19
tech60318-Mar-09 16:19 
QuestionJavascript error: 'Type' is undefined. Pin
Steve Holdorf10-Mar-09 3:53
Steve Holdorf10-Mar-09 3:53 
I am some what new to javascript. I defined a javascript class that is setting the behavior of two asp text boxes. When I run the test application I receive the error: 'Type is undefined. This error refers to the Type.RegisterNamespace('Sample'); Below is the script section of my aspx page. Can anyone help?

<script type="text/javascript">

Type.RegisterNamespace('Samples');

Samples.FormattingBehavior = function(element) {
    Samples.FormattingBehavior.initializeBase(this, [element]);

    this._hoverCssClass = null;
    this._focusCssClass = null;
    this._currentCssClass = null;
    this._mouseOver = null;
    this._focus = null;

    }

    Samples.FormattionBehavior.prototype = {
        initialize : function() {
        Samples.FormattingBehavior.callBaseMethod(this, 'initialize');

        $addHandlers(this.get_elements(),
        {
            mouseout:this._onMouseout,
            mouseover:this._onMouseover,
            focus:this._onFocus,
            blur:this._onBlur
            }, this);
            },

      dispose : function() {
        $clearHandlers(this._get_element());
        },
     _onMouseover : function() {
            this._mouseOver = true;
            this._setCssClass();
            },
    _onMouseout : function() {
            this._mouseOver = false;
            this._setCssClass;
            },
   _onFocus : function() {
            this._focus = true;
            this.setCssClass();
            },
   _onBlur : function() {
            this._focus = false;
            this._setCssClass;
            },

   _setCssClass : function() {
            if (this._currentCssClass) {
            Sys.UI.DomElement.removeCssClass(this._element,
            this._currentCssClass);
            this._currentCssClass = null;
            }

            if (this._error) {
            this._currentCssClass = this.errorCssClass;
            }
            else if (this.focus) {
            this._currentCssClass = this._hoverCssClass;
            }
            else if (this._mouseOver) {
            this._currentCssClass = this._hoverCssClass;
            };

            if (this._currentCssClass) {
            Sys.UI.DomElement.addCssClass(this._element,
            this._currentCssClass);
            }; },

            get_hoverCssClass : function() {
            return this._hoverCssClass;
            },

            set_hoverCssClass : function(value) {
            this._hoverCssClass = value;
            },

            get_focusCssClass : function() {
            return this._focusCssClass;
            },

            set_focusCssClass : function(value) {
            this._focusCssClass = value;
            }
             }

             Samples.FormattionBehavior.registerClass(
             'Samples.FormattionBehavior', Sys.UI.Behavior);

             Sys.Application.add_init(pageInit);

             function pageInit(sender, e) {
                              $create(Samples.FormattingBehavior,
             {
             'hoverCssClass':'field_hover',
             'focusCssClass':'field_focus'
             },
             {}, {}, $get('Name'));

             $create(Samples.FormattingBehavior,
             {
             'hoverCssClass':'field_hover',
             'focusCssClass':'field_focus'
             },
             {}, {}, $get('LastName'));
             }

</script>


Thanks,


Steve
AnswerRe: Javascript error: 'Type' is undefined. Pin
Yusuf10-Mar-09 4:29
Yusuf10-Mar-09 4:29 
GeneralJavascript Logger Pin
manowj10-Mar-09 3:26
manowj10-Mar-09 3:26 
GeneralRe: Javascript Logger Pin
Yusuf10-Mar-09 4:33
Yusuf10-Mar-09 4:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.