|
Regarding to the law of many country, personal data is protected and cannot be transmited via automated procedures without the consent of the owners. The fact that you transmit private data through the internet by any automated mean should take the law in consideration prior to the definition of the solution to adopt.
Tecnically, you can do it, legally it is forbidden in many countries.
|
|
|
|
|
We have a function we use to get the user's PC date and time and store it with a record. The reason is that the website is used globally, so our server date and time is not friendly to the user.
The following code does not always work for the same users on the same day. Does anyone know what could cause it to fail so often for the same user? When it does fail, we default to the server date and time instead. I have no errors being generated by it. A factor can be that the Internet connection is not always good.
function Init()
{
var oControlCookie = new Cookie("t", "", 24, "/");
var now = new Date();
oControlCookie.st = escape((now.getMonth()+1) + "/" + now.getDate() + "/" + now.getFullYear() + " " + now.getHours() + ":" + (now.getMinutes()<10?"0":"") + now.getMinutes() + ":" + (now.getSeconds()<10?"0":"") + now.getSeconds());
oControlCookie.Store();
}
|
|
|
|
|
What happens when it does "not work"?
---
Year happy = new Year(2007);
|
|
|
|
|
It defaults to the server date.
I have not duplicated the problem, but it has happened to users from different countries, and for the same user on the same day, it has worked and then not worked.
|
|
|
|
|
Ken42 wrote: It defaults to the server date.
No, when I said "what happens", I meant "what happens", not "what do you do instead".
---
Year happy = new Year(2007);
|
|
|
|
|
I don't know. The users have not complained of any error messages or problems and we don't get any errors on the server. The website goes on without interruption as far as we know. I have not been able to duplicate the problem.
I was checking to see if anyone else had ever had a problem with getting PC dates.
If not, I may have to add some logging to the function which will slow down the user's navigation, but may be a necessity.
|
|
|
|
|
Ken42 wrote: I don't know. The users have not complained of any error messages or problems and we don't get any errors on the server.
The browser does not report any Javascript errors unless the user specifically has enabled them, that's why noone is complaining about error messages. You don't get any errors on the server as the error occurs in the browser.
Ken42 wrote: I was checking to see if anyone else had ever had a problem with getting PC dates.
I can't imagine that there would be a problem in getting the date. It's probably the code that sets the cookie that doesn't work.
---
Year happy = new Year(2007);
|
|
|
|
|
Hi,
Iam Having Reportviewer in updatepanel.Iam Unable to Print a Report,whenver reportviewer is in Updatepanel conditionalmode.Whenever i try to have PostTrigger I try to print report..Can any one Plz tell me how to prrint report whenever reportviewer is in Updatepanel
With regards
Mahender.
mhi
|
|
|
|
|
Dear All,
Can i specify the Popup width and height in percentage instead of pixels.
Ramesh.Kanjinghat
|
|
|
|
|
You can calculate the pixel size using screen.width and screen.height.
var window_width = screen.width * 0.50; // 50% of the screen width
var window_height = screen.height * 0.25 // 25% of the screen height
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
thanX a lot Steve. Simple but a good solution.
Ramesh.Kanjinghat
|
|
|
|
|
Size in % is given regarding the size of the document, so regarding to what, should be given the size of the window, if it is the object you are creating?
if you want to define the size of the window in percentage of the size of the screen, then i think you will have to program it.
|
|
|
|
|
Hey everyone, have a fun one for ya'll
I am about to start working on a C# web service project. The primary goals of this application are to provide a web service interface for a DOS application. The crux of the problem is this application can run for a long time and therefore does not lend itself to a standard system.diagnostic.process mentality within an HTTP session thread.
Ideally, what I would like to have happen is a call is made to a web service, the objects are collected and/or created from that call, and then a call is made to a Windows service that handles the command execution via some kind of queueing mechanism. In other words, I want a web service to make a call to another process (windows service) that will perform the execution of a DOS application in a asynchronous fashion; the web service merely calls a public method in a windows service passing in variables and moves on. This would negate the HTTP timeouts that would normally come into play. An anicallary benefit of this ideology is I can do a 'pulse check' of the queue to determine how the items in the queue are progressing and therefore give the user a progress bar showing outcome.
Before you say it, yeah I know its bloated but the number of submissions to the queue would be very small (less than 20 per day) so scalability is not an issue.
At first blush, named pipes seemed to be the way to go. However, after doing some digging it seems that named pipes were designed more for modifying variables in another process whereas I want to call a method (or more specifically several methods...) in a windows service and then get some kind of response from the method quickly (such as a boolean that says the items were submitted to the queue, not the end result of their execution). More specifically, I want to call one method to submit the items into a queue and then make calls later on to determine the outcome of the items submitted to the queue.
|
|
|
|
|
A named pipe is the perfect solution. You send the request through the pipe to the Windows service, the service acts on the request, and then sends the result back through the pipe to the calling process.
There is no real way to directly call a method in another process, unless both processes are .NET apps and then you can use whatever .NET uses to accomplish that.
The MSDN has some good sample code for creating named pipes and using them.
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
I have a table displayed on a page, each row contains a checkbox, before I hit the "Continue" button to go to the next page, I want to loop through the whole table, and check if any of the checkboxes are checked, if checked, I need to get column 3's value of that row. Multiple checkboxes can be checked,I need to pass a string contains all of the column 3 value, and pass this string to the next page.
I don't know how to loop through a table, and how to contruct and pass this string to the next page.
I don't have any ASP experience, can anyone help me write this?
Thanks so much.
kitty
|
|
|
|
|
I believe you need to give your checkboxes and controls Ids, so that you can get their values out of the form. But, I have to admit that it's a long time since I did ASP, ASP.NET is so much nicer.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
As this has to be done in the browser, it has nothing at all to do with ASP. You have to use client script, i.e. Javascript.
Don't you have any more direct way to identify the fields than to loop through the elements of the document?
If the id of the checkboxes are for example Chk_1, Chk_2, et.c., and the id of the elements in column three are Data_1, Data_2, et.c., you can easily access them directly using document.getElementById.
---
Year happy = new Year(2007);
|
|
|
|
|
I've heard from a post on this forum that getElementsByName was discontinued, and that's a shame because it would have been very easy to retrieve your unique NAME of your checkbox collection into an array and work on this array.
Since it seems to be like this, i now use getElementByTagName to retrieve from the DOM, all tags that correspond to <INPUT> and then work on those whose ID correspond to what i want. First to get a count, and then iterate through id's
Example:
var objdiv = document.getElementsByTagName('DIV');
var contar = 0;
for (i=0;i < objdiv.length; i++)
{
if (objdiv[i].getAttribute("name")=='contentitemdiv_'+wid+windice)
contar ++;
}
for (i=1;i<=contar;i++)
{
var wobjcontentitem = document.getElementById ('contentitemdiv_'+wid+windice.toString()+i.toString());
}
if there's more simple, call me!
|
|
|
|
|
This is my second week using ASP and I've run into some problems with array and split. Please look at the following:
<%Dim x, y, t, z(3)
z = split(t, ".")
x = z(0)
y = z(1)
%>
t = 9.95
I keep getting the following error message:
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
What am i doing wrong???
-- modified at 12:27 Tuesday 16th January, 2007
Ty
|
|
|
|
|
Well, for starters, t has no value.
Why are you learning asp ? It totally sucks. Is there any way you can switch to ASP.NET ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Dear Tyrone_whitey,
Remove the Dim statement and Execute. This solves your problem.
Regards,
Manowj
|
|
|
|
|
i have a static html page.
i have a link in it to download a pdf file.
i want to force download the file, not to open it, when user click on it.
but if user had installed acrobotreader in his/her pc, my link open the file directly. but i dont want to act so. i want file to be downloaded.
thanks
rastgar
|
|
|
|
|
You can't force anything with a static HTML page, I don't believe. You'd have to zip the file.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
how about with javascript?
Thanks
Rastgar
|
|
|
|
|
You can't go too far with JavaScript either. You can open in a new window.
|
|
|
|