|
I want a javascipt code for calender
on which display current date and I can navigate to any month and year.
plz help me.
Bharat Bhusanam
|
|
|
|
|
google
Christian Graus - C++ MVP
|
|
|
|
|
Christian Graus wrote: google
Can I get a hallelujah!
Brad
Australian
By contacting your lawyer you negate the right to sue me.
|
|
|
|
|
|
Translation: I need something, but don't want to do any work for it. Please give me a complete sample that requires me to only copy/paste into my project.
|
|
|
|
|
Hi friends
I am woking in asp.net 2.0
i dont know how to build dll file for web application.
Thanks
pathan
|
|
|
|
|
|
Hi all,
I am in urgent need of a solution for the problem I have.
I have a grid inside a div tag, but the horizontal scroll bar moves to slowly and I want to increase the speed.
Please help.
Regards
Virat Soni.
|
|
|
|
|
Make the font smaller.
If that is not an option then please post a bit more information, like to you mean a manually moved scroll bard or an JavaScript controlled one?
Brad
Australian
"The Probability of you doing that makes 0 look like a big number" - My Mate Oxley
|
|
|
|
|
Thanks for your response.
Making font smaller is not an option.
This is the scrollbar of the div within which I have a grid.
Like the following
<div id="tbl-container" style="OVERFLOW: auto; WIDTH: 995px; HEIGHT: 400px">
-------code for the div---------
</div>
Its working fine except the speed of the scrollbar in the horizontal direction is too slow.
|
|
|
|
|
Unless you're scrolling programatically, the speed is determined by the browser and the OS it runs on. If you have an extremely large amount of data, the speed may even be limited by processor and memory constraints. In this case, the best you can do is simplify the data being scrolled.
|
|
|
|
|
Can you help me in determining how to scroll it programmatically?
|
|
|
|
|
theDiv.scrollTop = position;
|
|
|
|
|
Using IE 6, I the error 'this.prototype' is null or not an object.
The script that defines my object and creates objects of this type looks something like the following:
function NameObject( Name ) {
this.Name = Name;
this.prototype.FixName = function() {
if( this.Name && this.Name.length != 0 )
this.Name = this.Name.charAt(0).toUpperCase() +
(this.Name.length > 1 ) ? this.Name.slice(1) : "";
}
this.FixName();
}
var Ted = new NameObject( 'ted' );
var Bill = new NameObject( 'bill' );
The books I have on Javascript don't indicate that IE6 doesn't support this feature, but from the error I'm getting ('this.prototype' is null or not an object) the magic where the prototype sub-object of my NameObject is supposed to be automatically created and then the members exposed in my class isn't happening.
Why is this, and is there a work around that provides the same benefits as real prototyping?
Thanks in advance.
|
|
|
|
|
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.
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.
|
|
|
|
|
howardjr wrote: how to make real prototyping work in IE6
function jsps_strequals(s)
{
return ( 0==this.indexOf(s) && this.length == s.length);
}
String.prototype.equals = jsps_strequals;
var str = "Hello";
if(str.equals("Hello"))
alert("Hello found");
led mike
|
|
|
|
|
Thanks
So you can't define the prototype in side of the contructor?
|
|
|
|
|
howardjr wrote: So you can't define the prototype in side of the contructor?
Sure you can, you just don't use the keyword "prototype".
function JSRect( x, y, r, b){
this.left = x;
this.top = y;
this.right = r;
this.bottom = b;
this.width = jsr_width;
function jsr_width(){ return this.right - this.left; }
}
led mike
|
|
|
|
|
Looks like it's an either or thing. Either you can define the functions inside of the object or you can prototype them.
Thanks.
|
|
|
|
|
howardjr wrote: The books I have on Javascript don't indicate that IE6 doesn't support this feature, but from the error I'm getting ('this.prototype' is null or not an object) the magic where the prototype sub-object of my NameObject is supposed to be automatically created and then the members exposed in my class isn't happening.
It is. You're misunderstanding how it works and how it can be used.
Every object in JavaScript has a prototype. It's how JS object inheritance works. However, you can't change the prototype for an object; you can only specify what the prototype will be for new objects. By the time your NameObject constructor executes, it's too late - the new object has already been created, all you can do is initialize it. Even if you created a new object and assigned it to this.prototype, it wouldn't do any good - the .prototype member only tells the interpreter what it should use as the prototype for new objects created based on the object.
What you really want to do is set up the prototype before creating new NameObject objects:
function NameObject( Name )
{
this.Name = Name;
this.FixName();
}
NameObject.prototype.FixName = function()
{
if ( this.Name && this.Name.length != 0 )
this.Name = this.Name.charAt(0).toUpperCase() + (this.Name.length > 1 ? this.Name.slice(1) : '');
}
var Ted = new NameObject( 'ted' );
var Bill = new NameObject( 'bill' );
|
|
|
|
|
Thanks
I personally like to have all of my methods defined inside of the object/class definition, including the prototype, if possible.
What I did as an alternative is to define and newed a "prototype_class", that didn't use the .prototype. keyword, that contained all of the methods and constants I only wanted one version of, then attached these to my working object that I new for each instance I need:
NameObject_ProtoType = new function () {
this.constant=0;
this.fixname = function() { ... };
}
function NameObject( Name ) {
this.constant = NameObject_ProtoType.constant;
this.fixname = NameObject_ProtoType.fixname;
this.name = Name;
}
This approach seems to work, and all of the constants and methods in the prototype object seem to only exist once for all of the NameObjects I create. With this approach I sort of get the the inline definition I want, at least to the extent that all of the prototyped items are neatly bound up in the prototype object.
|
|
|
|
|
I have the following snippets in a CSS:
body{
background-color: #f0f0f0;
color: #000000;
}
td.nav{
background-color: #e0e0e0;
}
td.l_col{
width: 25%;
border-right: thin solid;
}
The body backgroung color and the td.nav background color are not set and the right border does not render in IE but renders fine in Opera and FF.
The td.l_col width renders properly in all browsers.
Is there anything I need to do differently in the CSS to get IE to render in a similar manner to Opera and FF?
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
Unless you develop for some other media than screen, specify the border width in pixels.
Other than that the CSS look all right. How do you use it in the HTML code?
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for the reply.
It is generally not a good idea to specify fixed dimensions.
People set their resolution based on individual preferences and if you try to guess the resolution you will undoubtedly be wrong some percentage of the time.
Having said that I will try a test with a fixed border width but that still doesn't account for the background color not rendering.
Thanks for the suggestion.
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
JimmyRopes wrote: but that still doesn't account for the background color not rendering
That's why I asked how you are using the CSS in the HTML code. It's so hard to help people when you have to guess what they are doing...
---
b { font-weight: normal; }
|
|
|
|