|
i am getting xmlhttp.status=0 instead of 200 which means data is ok . please help me out .
<html>
<head>
<script type="text/javascript">
var xmlhttp
function loadXMLDoc(url)
{
// code for Mozilla, etc.
if (window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest()
xmlhttp.onreadystatechange=state_Change
xmlhttp.open("GET",url,true)
xmlhttp.send(null)
}
// code for IE
else if (window.ActiveXObject)
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
if (xmlhttp)
{
xmlhttp.onreadystatechange=state_Change
xmlhttp.open("GET",url,true)
xmlhttp.send()
}
}
}
function state_Change()
{
// if xmlhttp shows "loaded"
if (xmlhttp.readyState==4)
{
// if "OK"
alert(xmlhttp.status);
if (xmlhttp.status==200)
{
alert("XML data OK")
document.getElementById('A1').innerHTML=xmlhttp.status
document.getElementById('A2').innerHTML=xmlhttp.statusText
document.getElementById('A3').innerHTML=xmlhttp.responseText
}
else
{
alert("Problem retrieving XML data:" + xmlhttp.statusText)
}
}
}
</script>
</head>
<body onload="javscript:loadXMLDoc('menu.xml')">
<h2>Using the HttpRequest Object</h2>
<p><b>status:</b>
<span id="A1"></span>
</p>
<p><b>status text:</b>
<span id="A2"></span>
</p>
<p><b>response:</b>
<br><span id="A3"></span>
</p>
</body>
</html>
my xml file is menu.xml which is
<?xml version="1.0" encoding="UTF-8"?>
<courses>
<topic>
<topicname>Search</topicname>
</topic>
<topic>
<topicname>Lubrication Fundamentals</topicname>
</topic>
</courses>
-- modified at 8:33 Friday 26th May, 2006
|
|
|
|
|
can anyone give me the approach to download a file from a ftp server using multithreding. (i.e. separate threads for downloading simultaneously USING JAVA)
VIVEK
|
|
|
|
|
Hi, I dont use java... but... what you need to do is incorporate your pasv port process inside a thread.. i dont know for sure about the rest.. they may or may not have to be in a thread...
|
|
|
|
|
sorry pasv port is ftp socket.... basically just the socket which connects must be in a thread and possibly even the file write process...
|
|
|
|
|
How Can I assign the js variable to php variable?
Programistebo saqartvelosi sheertdit
|
|
|
|
|
You have to pass a variable to a server side script (PHP) using one of the following methods:
1) GET
2) POST
3) Cookie
HTML FORM's are typically sent using POST (as the amount of data you are allowed to submit is likely virtually infinite) however if you have a variables passed in Javascript, you will likely want to use GET.
var jscript_var = "Some value";<br />
<br />
location.href="index.php?jscript_var="+jscript_var;
YYou could also use cookie or post, but POST would be awkward without AJAX and Cookies are more permanent...
The above code shows you how to pass a variable though
HTH
Cheers
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
Thank you Hockey.
Programistebo saqartvelosi sheertdit
|
|
|
|
|
i want develop login application which consists of name and pwd textboxes.with submit btn
when i enter a name it should be checked with database table.i want to enter unique name and pwd for every user.
and even they should be able to change their pwd
can anyone tell me code for this using asp.net and vb.net
|
|
|
|
|
In .Net 2.0 you have a login control. You may develop a page to change the password.
I'm on a Fuzzy State: Between 0 an 1
|
|
|
|
|
How do I display thumbnail images in multiple rows from images stored in the database? I want to show up to 5 thumbnail images in each row in seperate cells from the database and the header cell to span all 5 cells.
How do I display the enlarged image after clicking on the hyperlink through pop up ?
Thanks,
Arpita
|
|
|
|
|
Shared DLL assembly that will be used by 100's of web apps.
What is the best way to deploy this shared assembly, considering the shared assembly version is not fixed... it is still in ongoing development and may need to be updated once per month with new functionality.
GAC? this would mean regression testing the dependent apps(100's) for each new version.
/bin folder? this would mean multiple versions of the shared assembly in use at any 1 time.
Any other methods?
What deployment method is best?
thanks.
|
|
|
|
|
Hi,
thank you for your attention,here is my problem:
I have write an applet for tv topset, means that the applet must get input focus when applet start,I have tried to call requestFocus() in start() method of applet ,but it's nouse,current situation is that the applet appears when I start it on IE,but I have to click on it to "active" it input focus.
How can I get the applet response to keyboard automatically,'cause the TV topset without mouse
thank you.
-- modified at 7:45 Thursday 25th May, 2006
|
|
|
|
|
Hi,
I am using pure html and opening a word file in the browser.
Whenever i click on the link to open a file it shows a dialog saying if i want to save the file or open it.
Is it possible to supress the dialog and just open the file and viewing the contents in a frame.
I want to open trhe file in browser window only.
I can use javascript also but dont know how, if someone can please provide me with the appropriate code it would b gr8.
Thanks.
Deepak Surana
-- modified at 2:06 Thursday 25th May, 2006
|
|
|
|
|
hi
just use that word file path into navigating url inside the .... tag
ranandbe
-- modified at 8:12 Thursday 25th May, 2006
|
|
|
|
|
If you can explain it a little , i am unable to get what you siad. sory.
|
|
|
|
|
Hi all,
I have a very weird problem:
I have a web page (myfeeder.asp) to generate very simple xml content. I use ie to navigate to the page, I can see the xml content on MOST of the pc. the xml like:
<?xml version="1.0"?>
<ads>
<ad>
content here.
</ad>
</ads>
My problem is, I CAN NOT get the xml content from some of web server's IE. what I got is nothing or just the structure, like below. It also happpends to some linux server.
<?xml version="1.0"?>
<ads>
<ad>
</ad>
</ads>
I know the server/pc that can not get the xml content is using re-writing.
I have no idea what cause the problem!!
Does any one have the same experience!!! Please help me to solve the problem!!!!
Thanks in advance!!
Alan Shen
MCAD for .NET Version
^~^~^~^~^~^~^~^~^~^~^
Great idea is the beginging of success!
-- modified at 23:09 Wednesday 24th May, 2006
|
|
|
|
|
Hi, folks!
I'm building a table of data, retrieved from a database. One of the fields is boolean and I want to set/unset a checkbox in my table depending upon the value in the data table (which is of type bit).
Here's what I have so far...
<br />
oCell = oRow.insertCell();<br />
oCell.align = "center";<br />
oCell.style.fontSize = "12";<br />
oCell.style.fontWeight = "normal";<br />
oCell.style.border = "thin black solid";<br />
sTag = "<INPUT type='checkbox' id='cb" + i++ + "'>";<br />
aElement = document.createElement (sTag);<br />
aElement.checked = Rs("AllowEmail");<br />
oCell.appendChild(aElement);<br />
but this does not work. I get the checkboxes ok, but I can't set them, even if I explicitly say aElement.checked = true; So, how do I access the checked property?
TIA!!
'til next we type...
HAVE FUN!! -- Jesse
|
|
|
|
|
Hmmm, seems like that should work, but.....have you tried:
<code>
sTag = "<INPUT type='checkbox' id='cb" + i++ + "'";
if (Rs("AllowEmail"))
sTag += " checked";
sTag += ">";
aElement = document.createElement (sTag);
oCell.appendChild(aElement);
</code>
<hr>- <b>S</b>
<small>50 cups of coffee and you know it's on!</small>
|
|
|
|
|
Steve Echols wrote: but.....have you tried
Hey, that works if you put ==true in the if statement! Thanks a bunch!
I'm still not sure why my method fails; maybe the input element does not yet exist until it's appended to the cell.
Just tried an experiment and the conjecture in the previous paragraph is correct!
This properly checks the boxes:
<br />
sTag = "<INPUT type='checkbox' id='cb" + i++ + "'>";<br />
aElement = document.createElement (sTag);<br />
oCell.appendChild(aElement);<br />
if (Rs("AllowEmail") == true) aElement.checked = true;<br />
But this does not:
<br />
sTag = "<INPUT type='checkbox' id='cb" + i++ + "'>";<br />
aElement = document.createElement (sTag);<br />
if (Rs("AllowEmail") == true) aElement.checked = true;<br />
oCell.appendChild(aElement);<br />
So, problem solved and I've learned something new. Once again, my thanks to the gurus of CodeProject.
'til next we type...
HAVE FUN!! -- Jesse
|
|
|
|
|
Hi,
I want to know the working of Web Browser. What happens when user write any URL in any browser. I want to know all steps from URL resolving to getting requested page.
bye
Thanks and Regards,
Chandan
|
|
|
|
|
Well, you've asked a rather broad question that cannot possibly be answered fully in 1 post. There is huge amounts of information online about the Hypertext Transfer Protocol (HTTP) which is what you are after.
In brief, a web browser works along these lines:
1) User types a URI in the address line, or perhaps clicks on a URI.
2) The browser sends a request to that URI for the content.
3) The content is returned to the browser
4) The browser attempts to parse and display the returned data.
It is this request-response mechanism that makes the web work.
One of my favourite websites for this sort of thing is www.howstuffworks.com
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Sounds like a homework question to me....try google
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
I have made a custom control , inhereted from
System.Web.UI.Control
I want to add a collection property in this control
but i can't do it ...
If any one have some peice of code help me ........
public class MyCollection: System.Web.UI.Control, INamingContainer
{
System.Collections.ArrayList _item ;
public MyCollection()
{
_item = new System.Collections.ArrayList ;
}
public System.Collections.ArrayList Items
{
get{
if (_add==null)
this._add = new System.Collections.ArrayList ();
return _add;
}
set
{
this._add = value;
}
}
}
|
|
|
|
|
Any ideas?
Thanks.
|
|
|
|
|
Ideas? Tons...
Look into Huffman compression, as it's fairly easy to implement...
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|