473,386 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

A Script for entering data onto a web page

Hi All,

I need to find a way to enter data contained in a text file onto a web page, without having to type it all in, like the old windows recorder program would let you do.

Can anyone help?
Oct 6 '07 #1
13 2384
gits
5,390 Expert Mod 4TB
hi ...

welcome to TSDN ...

could you explain it in more detail? do you want to create webpage-content from the textfile or read it in at the clientside?

kind regards
Oct 7 '07 #2
hi ...

welcome to TSDN ...

could you explain it in more detail? do you want to create webpage-content from the textfile or read it in at the clientside?

kind regards
Its a clientside process I need. I want the web page to read the data from the file into its text boxes, and the ability to push one or two buttons automatically, and when all data has been read, I need to print the web page out.

Its the same as typing the data into a live web page using a keyboard, except that the data (and button-pushes) will all be in a file. It'll save me hours of work.

Regards.
Oct 7 '07 #3
gits
5,390 Expert Mod 4TB
hmmm ...

that might be tricky ;) ... is it your own webpage? in case its not ... you cannot do this because we cannot cross-site-script ... we could make an attempt but therefore tell me: has the data to be submitted? through the button-clicks? ...

kind regards
Oct 7 '07 #4
hmmm ...

that might be tricky ;) ... is it your own webpage? in case its not ... you cannot do this because we cannot cross-site-script ... we could make an attempt but therefore tell me: has the data to be submitted? through the button-clicks? ...

kind regards
No, its not my own web page unfortunately.

The data does have to be submitted by the button click, and the web page returned will be different each time, but the differences are known and can be anticipated.

Regards
Oct 7 '07 #5
gits
5,390 Expert Mod 4TB
so let me summarize ... you go to a webpage ... now you have to fill in the data from a textfile ... submit the page and after it returns you want to print it out ... am i right? the page to be filled is always the same?
Oct 7 '07 #6
so let me summarize ... you go to a webpage ... now you have to fill in the data from a textfile ... submit the page and after it returns you want to print it out ... am i right? the page to be filled is always the same?
Yes, thats correct. Except the page is submitted following the entry of each data item, and the printing is only done after all data has been entered.
Oct 7 '07 #7
gits
5,390 Expert Mod 4TB
hmmm ...

that's quite a task ... in case we find a a start for a solution with javascript ... would you be able to adapt it to your needs? or even to finish it? in case you are not ... i recommend you to hire a professional ... because i will not write the entire code for you :) but i would try something and would give you the idea ... ok?

kind regards
Oct 7 '07 #8
hmmm ...

that's quite a task ... in case we find a a start for a solution with javascript ... would you be able to adapt it to your needs? or even to finish it? in case you are not ... i recommend you to hire a professional ... because i will not write the entire code for you :) but i would try something and would give you the idea ... ok?

kind regards
I can do simple javascript - however it was a long time ago. If you could give me the idea, it would be greatly appreciated.
I can take it on from there.

Regards and thanks for the offer.
Oct 7 '07 #9
gits
5,390 Expert Mod 4TB
ok ... let me try something ... an i'll post an example here ... may be i will help you to go on with it ...

kind regards
Oct 7 '07 #10
ok ... let me try something ... an i'll post an example here ... may be i will help you to go on with it ...

kind regards

I'll look forward to it.

Regards.
Oct 7 '07 #11
gits
5,390 Expert Mod 4TB
ok ... we cannot have a pure javascript-solution ... as i said we cannot cross-site-script for security reasons. and in case you want to have it fully automated you need your own serverside scripts! the server-script has to retrieve the page you want to fill ... you might set up a webserver on your machine ... that does that for you. now copy and send that page with some added javascript and a new input-type-file and an additional iframe to the client from your domain. now you may search the txt-file and load it to the iframe (simply set the new iframes location.href to the txt-file's source) ... now you may parse the txt file with javascript ... consider dom-methods, regEx, string-methods etc. for that ... since it is now a page of your own domain it shouldn't make problems to retrieve the textfields by its name and set the values with those from your text-file ... and when ready use a javascript form submit() to send the form.

hope this could be done :) ... as you can see this is not quite simple ... you should know the tradeoff ... between doing it manually or create such a little system ...

kind regards

ps: as this involves security critical issues and different technologies i don't want to post an example that i have to verify etc. ... i hope the idea could help enough ...
Oct 7 '07 #12
ok ... we cannot have a pure javascript-solution ... as i said we cannot cross-site-script for security reasons. and in case you want to have it fully automated you need your own serverside scripts! the server-script has to retrieve the page you want to fill ... you might set up a webserver on your machine ... that does that for you. now copy and send that page with some added javascript and a new input-type-file and an additional iframe to the client from your domain. now you may search the txt-file and load it to the iframe (simply set the new iframes location.href to the txt-file's source) ... now you may parse the txt file with javascript ... consider dom-methods, regEx, string-methods etc. for that ... since it is now a page of your own domain it shouldn't make problems to retrieve the textfields by its name and set the values with those from your text-file ... and when ready use a javascript form submit() to send the form.

hope this could be done :) ... as you can see this is not quite simple ... you should know the tradeoff ... between doing it manually or create such a little system ...

kind regards

ps: as this involves security critical issues and different technologies i don't want to post an example that i have to verify etc. ... i hope the idea could help enough ...
Interesting approach.
I'll have to look at it more closely tomorrow night - (up early on Mondays!)
I'll also look into the possibility of creating a javascript bookmarklet using C or some other language to produce the script, which can then be executed from a bookmark.

Meanwhile thanks for your time and efforts - they're very much appreciated.

I'll let you know how I get on.

Regards.
Oct 7 '07 #13
gits
5,390 Expert Mod 4TB
hi ...

ok ... i'm looking forward to see how it is going on ...

the shown approach is based an the typical problem you would have with cross-site-ajax (XMLHttpRequest) - requests. the server makes the request to a different domain for you and delivers the response from your domain now ... its a kind of proxy ... if you want to imagine it that way ...

kind regards
Oct 8 '07 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: David | last post by:
First off all, my apologies if this message has no direct concern with this group I'm actually looking for help with a script for my website I couldn't find on the web In order for my customers...
13
by: nobody | last post by:
Hello all, I've searched just about everything and although I can see that other people are having problems, but theirs don't seem to relate, so in a last ditch attempt, my posting! Script...
10
by: Nimit | last post by:
Hi, I wasn't sure which forum this post belongs to, so I've posted it to a couple forums that I thought may be appropriate. In giving me advice, please consider me a beginner. Below is a synopsis...
3
by: Peter.Smith1981 | last post by:
Dear All, I've a problem , that was when I creat web page,many script cannot load on same layer.One script onload, last line the </body>. So that I've find any way , but... So you point out...
1
by: Tobe | last post by:
Where can I find information about how to enter information on one page and the close it and update the input information onto the second page?
3
by: Bob Sanderson | last post by:
I am trying to create a form for a MySQL database similar to a spreadsheet. The idea is to display a list of records, with the last line of the list being an input form. When the user enters data...
7
by: pbd22 | last post by:
hi. i am having probs understanding how to grab a file being uploaded from a remote client. i am using hidden input fields for upload such as: <input id="my_file_element" type="file"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.