|
Are you sending the destingation folder as form data? Do you realise that this allows for anyone to copy a file anywhere on the server?
You are not using the same filename to check if the file exists, as you are using to save the file. Any special reason for this, or is it a mistake?
What kind of data are you sending to the page? Physical paths? Absolute or relative? Where do they point to? Do the folders exist on the server?
---
b { font-weight: normal; }
|
|
|
|
|
Yes sir, all folders exists on the server,
I even dont know about the data types u are talking about in the following lines
What kind of data are you sending to the page? Physical paths? Absolute or relative? Where do they point to? Do the folders exist on the server?
Basically i am using ADODB.Stream to upload files from local computer to the webhosting server.
We need to upload large files to the server.
I have developed a system which will create users folders and they will go to there designated folders only.
In those folders they can upload large files like fils of 70mb or more.
Can you guide me where i am worng.
thanks
Naveed Kamboh
|
|
|
|
|
You are not uploading files, you are copying files. It only works as long as the server and the client computer is in the same local network. When you put the application on an external web server, they are no longer in the same local network, so the server can not reach the file on the client computer.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks, I know what do you mean.
So where Can I find something related to Uploading?
Which could allow me to upload large files in a fastest way.
Naveed Kamboh
|
|
|
|
|
Use the FileUpload control to upload files to the web application.
---
b { font-weight: normal; }
|
|
|
|
|
|
|
I have created a Class Library and within the class library I have a Windows Form. I compiled this class library and got the dll. This dll is now embedded on a HTML page using:
<object id="ndcObj" classid="http://nh-rajen/ntest/NDCDemo.dll#NDCDemo.NDCDraw" height="356" width="367">
Now I need to call a method within this dll from javascript within the page, lets say I do it onClick of a button on the page as:
function ChangeText()
{
ndcObj.setText('Test Text');
}
This however does not work and I get the error that the object has no such defined properties or methods. How do I expose my method such that I can call it from outside of the dll. The current method definition for setText is:
public static void setText(string txtValue)
{
this.textBox1.Text = txtValue;
}
Please help me out..
Thanks in advance,
Cheers,
Rajen
|
|
|
|
|
I had the same problem:
this can help: com interop[^]
or you can do what I did (depending on the dll and what you have to do with it):
Create a exe that calls your dll (call that exe from your javascript). In my case it was a solution because it was pretty straight-forward, but it's not suitable for more complex stuff.
|
|
|
|
|
Hi there,
I want to check if there is white space at the first position of the text box or not, if it is then it should return false else true.
Now my problem is it return me true if there is no white space at first position but even it return false it go to next page. With this question i am writing those two functions that i used in Javascript.
/* Purpose : To check if the given value at the time of add new record is appropriate or not for Resource.
* Argument : Form Name
* Return : True or False to main form
*/
function validateres(Resources)
{
preset = document.Resources;
if(preset.res_name.value == '')
{
alert("Please Fill The Name of the Resource");
preset.res_name.focus();
return false;
}
else
{
if(preset.res_addr.value == '')
{
alert("Please Fill The Address of the Resource");
preset.res_addr.focus();
return false;
}
else
{
if(preset.res_con_per.value == '')
{
alert("Please Fill The Contact Person of the Resource");
preset.res_con_per.focus();
return false;
}
else
{
if(preset.res_con_no.value == '')
{
alert("Please Fill The Contact Number of the Resource");
preset.res_con_no.focus();
return false;
}
else
{
name = document.Resources.res_name.value;
addr = preset.res_addr.value;
conper = preset.res_con_per.value;
conno = preset.res_con_no.value;
desc = preset.res_desc.value;
if(check_space(name) == true)
{
if(check_space(desc) == true)
{
if(check_space(addr) == true)
{
if(check_space(conper) == true)
{
if(check_space(conno) == true)
{
alert("Record is Added");
return true;
}
}
}
}
}
else
{
alert("space false");
return false;
}
}
}
}
}
}
/* Purpose : To check if the given value have white space at the first place or not.
* Argument : Field value.
* Return : True or False to the above function
*/
function check_space(field)
{
if(field.charAt(0) == ' ')
{
alert("Spaces are not allowed");
alert("false");
return false;
}
else
{
alert("true");
return true;
}
}
Please reply me as soon as possible.
|
|
|
|
|
How you are using this javascript function i.e where you are calling this?
hiral_shah wrote:
Please reply me as soon as possible.
If not then..
Best Regards,
Apurva Kaushal
|
|
|
|
|
Thank you for the Response
i am calling it from HTML page named 'Resources'
|
|
|
|
|
Are you using return keyword there?
Best Regards,
Apurva Kaushal
|
|
|
|
|
|
Thank you Apurva my problem has been solved. now i wrote else part of each if and it start working properly.
thank you once again for your concern...
|
|
|
|
|
always welcome..
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hello All,
I'm trying to install Mambo CMS on my website but I have some problems with that. if someone had used it please help, here are my questions:
I need to install drop down menu. Like, on hover to get the submenu.
I found some modules of this and when installing them on mambo i get error like this:
SQL error: DB function failed with error number 1264
Out of range value adjusted for column 'moduleid' at row 1 SQL=INSERT INTO mos_modules_menu VALUES ('', 0)
SQL =
INSERT INTO mos_modules_menu VALUES ('', 0)
and besides in menu manager i can't add new menu. after clicking save it say:
mosmodule::store failed Field 'content' doesn't have a default value SQL=INSERT INTO mos_modules('id','title','position','published','m odule','params','iscore') VALUES ('','ds','left','0',mod_mainmenu','menutype=ds','0 ')
so please help, if anyone have any ideas why should this happen.
thank you.
Programistebo saqartvelosi sheertdit
|
|
|
|
|
Hello!
Very simple question! my aim is to detect ALT PRTSCN keys with java scripting. Is it possible to disable this keys when a web page is active (browsed)?
Thanks
Bedri.
|
|
|
|
|
Hello Bedri,
simple question, simple solution
Write an event handler for keyup, keydown or keypressed. Here you can check event.keyCode.
If its 18 -> alt pressed, if its 44 -> PrintScreen pressed.
For all other keycodes do an alert (event.keyCode);
Stephan
\\\| \\ - -
( @ @ )
+---------------oOOo-(_)-oOOo-----------------+
| Stephan Pilz stephan.pilz@stephan-pilz.de |
| <a href=www.stephan-pilz.de>www.stephan-pilz.de</a> |
| ICQ#: 127823481 |
+-----------------------Oooo------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)
|
|
|
|
|
I'm really lost this time. I want to know how can I make
my site to display how many people are currently online and viewing my
site. And don't even know how to call this, so I wasn't able to search for
it on the Internet or elsewhere. I thought I can solve the problem with PHP
and AJAX or something, but I concluded that I cannot (or can I). Maybe it's
achieved by a server side App. I really don't know. So I'll be thankfull
if someone provides me with a solution to my problem.
I like math, but they are forcing me to hate it.
|
|
|
|
|
Hello!
It is all about defining the application variables in global.asa file. It is very simple see the codes for global.asa file below. And then you can use application variables in any pages as Application("CurrentUsers") etc. examine the code below... However your IIS server sometimes can reset the application variables when it gets restarted that what happens. Therefore I advice you to keep values in the database.
GLOBAL.ASA FILE
Sub Application_OnStart
Application.Lock
Application("Visitors") = 0
Application("CurrentVisitors") = 0
Application.UnLock
End Sub
Sub Session_OnStart
Application.Lock
Application("CurrentVisitors") = Application("CurrentVisitors") + 1
Application("Visitors") = Application("Visitors") + 1
Application.UnLock
End Sub
Sub Session_OnEnd
Application.Lock
Application("CurrentVisitors") = Application("CurrentVisitors") - 1
Application.UnLock
End Sub
|
|
|
|
|
Thank you. It cleared the things for me a bit.
Unfortunatelly I don't know anything about ASP and VBScript, but
with the help of the info you've given me now I have an idea what to look for
and with a little luck I may learn how to do this. The problem is I'm using
PHP and I was searching for a solution in PHP. Is there a way I can do this using PHP? If there isn't, I guess I'll have to install ASP, but then how am I going to make it work with my PHP pages?
Thanks again. I appreciate your help.
Damn, sleep is so unefficient. I don't want to go to bed. But I must.
|
|
|
|
|
It has nothing to do with PHP. It doesn't matter if you are going to use PHP or ASP. It is the concept how global.asa is processed by IIS. In your PHP script you can directly use Application("currentVisitors") variable.
The global.asa file should reside under the root directory. It is mandatory.
I don't think there will be any problem.
|
|
|
|
|
Sorry, I forgot to mention that I'm using Apache 1.3 .
And now I have to install perl and mod_perl or something like that.
Then I'll be able to use Global.asa and ASP, atleast I think so.
Unfortunatelly I'm not a sysadmin and it will prove difficult for me
installing this although it's under Windows.
So much work, yet so little time.
|
|
|
|
|
i want to enable one of the security setting in Custum Level of Trusted Site zone in IE.How can we do it programatically.
|
|
|
|