|
Any Time DUDE
If It Helps Click It as Answer
|
|
|
|
|
Hi all,
I Develop one application in which i want to load XML file from client machine using javascript and process its nodes.
How can i load XML file which is stored at client machine into my application???
Thanks in advance...
Krishnraj
|
|
|
|
|
Javascript does not have the power to to access the file system.
you will need to use ActiveX which will read the file for you.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi manas,
First-of-all thanks for reply...
Do u have any idea regarding the kind of ActiveX available which read the xml file from client machine as i have a short deadline??
Thanks Again buddy..
Krishnraj
|
|
|
|
|
Krishnraj wrote: Do u have any idea regarding the kind of ActiveX available
var xmlDocument = new ActiveXObject("Msxml2.DOMDocument.3.0");
xmlDocument.load(src);
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
pass the xml string to this function and get the Document object. After that you can call GetElementsByTagName to get nodes
function(text) getXMLDocument {
try {
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = "false";
xmlDoc.loadXML(text);
}
catch (e) {
try {
var parser = new DOMParser();
xmlDoc = parser.parseFromString(text, "text/xml");
}
catch (e) {
alert(e.message);
return;
}
}
return xmlDoc;
}
var doc = getXMLDocument('<abc><item>xx</item><item>gg</item></abc>');
var elements = doc.getElementsByTagName('item');
I think this is what you needed.
|
|
|
|
|
Dear Experts,
I'm developing a web application & I'm using a thick-box as a container to display my popup page.
Issue: when ever the user clicks out of the pop up page, i.e pop will be having only 2 or 3 fields with 2 buttons and its displayed as a child page on the main page at the center of the screen, the pop up page gets closed when the user clicks anywhere out side the popup window.
Is there any way to restrict the mouse click outside the popup page? i.e i want to disable the mouse click outside the popup page.
would be very happy to receive the responses and any suggestions would be appreciated.
Thanks in advance
Murali..
|
|
|
|
|
|
Thanks for your reply...
a thick box class acts as a container, and i'm loading normal aspx page in that container.
http://www.webreference.com/programming/javascript/Thickbox/[^]
check the above link and click on any image in that and u'll get the clear picture of what i'm speaking about.
even in the above site example, when u click outside the popup image, it tends to vanish. (Thats my problem)
it should not close untill close button is clicked.
|
|
|
|
|
Hey .. Actually its just a library that does this. I have seen the code of thickBox 3.1 and it seems to me
$("#TB_overlay").click(tb_remove);
in tb_show is the culprit. Actually it is done programmatically so you cant do it if you dont disable the lines.
Just comment those lines in js file and you are done. Otherwise change the js according to your need.
|
|
|
|
|
Thanks a lot Abhishek..
it worked... , by commenting that line in .js file does it affects any where else?
Thanks a a lot again..
Murali
|
|
|
|
|
I dont know budd.. Well, but if you see any close button which closes the popup, I think there must not be any problem. The code is just used to add an eventhandler for the transparent background..
I never used the control, but just read the code and found out where it is done..
|
|
|
|
|
Thanks buddy.. i dont think commenting those lines would effect..
|
|
|
|
|
use the following script where div1 is the id of popup and its height=100px n width =200px
<script type="text/javascript">
function s(e)
{
var x=event.clientX;
var y=event.clientY;
if((x<200||x>400)||(y<200||y>300))
document.getElementById("div1").style.display="none";
}
document.onmousedown=s;
function show()
{
document.getElementById("div1").style.display="block";
}
</script>
regards
Ankur Sharma
ankursharma.niit@gmail.com
|
|
|
|
|
Hi All,
I want to enhance my skill set i have experience in ASP.Net(C#) and window application. So i want to know what should i learn (WPF,WCF,Silverlight) so that it helpful for my career
Sorry if this is wrong place but i find so many expert here
Thanks,
Rajesh
|
|
|
|
|
Yes, this is obviously the wrong place. WPF seems like a winner to me, but Silverlight piggy backs your ASP.NET experience nicely, so I'd say start there.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hi,
now a days flex is coming up nicely its a adobe product so this is very useful with java ..Adobe also released flex for .net ..
what is chances of Flex with .net
Thanks
rajesh
|
|
|
|
|
I m working on a web application in which i want users to upload their files.
while testing this function i m not able to upload files more than 1.5MB in size.
other files of small size get easily uploaded.
the only reply i get is
"Internet Explorer cannot display the webpage"
modified 6-Jun-21 21:01pm.
|
|
|
|
|
I guess you need to configure your web.config to give the file size.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
try this in system.web tag in web.config file....
<httpruntime executiontimeout="900" maxrequestlength="10000"
="" requestlengthdiskthreshold="80" usefullyqualifiedredirecturl="false" minfreethreads="8" minlocalrequestfreethreads="4" apprequestqueuelimit="5000" enablekerneloutputcache="true" enableversionheader="true" requirerootedsaveaspath="true" enable="true" shutdowntimeout="90" delaynotificationtimeout="5" waitchangenotification="0" maxwaitchangenotification="0" enableheaderchecking="true" sendcachecontrolheader="true" apartmentthreading="false">;
in this maxRequestLength="10000" set the maximum size of file to upload in MB
|
|
|
|
|
Hi,im using a standard ASP.NET AJAX to run methods from my webservice.
I learned how from asp.net's website.
The problem im having is that sometimes(and only sometimes) when two people load the site at the same time, one of them will just freeze and will never receive the result from the WS.
Heres the error that the browser catches:
if (!result || typeof(result.d) === "undefined") {
throw Sys.Net.WebServiceProxy._createFailedError(methodName, String.format(Sys.Res.webServiceInvalidJsonWrapper, methodName));
}
What I cant understand is why it sometimes works fine, and other times not.
Thanks.
Strive to be humble enough to take advice, and confident enough to do something about it.
|
|
|
|
|
Sounds like a race condition to me.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hmmm, looks like it could be but theres nothing too complicated about it and theres no shared resources
Strive to be humble enough to take advice, and confident enough to do something about it.
|
|
|
|
|
Any help on this error??
This happens when I run the server with ID_A and try to run the client with ID_B .. this is an attempt to try impersonation
System.TypeInitializationException was unhandled
Message="The type initializer for 'System.Runtime.Remoting.Identity' threw an exception."
Source="mscorlib"
TypeName="System.Runtime.Remoting.Identity"
StackTrace:
Server stack trace:
at System.Runtime.Remoting.Identity.RemoveAppNameOrAppGuidIfNecessary(String uri)
at System.Runtime.Remoting.IdentityHolder.MakeURIKey(String uri)
at System.Runtime.Remoting.IdentityHolder.ResolveIdentity(String URI)
at System.Runtime.Remoting.RemotingServices.GetServerTypeForUri(String URI)
at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.Object.FieldGetter(String typeName, String fieldName, Object& val)
at ns_application.ns_client.cls_client.Main(String[] args) in D:\Vishwjeet\Study\Remoting_tcp\ConsoleApplication2\client.cs:line 64
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.Security.Cryptography.CryptographicException
Message="Unknown error \"-2146893801\"."
Source="mscorlib"
StackTrace:
at System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr)
at System.Security.Cryptography.Utils._AcquireCSP(CspParameters param, SafeProvHandle& hProv)
at System.Security.Cryptography.Utils.AcquireProvHandle(CspParameters parameters)
at System.Security.Cryptography.Utils.get_StaticProvHandle()
at System.Security.Cryptography.RNGCryptoServiceProvider..ctor(CspParameters cspParams)
at System.Runtime.Remoting.Identity..cctor()
InnerException:
|
|
|
|
|
Are you using System.Diagonistic.Process classes to implement impersonation?
Have you placed this in your web.config
<identity impersonate="true"<br />
userName="domain\user" <br />
password="password" />
This might help u...
http://support.microsoft.com/kb/306158[^]
I think the actual problem is CryptographicException when running impersonation.
It is very hard to find the actual problem from this.
|
|
|
|