Click here to Skip to main content
16,010,334 members
Home / Discussions / Web Development
   

Web Development

 
QuestionHow to change the speed of the scrollbar of a div? Pin
Virat Soni22-Nov-06 21:28
Virat Soni22-Nov-06 21:28 
AnswerRe: How to change the speed of the scrollbar of a div? Pin
Bradml22-Nov-06 23:30
Bradml22-Nov-06 23:30 
AnswerRe: How to change the speed of the scrollbar of a div? Pin
Virat Soni23-Nov-06 1:49
Virat Soni23-Nov-06 1:49 
GeneralRe: How to change the speed of the scrollbar of a div? Pin
Shog923-Nov-06 8:17
sitebuilderShog923-Nov-06 8:17 
GeneralRe: How to change the speed of the scrollbar of a div? Pin
Virat Soni26-Nov-06 22:35
Virat Soni26-Nov-06 22:35 
GeneralRe: How to change the speed of the scrollbar of a div? Pin
Shog927-Nov-06 4:58
sitebuilderShog927-Nov-06 4:58 
QuestionUnable to use prototype with my javascript custom object. Pin
howardjr22-Nov-06 9:20
howardjr22-Nov-06 9:20 
AnswerRe: Unable to use prototype with my javascript custom object. Pin
howardjr22-Nov-06 10:09
howardjr22-Nov-06 10:09 
Here is one possible work-around, but I don't know if it actually saves on the method storage space. I know it doesn't do the automatic internal prototype creation and mapping to top level properties, like prototyping is supposed to do, but if it saves the space needed to save the method bodies, that's enough for me.

function NameObject( Name ) {

//
// define FixName_ProtoType Method outside of the
// instance, i.e., no 'this.' in front of the
// function name.
//
function FixName_ProtoType () {

var NewName = "";
if( this.Name && this.Name.length != 0 ) {
NewName = this.Name.charAt(0).toUpperCase();
if( this.Name.length > 1 )
NewName += this.Name.substr( 1 );
this.Name = NewName;
}
return this.Name;
};

//
// create the Name property.
//
this.Name = Name;

//
// Attach the FixName_ProtoType Method to the
// instance so it can be called using x.FixName().
//
this.FixName = FixName_ProtoType;

//
// Execute the method for the newly created object.
//
this.FixName( this.Name );
}

However, I suspect that because FixName_ProtoType's declaration is nested inside of NameObject, that javascript will just create one per instance. To get around this I may have to move the FixName_ProtoType declaration outside of the NameObject's body, but then that wouldn't expose the function definition. Frown | :(

Anyway, I'm still interested in comments about how to make real prototyping work in IE6 or a better work-around, if there is one.

Thanks again.

GeneralRe: Unable to use prototype with my javascript custom object. Pin
led mike22-Nov-06 10:28
led mike22-Nov-06 10:28 
GeneralRe: Unable to use prototype with my javascript custom object. Pin
howardjr24-Nov-06 1:18
howardjr24-Nov-06 1:18 
GeneralRe: Unable to use prototype with my javascript custom object. Pin
led mike27-Nov-06 5:19
led mike27-Nov-06 5:19 
GeneralRe: Unable to use prototype with my javascript custom object. Pin
howardjr28-Nov-06 6:35
howardjr28-Nov-06 6:35 
AnswerRe: Unable to use prototype with my javascript custom object. Pin
Shog922-Nov-06 15:05
sitebuilderShog922-Nov-06 15:05 
GeneralRe: Unable to use prototype with my javascript custom object. Pin
howardjr24-Nov-06 1:33
howardjr24-Nov-06 1:33 
QuestionIE not rendering consistantly with Opera and FF Pin
JimmyRopes22-Nov-06 4:28
professionalJimmyRopes22-Nov-06 4:28 
AnswerRe: IE not rendering consistantly with Opera and FF Pin
Guffa22-Nov-06 13:35
Guffa22-Nov-06 13:35 
GeneralRe: IE not rendering consistantly with Opera and FF Pin
JimmyRopes22-Nov-06 16:02
professionalJimmyRopes22-Nov-06 16:02 
GeneralRe: IE not rendering consistantly with Opera and FF Pin
Guffa22-Nov-06 18:52
Guffa22-Nov-06 18:52 
GeneralRe: IE not rendering consistantly with Opera and FF Pin
JimmyRopes22-Nov-06 19:39
professionalJimmyRopes22-Nov-06 19:39 
AnswerRe: IE not rendering consistantly with Opera and FF Pin
Guffa22-Nov-06 21:30
Guffa22-Nov-06 21:30 
GeneralRe: IE not rendering consistantly with Opera and FF Pin
JimmyRopes23-Nov-06 5:13
professionalJimmyRopes23-Nov-06 5:13 
AnswerRe: IE not rendering consistantly with Opera and FF Pin
Guffa23-Nov-06 7:36
Guffa23-Nov-06 7:36 
AnswerRe: IE not rendering consistantly with Opera and FF Pin
Johnny ²22-Nov-06 14:00
Johnny ²22-Nov-06 14:00 
GeneralRe: IE not rendering consistantly with Opera and FF Pin
JimmyRopes22-Nov-06 14:31
professionalJimmyRopes22-Nov-06 14:31 
Questionjavascript 'new RegExp()' notation Pin
pint_of_best22-Nov-06 0:31
pint_of_best22-Nov-06 0:31 

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.