|
I've tried your suggestion, but when I put . in after ("txtResult") it does not give me the "value" option. Am I doing something else wrong?
|
|
|
|
|
If the txtResult element is a form field, it has the value property, and does not have the innerHTML property.
If Visual Studio says otherwise, it has simply gotten confused. Perhaps it fails to identify what element you are refering to, and gives you the properties for a generic element. It might also have something to do with the fact that some server elements not always render as the same html tags, but varies with the type of browser.
---
b { font-weight: normal; }
|
|
|
|
|
Hi, I think that Guffa's reply should help you.
I just wanted to note that you can run into troubles by using hard coded ID.
You can get ID rendered by any Asp.Net control using ClientID property.
So it would be better to write it like this:
document.getElementById("<%= txtResult.ClientID %>").innerHTML = “x”;
But this is just a detail
|
|
|
|
|
I would like to have a web page (or any method/language) that will keep running without a client and once a while it will call a function to update data of a MS access database on the web.
Anyone knows how to do it?
|
|
|
|
|
If you want to do it with a web page you'll need a server that queries the db (asp, jsp or php). If you just want a webpage maybe you could investigate to do it with JavaScript or VBScript.
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Hi Marc,
I do have a server to queries my db, the problem is: it only update my db if one client call my site (my asp/htm), but it is too late! It should be update ... let say every one hour before the client using its db!
My better explaination is in the reply for Guffa!
Regards,
|
|
|
|
|
ATC wrote:
The reason is I have a VC++ application that sends to the site new information! I have already a Webpage (*) if someone visits it ... its function will pickup the info. and update a db file!
ATC wrote:
However, if noone visits the site then the info. can not be updated
Why don't you query the db to know the information you need before adding more data?
You could force to update the info by calling a method of your VC++ app that makes the updates you need.
There's a thing that I don't understand: why do you have to update the data/web page before adding more data?
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Hi Marc,
I did try to launch the web page inside my VC++ before, but I did not know how to do it! Fortunately, yesterday night David showed me how to use the ShellExecute command and now I am able to do it (only from this morning)
Therefore as you suggested, I am OK now.
Thanks
|
|
|
|
|
Have you though about using a cron tab?
I use one to run a PHP script once a day, e.g.
wget -O - http://mysite.com/myscript.php
"An education isn't how much you have committed to memory, or even how much you know. It's being able to differentiate between what you do know and what you don't." - Anatole France
|
|
|
|
|
I have not known any thing about your question. I am just a web amateur trying to do some thing
Regards,
|
|
|
|
|
cron is a *nix utility that will execute specified commands at a given interval. wget is a *nix utility that retrieves a webpage. Combined, they do exactly what you're needing. If you run on a Unix/Linux/BSD server, you owe it to yourself to read up on this sort of thing, as it'll make your life a good deal easier.
If you're running on a Windows server, then good luck - i can't offer any relevant advice, though.
You must be careful in the forest
Broken glass and rusty nails
If you're to bring back something for us
I have bullets for sale...
|
|
|
|
|
Hi Shog,
Thanks for the explaination I know a bit more than before, but as you mentioned: I have no luck because my Web Server is Windows Server!
Thanks for trying help, I really appreciate it.
|
|
|
|
|
You can't run a web page without a client. You would need to create a program, put it on the server, and install it in the scheduler to make this.
Are you really sure that you have to update the data even if there is noone visiting the web site? In most cases when someone asks for this, it works fine just to keep track of the time of the last update, and update the data to current values when anyone visits the web site.
---
b { font-weight: normal; }
|
|
|
|
|
Hi Guffa,
Yes, I do want to update even noone visit it! The reason is I have a VC++ application that sends to the site new information! I have already a Webpage (*) if someone visits it ... its function will pickup the info. and update a db file!
However, if noone visits the site then the info. can not be updated. If my other applications from somewhere try to get the update info. through the web ... well, it is not there yet!
What I need is a method (which I do not know how to do it) that can call (*) or some thing can do the same job every one hour ... so that it!
I hope my explanation will make my request a bit more clear!
Thanks
|
|
|
|
|
It is possible with asp.net
or you can send a request to update db from your VC++ program
Where your VC++ sends new info?? I think it'll be good idea to send info via web request right to your site.
|
|
|
|
|
Hi Marc,
I did try to launch the web page inside my VC++ before, but I did not know how to do it! Fortunately, yesterday night David showed me how to use the ShellExecute command and now I am able to do it (only from this morning)
Therefore as you suggested, I am OK now.
Thanks
|
|
|
|
|
HELP!!!!
Am a bit stuck! I have created an email system at work which works fine. I am trying top add in the option to attch a file. The code I have will not save the file onto the server. Also when I include enctype="multipart/form-data" in the form details are not passed to the asp send page:
Code in question;
set upl = Server.CreateObject("SoftArtisans.FileUp")
upl.saveas "global\upload1.out"
mailer.AddAttachment upl.Form("global\upload1.out").ServerName
Any ideas why this will not work?
Regards
GeordieWebProgrammer
|
|
|
|
|
Does your form field really have the name "global\upload1.out"? Like this:
<input type="file" name="global\upload1.out">
---
b { font-weight: normal; }
|
|
|
|
|
No:
Regards
GeordieWebProgrammer
|
|
|
|
|
Use that name when you read the information for the uploaded file, then.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for the help!
I did what you said guffa so the code looks like:
if request.form("attachment")<>"" then
set upl = Server.CreateObject("SoftArtisans.FileUp")
upl.saveas "attachment"
mailer.AddAttachment upl.Form("attachment").ServerName
end if
It does not like the code in bold stating 'cannot call binary read'. Any help?
Regards
GeordieWebProgrammer
|
|
|
|
|
You can't use Request.Form when you are using an upload component. You have to get the form data from the component.
The reason for this is that the form data and the uploaded files both come in the request. They have to be parsed at the same time, and the component does this.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks guffa for your help so far
Regarding not being able to use request.form in the following code:
if request.form("attachment")<>"" then
set upl = Server.CreateObject("SoftArtisans.FileUp")
upl.saveas "attachment"
mailer.AddAttachment upl.Form("attachment").ServerName
end if
are you regarding this to the first line. If so I thought I could use it as it is only checking if theirs some data in the file box on the form page to see whether to add the attachment. If not where abouts are you relating to? Sorry am new to ASP I just started it 2 weeks ago but know alot to do with PHP.
Thanks for your help
GeordieWebProgrammer
|
|
|
|
|
Yes, I am talking about the first line. That is the only place in the code shown where you use Request.Form.
It doesn't matter what you do with the value you read from the form data. If you read anything at all from the Request.Form collection, it will parse the request and discard any uploaded files.
I see that you also changed the file name you use when saving the uploaded file. Is this intentional, or a mistake?
---
b { font-weight: normal; }
|
|
|
|
|
I understand now.
So how will I get thet request to work then will something similar to:
set upl = Server.CreateObject("SoftArtisans.FileUp")
'if statement checking to see if the attachment box on the form has data in it
if upl.form("attachment")<>"" then
'Path where to save tyhe file to
upl.saveas ("global/attachment.out")
'upload the attachment to the email
mailer.AddAttachment upl.Form("attachment.out").ServerName
'end the if statement
end if
but this brings back the error 'Cannot Call BinaryRead' relating to the line bolded out above.
I added comments of what i think is going on if wrong please put me right.
Thanks so far for your help.
Regards
GeordieWebProgrammer
|
|
|
|