|
Thanks NATHAN.
I think it is not the same as trying to click multiple links.
As I know, the process is:
After each submission, the browser waits for the result processed from the server. But the second page (the processing page) return the status code 204 which indicates that no result will be sent back to the browser. So that the browser remains the original html content, nothing has changed, the next submission is a normal submission.
I've tried to use XMLHTTP but there are some constraints.
Firstly it bases on Microsoft component, secondly it cannot open more than one connection at a time, only one connection.
If you have any examples on this, please show me more.
|
|
|
|
|
why not create as many XMLHTTP components as you need?
NATHAN RIDLEY
Web Application Developer
generalgherkin@yahoo.com
|
|
|
|
|
Not simple as you thought. To test the XMLHTTP object I created 2 pages:
1. Destination page : destination.asp
This page is for testing the result, the result is file with numeric name increased one by one. i.e.: 0, 1, 2...
<CODE>
Response.Buffer = True
Dim Index
if Trim(Session("Index")) = "" then
Index = 0
Session("Index") = 0
else
Index = CLng(Session("Index"))
Index = Index + 1
Session("Index") = Index
end if
Dim fs
Set fs = Server.CreateObject("Scripting.FileSystemObject")
fs.CreateTextFile Server.MapPath(Index)
Set fs = Nothing
Response.Status = 204
</CODE>
2.The source page : source.asp
<CODE>
<html>
<head>
<script language=VBScript>
Function xmlhttp_test_single()
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
xmlhttp.open "GET", "http://pcproject/multipost/destination.asp", false
xmlhttp.send
Set xmlhttp = Nothing
End Function
<br>
<font color=000000>
Function xmlhttp_test_double()
xmlhttp_test_single
xmlhttp_test_single
end function
</font>
</script>
</head>
<body>
<form name=frmMain action="http://pcproject/multipost/destination.asp">
<input type=button value=Single onclick="xmlhttp_test_single()">
<input type=button value=Double onclick="xmlhttp_test_double()">
</form>
</body>
</html>
</CODE>
If I click the Single button, one file is created, if loop this step many times, many files are created, one file for one click.
But if I click the Double button, only one file is created.
The Double function looks like creating many XMLHTTP objects.
Could you please explain me why.
|
|
|
|
|
so if I understand this correctly, there are multiple web servers in multiple locations.
firstly, if you are hosting a server on an unreliable leased line circuit, and POSTING some semi-critical data to it, then what do you expect to happen IF you get your form posting to multiple locations BUT one of those locations is down? Seems to me that you app falls flat right there.
Why not go this route......
is there any one server that is not on a leasedline? IE, Fully reliable?
If so, when the form posts and you create your "session" file, create the file on the reliable server, say, as an XML file....
Then, reference this file from your "slave" servers when checking "session"..
These servers would check the "session" using something like this...
set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objHttp.open "GET", "http://www.cdsgrants.com/Content/user.txt", false
objHttp.Send ""
if objHttp.status <> "200" then
Response.write "File Not Retrieved " & sResponse
Else
Response.Write objHTTP.ResponseTEXT & "
"
end if
set objHttp = nothing
|
|
|
|
|
your code should wait for the page to finish loading (after
document.frmMain.submit();<br />
while (document.frmMain.readyState != "complete")<br />
;
though you may have to put this check into a timer, otherwise you will yield no cpu time to the other window, and therefore the document will never finish loading...
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Thanks Philip.
I've tried it but cannot, the readySate is always "complete"
The code look like that:
<br />
var sState = "";<br />
for(var i = 0; i<10; i++)<br />
{<br />
sState = sState + i + document.frmMain.readyState;<br />
frmMain.submit();<br />
sState += document.frmMain.readyState;<br />
}<br />
alert(sState);<br />
I can not resolve my problem till now.
|
|
|
|
|
but do not have a wait loop after the submit checking the state of the document!
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Hi,
I don't know if this is the good board but anyway.
I've created a simple webService that I use in a Windows Application.
I can read data from my database, and I can add or update datas.
Is there a way to allow delete data from a webService. If yes can someone can help me to implement this.
Thx
Sybux
|
|
|
|
|
Your ability to add/edit/delete information from your database shouldn't have anything to do with your webservice. If you're having a problem with deleting, it's most likely a rights problem (as in the process you are running the web service in - likely the ASP.NET default account) needs to have the appropriate rights against your database.
Good Luck
David
|
|
|
|
|
Hi,
the problem is not in regards of rights...
The problem is how to implement a solution
Thx
Sybux
|
|
|
|
|
How can I put value into the ?
did not display the "image.jgp" in the textbox. How can I solve this?
thanks.
|
|
|
|
|
The standard says about file controls: "User agents may use the value of the value attribute as the initial file name." So the browser isn't required to do anything with the value attribute.
|
|
|
|
|
And generally they don't, because otherwise you could write a web page that uploads arbitrary files without the user's consent by simply including a hidden form that is auto submitted via javascript. This would be bad.
--
-Blake (com/bcdev/blake)
|
|
|
|
|
I am working with an Access DB which is used to store customer and order information. Currently, this DB is entirely local, and the info is entered through forms in MS Access.
I am wanting to allow the option of extending the DB system to allow online transaction processing at a future date. I don't know a whole lot about the setup side of things in this area.
I could link to tables in the remote DB, but the tables would then be readonly, and I would not be able to edit them except via the web server. I suppose that only makes sense, because of what would happen if, for example, a record with a certain ID was added on the one copy, and then a record with that same ID was added on the other copy.
So what do I do here?
I've dealt with DBs on a web server, and ordinary Access and SQL databases, so I know how to work with those quite well. I also have head knowledge about client/server DBs on a LAN. But admittedly, I'm a bit of a newbie at remote/distributed database systems.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
IS there an HTML tag or some way of allowing me to vertically center text? I know you can use <center> to horizontally center, but what about vertically centering? Is it even possible?
If your nose runs and your feet smell, then you're built upside down.
|
|
|
|
|
Put the attribute:
valign="center"
in the enclosing tag (table/div/etc).
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Which website has the easiest to follow tutorial to making forums? I have searched google and what not, but I cant find one that is quite what I want. ---Thanks-- =)
1337 is probably the least Elite thing to say.
|
|
|
|
|
There was a time Chris had released the code for the CP forums which we use right now...and some dude ported it over to PHP too...which is always nice...cuz if yer like me....you prefer PHP
This is one option...
I'm drinking triples, seeing double and acting single
|
|
|
|
|
DO you just need a forum for your site, or are you trying to use it to learn more coding skills?
NATHAN RIDLEY
Web Application Developer
generalgherkin@yahoo.com
|
|
|
|
|
workin on my coding skills!
|
|
|
|
|
The code for the CodeProject forums is still available on this site. If you're interested in ASP.Net techniques, I believe I found a forum example at www.asp.net[^] as well.
"Some people are like Slinkies... not really good for anything, but you still can't help but smile when you see one tumble down the stairs."
|
|
|
|
|
Roger Wright wrote:
"Some people are like Slinkies... not really good for anything,
but you still can't help but smile when you see one
tumble down the stairs."
Good one Rog.
-Nick Parker
|
|
|
|
|
I like the new one better...;P
"Your village called - They're missing their idiot."
|
|
|
|
|
Roger Wright wrote:
I like the new one better...
Yup, that one's good too.
-Nick Parker
|
|
|
|
|