|
do u think is will be better if i use microsoft server product such as small business server 2003 or just use the normaly windows professional?? MY company only have around 10 ppl. My boss wanted to have our own server.
i think my company have the SQL databse software.
|
|
|
|
|
I could not see some forum content.
Why?
|
|
|
|
|
I have came across 3 different ways of creating a structure or class.
1. Class as a function way
// Class Constructor
function Timer(Source) {
// Class Properties
this.timerID = 0;
this.tStart = null;
// Class Methods
this.UpdateTimer = function() {
};
}
// Example
var timer = new Timer(0);
timer.UpdateTimer();
2. Class.create & prototype way
var WindowDelegate = Class.create();
WindowDelegate.prototype = {
// Class Constructor
initialize: function() {
},
canClose: function(win) {
}
}
3. Declare as a var way
var myObserver = {
variable: null,
anotherVariable: 33
stringVariable: 'asdf',
aFunction: function(a, b) {
}
}
I assume #3 is just a object/structure instance rather than a class definition.
Has anyone came across #1 way? What are the differences between these 3 ways?
And what is the proper way to define a class?
|
|
|
|
|
Ummm...#1 and #3 is actually the same (with #3 you create the object directly while #1 specifies the class you can create objects from), and there's a variant of #2 that I use for no other reason than it's neat(er):
ClaimControl = function(controlID)
{
BaseClaim.call(this, controlID, 'Claim');
}
ClaimControl.prototype = new BaseClaim();
ClaimControl.prototype.constructor = ClaimControl;
ClaimControl.superclass = BaseClaim.prototype;
ClaimControl.prototype.Load = function (idClaim)
{
return ClaimControl.superclass.Load.call(this, idClaim, 'LoadClaim');
}
ClaimControl.prototype.Save = function()
{
return ClaimControl.superclass.Load.call(this, 'SaveClaim');
}
Either #1 or #2 or mine above is a proper way to define a class. To define an object you can either use #2 or Javascript Object Notation (JSON)[^]
"You are special, but so is everybody else."
"Democracy is two wolves and a sheep voting on what to have for dinner" - Ross
Edbert
Sydney, Australia
|
|
|
|
|
Does anybody know how to read a file using javascript
I have tried but it seems not to work
fh = fopen("filepath", 0);
if(fh!=-1)
{<br />
length = flength(fh);
str = fread(fh, length);
fclose(fh);
<br />
write(str); <br />
}<br />
-- modified at 10:48 Monday 10th July, 2006
|
|
|
|
|
If you are running this through a web page you probably won't have permissions to open a client's file system.
|
|
|
|
|
I have an input element of type file, so i can get the file path on the client side, but i dont know how to read the file on the client's side.
Im using Jboss as my container, and im using JSPs.
Any help.
|
|
|
|
|
That doesn't work.
If you run the Javascript in the browser, you can't access any file system.
If you run the Javascript in the server, you can't access the file system of the client, only the server.
---
b { font-weight: normal; }
|
|
|
|
|
Yeah, you'll have to upload to the server and do something with the file there. You can't use JavaScript to read files on a client machine. I think that Flash might be able to do that.. anyone seen this lately?
Dirk Watkins
|
|
|
|
|
Javascript and VBScript are ONLY able to access files on your hard drive using Active X controls.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
As far as I am aware, javascript is forbidden access to your file system except by using an Active X control. In which case, taken from an older version of JScript :
OpenTextFile Method
=============================
var fs, a, ForAppending;
ForAppending = 8;
fs = new ActiveXObject("Scripting.FileSystemObject");
a = fs.OpenTextFile("c:\\testfile.txt", ForAppending, false);
...
a.Close()
FileExists method
=========================
function ReportFileStatus(filespec)
{
var fso, s = filespec;
fso = new ActiveXObject("Scripting.FileSystemObject");
if (fso.FileExists(filespec))
s += " exists.";
else
s += " doesn't exist.";
return(s);
}
Write method:
=============================
function WriteDemo()
{
var fso, f, r
var ForReading = 1, ForWriting = 2;
fso = new ActiveXObject("Scripting.FileSystemObject")
f = fso.OpenTextFile("c:\\testfile.txt", ForWriting, true)
f.Write("Hello world!");
f.Close();
f = fso.OpenTextFile("c:\\testfile.txt", ForReading);
r = f.ReadLine();
return(r);
}
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Hi,
Is there a way for people to share a file like a ms-Word doc
and assign one party permission to view it while another party could edit it
while other is viewing ?
|
|
|
|
|
We are building a Client/Server application based on ASP.NET.
The server application is an IIS 6.0 hosted XML web service application exposing various web service methods.
The client is a Windows Forms client which are consuming the XML web services.
It's very important the application is available 24 hours a day and therefore we rely on the Worker Process Isolation/recycling feature in IIS 6.0 for maximum availibility.
Unforetunely recycling does not work very well for us - the client hangs if recycling happens during a web service request. After some amount of time we get the WebException "The operation has timed out". On the IIS6.0 machine we see the old worker process has been killed. If a new request is made to the service, a new worker process starts up and the application continues working. So the server side is apparently completely unaware of the hanging client.
To find the root cause I developed the most simple test application which consists of a ASP.Net web service exposing a single web method and a Console application which consumes this Web service in an infinite loop:
Server:
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
[WebMethod]
public void test()
{
int v = 10;
}
}
Client:
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
WebReference.Service s = new ConsoleApplication1.WebReference.Service();
int j = 0;
while (true)
{
s.test();
Console.WriteLine(j.ToString());
j++;
}
}
}
}
If I manually recycle the Application pool running the web service above, the Console application starts hanging until the time out exception occurs. Anybody got an idea why this happens? I thought recycling was supposed to be transparent for the client.
The IIS 6.0 is configured with default settings.
In the HTTPErr log file I get a Timer_AppPool error. I guess this indicates that a request from the console application somehow gets stuck?
Thanks & Regards
Steen Bundgaard
|
|
|
|
|
Hello, does anybody know how to open an "open file dialog box" in javascript?
|
|
|
|
|
You use a tag like this: ...
|
|
|
|
|
hi,
plz try this code for that its helpfull for u
<title>Change the URL
Pick your favorite investment site:
Fool.com (The Motley Fool)
MoneyCentral Investor
TheStreet.com
|
|
|
|
|
Hello
I'm making a project in ASP.Net 1.1.
Basically its Site Creator Project on which i' working.
My CLient hav uploaded the 20 subdoamin for me.
but i don't how to use these subdoamin either i have to upload my whole project on these 20 subdoamins. or is there any way which i can set the path to my mail domain directly.
i hope i'm able to let u understand my problem.if any thing unclear plz let me know.
thanx
|
|
|
|
|
You can use the host headers in IIS to do this and have them all point to the same site so you will only need one set of code.
Dirk Watkins
|
|
|
|
|
hi
thanx for replying but didn't get ur answer properly it would be better to me if u write the answer little descriptive..(plz explain more)
thanx
|
|
|
|
|
|
|
for example if there is a flash. why it's locked by the browser.
and the problem is i saw some flash on other websites not locked.
how can i remove this blocker... ??
Faris Madi
Nothing Comes Easy (N.C.E.)
|
|
|
|
|
|
thanx, but what's the reasons to disactivate the control.
Is it for security reasons?
Faris Madi
Nothing Comes Easy (N.C.E.)
-- modified at 2:28 Tuesday 11th July, 2006
|
|
|
|
|
Microsoft lost a lawsuit regarding the embedding of content. This was its initial attempt at a work around. Rumor has it that will change in IE7 (surprise...surprise)
|
|
|
|