|
Hi, all:
I'm developing a feature for our software which can block a list of websites. For internet explorer, I chose the BHO technology. I've written a little BHO.dll which is loaded when internet explorer is launched. When user types a website address in the address bar and hit enter, I check the address to find out whether it is in the block list. If in the list, the internet explorer will be directed to a simple page containing "this website is blocked."
It works and I get desired feature.
But BHO.dll is loaded into each internet explorer's address space and it sometimes conflicts with IE. Maybe it's not a good method.
I notice IWebBrowser2 can also implement my feature. Then, to my feature, which one is better?
I have to think about firefox and other IE-cored web browser. Where can I find some help to implement my feature?
Thank you very much!
|
|
|
|
|
Suppose there's a paragraph on the page which contains several lines of words. How can I highlight those words one by one, from the first one to the last one? It's just like reading through the paragraph.
I think I have to use TextRange object and its getClientRects method.
Could anyone help me? Very appreciate.
Thanks
Jie
Edit/Delete Message
|
|
|
|
|
Hello all,
Sub: Duplicate Mails - Generated on press of Refresh button in Browser.
HOW TO VALIDATE THIS IN ASP not ASP.NET.
We created a application code using asp vb script which sent mail with attachment once the people proceeds for order.
The problem we are facing is we are getting duplicate mail after once we refresh the confirm button.
so we are getting more mails when ever we refresh the pages. This should be stopped.
Please advice.
Thanks and Regards,
kris
If you fail for the first time , call it version 1.0.
|
|
|
|
|
Could you stick a MailSent flag in the database whenever the confirmation mail has been sent and then don't send any further mails after that?
|
|
|
|
|
Thanks for the attention ..
but i am afraid that is not an option because we are not
permitted to alter the database which is stabilised and is
replicated elsewhere.
I have to find out a solution from the fromt end..
may be browser related or something like that..
If you fail for the first time , call it version 1.0.
|
|
|
|
|
i have server control named "ddl_xx" and i am having the list of countries in it(includes an item 'Others').If the user Choose others, there is a "txt_others" textbox.
i need to validate when the user choose others in "ddl_xx" the txt_others should not empty?
I have used custom validator
and i have coded as follows in javascript and called the function in custom validator control by setting the property client validation with javascript function name...
function ddl_PCountry_val(oSrc,args)
{
alert("dd");
if (args.Value=="-Select-" || args.Value=="")
{
args.IsValid=false;
}
else if (args.Value=="Others")
{
if(document.Form1.txt_Other_PCountry.value=="")
{
args.IsValid=false;
}
else
{
args.IsValid=true;
}
}
else
{
args.IsValid=true;
}
}
Problem: Java script function is not called when the page is submitted
Jesuraj
|
|
|
|
|
from where you are calling the script?
Have you give the proper name withought spelling mistake??
Arte the values of the parameters are catching in the function??
Just alert them in the beginning.
|
|
|
|
|
ya thank u
i got it.
i didn't bind the value property of "ddl_Cntrl" while bind the country names to it.
so the custom validator not getting the args.Value correctly
thank u very much for ur reply
Jesuraj
|
|
|
|
|
Hello, I"m not really sure if i'm in the right forum. If you can direct me to the right forum, I will just have it posted again. Thanks!
I am accessing my rdl file in a user control which accepts parameters. Is it possible to combine rdl (controls accepting parameters) and my own user defined controls inside the usercontrol?
How do I add parameters taken from my usercontrol controls when clicking 'VIew Reports' from the .rdl?
Thanks!
|
|
|
|
|
I'm working in Visual Studio 2003 and I'm trying to add a web project to a solution. When I right-click on the solution and select "Add Existing Project From Web," I get a dialog that
says "Enter the URL of the server that you want to add the project from:" that is prepopulated
with "http://localhost."
When I click "OK," the "Add Existing Project" dialog comes up with the "localhost" folder selected, showing all my virtual folders. I then double click my virtual folder, and expect to see the project files (*.csproj). Instead I see nothing, but the project file is present in the folder. If I type in the URL to the project file, I get a message saying that "Documents in this folder are not available.
I have tried re-installing ASP.NET on IIS with ASPNET_regiis, to no avail. Please help.
|
|
|
|
|
try "Add Existing Project" instead if you have a project-file (.csproj) in your web-app. This should do
|
|
|
|
|
I did, and it works, but there is still something wrong, that I can ignore to get work done, but cannot stop bugging me.
|
|
|
|
|
Following code is written in a file called uploader.asp
response.Buffer=false
Response.Write( "Uploading File " )
Dim filename1, fso, strReturn, sUser,fileToSave
Set fso = Server.CreateObject("Scripting.FileSystemObject")
filename1 = Request.Form("fileUpload1")
fileToSave=Request.Form("currFolder")
If Not fso.FileExists(filetoSave) Then
Dim adoStream
Set adoStream = Server.CreateObject("ADODB.Stream")
adoStream.Mode = 3 'read write
adoStream.Open
adoStream.Type = 1 'adTypeBinary
adostream.loadfromfile filename1
adoStream.Position = 0
adoStream.SaveToFile Request.Form("currFolder") & "Test1.txt" , 1 'adSaveCreateNotExist
adoStream.Close
Set adoStream = Nothing
Response.Write( "File saved.")
Else
Response.Write( "File already exists.")
End If
This code wors fine on local IIS server but when i uploaded this to a webhosting server its giving me error at this line "ADODB.Stream error '800a0bba' File could not be opened."
adostream.loadfromfile filename1
Can any one tell me the solution please.
thanks
Naveed Kamboh
|
|
|
|
|
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'
|
|
|
|