Click here to Skip to main content
15,845,598 members
Home / Discussions / Web Development
   

Web Development

 
QuestionVertical Alignment in divs Pin
Brendan Vogt11-Mar-09 7:26
Brendan Vogt11-Mar-09 7:26 
AnswerRe: Vertical Alignment in divs Pin
Riaan Booyzen12-Mar-09 2:14
Riaan Booyzen12-Mar-09 2:14 
AnswerRe: Vertical Alignment in divs Pin
Marc Firth16-Mar-09 0:34
Marc Firth16-Mar-09 0:34 
QuestionJavascript Permission Denied when using get and post Pin
HatakeKaKaShi10-Mar-09 20:23
HatakeKaKaShi10-Mar-09 20:23 
AnswerRe: Javascript Permission Denied when using get and post Pin
Johnny ²13-Mar-09 10:58
Johnny ²13-Mar-09 10:58 
QuestionGzip Compression in VBScript? Pin
Member 232448310-Mar-09 15:09
Member 232448310-Mar-09 15:09 
AnswerRe: Gzip Compression in VBScript? Pin
tech60318-Mar-09 17:19
tech60318-Mar-09 17:19 
QuestionJavascript error: 'Type' is undefined. Pin
Steve Holdorf10-Mar-09 4:53
Steve Holdorf10-Mar-09 4: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 5:29
Yusuf10-Mar-09 5:29 
GeneralJavascript Logger Pin
manowj10-Mar-09 4:26
manowj10-Mar-09 4:26 
GeneralRe: Javascript Logger Pin
Yusuf10-Mar-09 5:33
Yusuf10-Mar-09 5:33 
QuestionAPI's Pin
shaikcode10-Mar-09 3:36
shaikcode10-Mar-09 3:36 
QuestionRe: API's Pin
Smithers-Jones11-Mar-09 5:11
Smithers-Jones11-Mar-09 5:11 
AnswerRe: API's Pin
Ashfield12-Mar-09 3:39
Ashfield12-Mar-09 3:39 
AnswerRe: API's Pin
0x3c013-Mar-09 4:47
0x3c013-Mar-09 4:47 
GeneralRe: API's Pin
Jim Crafton13-Mar-09 10:41
Jim Crafton13-Mar-09 10:41 
GeneralRe: API's Pin
shaikcode13-Mar-09 21:27
shaikcode13-Mar-09 21:27 
AnswerRe: API's Pin
Colin Angus Mackay15-Mar-09 4:56
Colin Angus Mackay15-Mar-09 4:56 
QuestionError throwing when using Mozilla firefox browser. Pin
Rasma Raj10-Mar-09 2:31
Rasma Raj10-Mar-09 2:31 
AnswerRe: Error throwing when using Mozilla firefox browser. Pin
SeMartens11-Mar-09 23:32
SeMartens11-Mar-09 23:32 
QuestionProblem With ModalPopupExtender and UpdatePanel Pin
VikashGohil9-Mar-09 7:48
VikashGohil9-Mar-09 7:48 
AnswerRe: Problem With ModalPopupExtender and UpdatePanel Pin
Rajdev Ramasamy13-Mar-09 1:09
Rajdev Ramasamy13-Mar-09 1:09 
AnswerWhat language are you using? Pin
Naruki23-Mar-09 21:24
Naruki23-Mar-09 21:24 
QuestionDeploy website on ftp Pin
Hemant Thaker8-Mar-09 20:19
Hemant Thaker8-Mar-09 20:19 
AnswerRe: Deploy website on ftp Pin
Abhishek Sur9-Mar-09 4:35
professionalAbhishek Sur9-Mar-09 4:35 

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.