|
No, you don't have access to the file system from Javascript. To get that kind of access you would have to start a component in the browser, like an ActiveX component or a Java applet.
---
b { font-weight: normal; }
|
|
|
|
|
I want to change internet options /security from my program in c++
Iam building my webbrowser to let my children to access the internet only from my webbrowser
|
|
|
|
|
|
Hi all,
I am writing a script in JavaScript, where i am putting a wrapper around the basic AJAX.
I have 4 properties here corresponding to the 4 states in AJAX (loading, loaded, interactive, completed) which are initialized with methods provided by the my user. The idea is to call the appropriate methods depending upon the readyState value.
I have a method named MonitorStateChange() and a corresponding property which is initialized with this method. After creating the xmlHttp object, i assign this method as the readystatechange listener.
Now the problem is that when this method is called, it fails to recognize any of the methods of the script and prints them as undefined.
Is it that when the listener calls the method then my class is not alive..
I am confused.. please help.
Thanks in advance.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
Since you didn't post code, i'm going to guess at it:
var wrapper =
{
onloading : loadingfunc,
onloaded : loadedfunc,
oninteractive : interactivefunc,
oncomplete : completefunc,
onstatechange : MonitorStateChange
};
req.onreadystatechange = wrapper.onstatechange;
The problem line is the assignment - no context is kept, so when MonitorStateChange() is finally called, this != wrapper . The solution? How about this:
req.onreadystatechange = function() { wrapper.onstatechange(); };
If i'm way off, post the actual code in question. Good luck!
|
|
|
|
|
Hi Shog,
Thanks for the reply.
I am not sure if the way you suggested would work.
I am using function MyClass(){....} type declaration to declare my class. So, if i want to assign the readystatechange for a particular object, i think, i'll have to use something like
this.xmlHttpObj.readystatechange = this.MonitorStateChange;
Can you please tell me more about the way you have written above. Any reference where i can learn more about it.
Here's my code... I'll highly appreciate it if you can give me some pointers.
Thanks in advance.
function AJAXFramework(OnCompFunc)
{
this.OnLoading = null;
this.OnLoaded = null;
this.OnInteractive = null;
this.OnCompleted = OnCompFunc;
this.SendRequest = SendRequest;
this.xmlHttp = null;
this.SendRequest = SendRequest;
this.MonitorStateChange = MonitorStateChange;
alert("OnCompleted = " + this.OnCompleted);
alert(this.xmlHttp);
function SendRequest(strURL, strType, strParams)
{
if (this.xmlHttp != null && this.xmlHttp.readyState != 0 && this.xmlHttp.readyState != 4)
{
this.xmlHttp.abort();
}
xmlHttp = GetXmlHttpObject();
xmlHttp.onreadystatechange = this.MonitorStateChange;
if (strURL.length > 0)
{
if(strType == "GET")
{
xmlHttp.open("GET", strURL , true);
xmlHttp.send(null);
}
else
if(strType == "POST")
{
xmlHttp.open("POST", strURL, true);
xmlHttp.send(strParams);
}
else
{
alert("Request type has not been specified properly.\nRequest types can be GET or POST only.");
}
}
}
function MonitorStateChange()
{
alert("OnCompleted = " + this.OnCompleted);
if(this.xmlHttp.readyState == 1)
{
if(this.OnLoading != null)
{
OnLoading();
}
return;
}
if(this.xmlHttp.readyState == 2)
{
if(this.OnLoaded != null)
{
OnLoaded();
}
return;
}
if(this.xmlHttp.readyState == 3)
{
if(this.OnInteractive != null)
{
OnInteractive();
}
return;
}
if (this.xmlHttp.readyState == 4 || this.xmlHttp.readyState == "complete")
{
if(this.OnCompleted != null)
{
alert(xmlHttp.responseText);
this.OnCompleted();
}
return;
}
}
function GetXmlHttpObject()
{
alert("Getting xml obj");
var objXmlHttp=null
if (navigator.userAgent.indexOf("Opera")>=0)
{
alert("This example doesn't work in Opera");
return;
}
if (navigator.userAgent.indexOf("MSIE")>=0)
{
var strName="Msxml2.XMLHTTP";
if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
{
strName="Microsoft.XMLHTTP";
}
try
{
objXmlHttp=new ActiveXObject(strName);
return objXmlHttp;
}
catch(e)
{
alert("Error. Scripting for ActiveX might be disabled");
return ;
}
}
if (navigator.userAgent.indexOf("Mozilla")>=0)
{
objXmlHttp=new XMLHttpRequest();
objXmlHttp.onload=handler;
objXmlHttp.onerror=handler ;
return objXmlHttp;
}
}
}
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
1)appSettings
add key="strCON" value="User ID=username; Data Source=Databasename; Password=Password"
appSettings
2)add key="strCON" value="User ID=username; Data Source=Databasename; Password=Password"
3)add key="strCON" value="Provider=SQLOLEDB.1;data source='Computername';Persist Security Info=False;Password=Password;User ID=Userid;Initial Catalog=DataBaseName" />
4)add key="strCON" value="Max Pool Size=75; Min Pool Size=5;Connect Timeout=30;packet size=4096;user id=Userid;pwd=Password;data source='Computername';Initial Catalog=DataBaseName" />
"A winner is not the one who never fails,
But one who NEVER QUITS"
-- modified at 7:06 Thursday 27th April, 2006
|
|
|
|
|
What?
---
b { font-weight: normal; }
|
|
|
|
|
|
|
Dear Sushant Mathur
i hope u know the ways to send mails to people can u please specify, if not plese do not get over-confident on your abilities.
Rizwan Afsar
Associate Member, Technical Team
IAP Company Ltd, Gurgaon
INDIA
www.iap-online.com
"A winner is not the one who never fails,
But one who NEVER QUITS"
|
|
|
|
|
Mr.Vasudevan Deepak Kumar so what are u up to!!!!!!!!!!!!!!!!!
it s none of ur business to interfere in the matters if u are such a knowledgable person and have got a little litracey of technology then u would have found quite helpful things for your project if u are working on , rather cribbing on some foolish things
|
|
|
|
|
rizwan.afsar wrote: it s none of ur business
Of course it is. It's anybodys business as long as you post it in a public forum.
Please try not to express yourself so rudely (even if you have problems with the "litracey"... ).
---
b { font-weight: normal; }
|
|
|
|
|
Hey Rizwan,i saw ur last replay and got to know how cheap and rubbish you can say to a member like Guffa who is always very very helpful to others.
Sushant Mathur
Bangalore,
INDIA.
http://n.domaindlx.com/fun2ssh/HOME.htm
|
|
|
|
|
Rizwan,
The bottomline of the post you have made is that anybody can deduce is that you have made your most humble attempts in expressing your real true color and how mean base attitude you have towars others and in public discussion forums, which I would advise you to amend yourself for the betterment of yourself.
From the set of interesting conversations and 'defensive' strategies that you have made on others only trying to help you out in correcting yourself, the above argument, I guess, gets a more succinct and tangible emphasis.
Had this been triggered by someone else, just to make a hype of the scenario and for a 'time-pass', just understand that this is you being projected in the open and hence becoming the most spoken 'joker of the week' and most visited set of discussion threads and in a more lighter vein, a more humourous reading though.
At the inception, I just thought I would'nt reply to you but later felt that some advise which you may require to amend yourself pointing to your flaws. There is nothing everyone can learn oneself. To err is common. The only thing is that we need to have an open mind and receptive to corrections towards the progress. A sense of hostile attitude never helps anyone and only presents a cold-war scenario.
Had I been a bit harsh, please understand that the underlying thought was to make things clearer for the way to suggest you in what ways a public discussion board can be ethically used for the betterment of all alongside the fact that you need to be more receptive than hostile to anyone.
Elixirs are good but they were never sweet on the first tasting and so are suggestions and advises.
Vasudevan Deepak Kumar
Personal Web: http://www.lavanyadeepak.tk/
I Blog At:
http://www.dotnetjunkies.com/weblog/deepak/ http://deepakvasudevan.blogspot.com/ http://deepak.blogdrive.com/
|
|
|
|
|
Hello All,
I am beginner for Web.
I want to display content of a file in my page. File is of type TXT and it is present in web root directory. I am developing in ASP and target OS are Windows XP and Windows 2000. I have provided a link to that file in my ASP page. When user clicks the link that file has to be opened.
TXT file gets updated with new data frequently and I have to show the latest content of the file. For first time the page is displaying the file content properly. But from then, it is displaying Old content of the file and not updated content of the file.
After analyzing I found that the file is getting copied to Temp Internet folder and it is using the file each and every time for displaying. If i delete the file from Temp Internet Folder or rename it it is working fine. If I manually do Refresh also it is displaying updated content.
Please let me know how to make ASP page to be reloaded each time and not to take from Temp Internet folder using cookies.
Thanks for your time.
Ravi
|
|
|
|
|
Check the settings of the Temporary Internet Files. By default it's something like 10% of the disk space, which can be way too much with the large disks we have today. Set it to some reasonable value, like 50 MB.
It's common that the View Source command stops working because of this. I believe that your problem may have the same reason.
---
b { font-weight: normal; }
|
|
|
|
|
Add Meta tag to html:
<br />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"><br />
Best regards, Alexey.
|
|
|
|
|
Alexey,
I am using ASP. How to implement in ASP this TAG?
I used same code
alexey N wrote:
in ASP but the result is same.
Regards
Ravi
|
|
|
|
|
Ough, I forgot, it must be inside tag.
<br />
<html><br />
<head><br />
<title>Untitled Page</title><br />
<meta http-equiv="Pragma" content="no-cache"> <br />
</head><br />
<body><br />
...<br />
</body><br />
</html><br />
<br />
<br />
Best regards, Alexey.
|
|
|
|
|
I updated the code as you told but result is same I am giving the code here. Let me know where is the problem
<%@ LANGUAGE="VBSCRIPT" %>
<%Dim ValueRad%>
<%ValueRad = Request.Form("RadBtn")
Response.Write "ScenarioName = " &ValueRad%>
<%Dim ObjIpIvrWebCom%>
<%set ObjIpIvrWebCom = Server.CreateObject("IpIvrWebCom.WebCom.1")%>
<%Dim retVal%>
<%retVal = ObjIpIvrWebCom.GetLogFilePath(ValueRad)%>
<%retVal = "SampleBanking.txt"%>
<%Response.Write "retVal = " &retVal
if (retVal <> "") then
%>
Scenario ID <%= ValueRad %>'s file log
<%End if%>
<%set ObjIpIvrWebCom = nothing%>
Thanks
Ravi
|
|
|
|
|
If server sends to browser header with request for caching, the meta tag on browser page willbe ignored. For prevent caching you can dtnamically change url of page (for change url you can use sessions). Also you can refresh page immedeatly after load.
Best regards, Alexey.
|
|
|
|
|
|
Got two tables in a MDB tblUser, tblWOL
Need to with one form UserN, Pass, name, surname be able to insert a record in tblUser and a record with the UserN in the tblWOL.
I can use Dreamweaver to insert into the tblUser table, but how do I add another piee so that it inserts a record into the tblWOL as well without any further User interaction?
I get a problem about "must have another form"Dreamweaver seemingly only allows ONE insert/update/delete per form and only allows to do it into/from ONE table in the DB?
Any help please?
this is me
|
|
|
|
|
I get this error every time I edit one of my usercontrols.
Compiler Error Message: CS0433: The type 'ASP.account_userctrls_info_ascx' exists in both 'c:\WINDOWS\...\App_Web_py_x3jg-.dll' and 'c:\WINDOWS\...\App_Web_ik0rrcm_.dll'
To get past this I have to rebuild the solution every time this occure. That takes a lot of time now when my project is very big.
How can I get this error to disappear?
Is there a setting that can fix this?
Thanx!
|
|
|
|