I have a project please help

EDIT
discussion continued from
I have a project help please


I need to fill the form with java script
i need to read all field from text file line by line like a getline in C++. for Example:c:\x.txt


Fields ids are are like below:

<input type="text" required="" id="first_name" name="firstName" value="">
text files first write will come here

<input type="text" required="" id="last_name" name="lastName" value="">
text files second write will come here

<input class="required" type="text" id="fbirthday" name="birthday" value="" data-toggle="datepicker" data-dp-months="1" data-dp-start="1918" data-dp-end="2018" data-dp-date="2000-06-02" data-dp-date-select="false" autocomplete="off">
Ex:2000-06-20
text files third write will come here

<input type="text" required="" id="telephone" name="telephone" value="">
Ex:+905065598665	
text files forth write will come here

<input type="email" required="" id="email" name="email" value="">
text files fifth write will come here

<input type="email" required="" id="emailRepeat" name="emailRepeat" value="">
text files sixted write will come here

<input type="text" required="" id="uname" name="username" value="">
text files seventh write will come here.

<input type="password" required="" minlength="4" id="password" name="password">
text files eight write will come here.

<input type="password" required="" minlength="4" equalto="#password" id="password2" name="repassword">
text files nineth write will come here.

and click on ucretsiz kaydol

Well, first thing is that AFAIK JavaScript can not read from the “C” directory. At least not easily and even then maybe not.

It can however get a file from an HTTP request.

I think the easiest way would be to have the text file be in JSON so that you can use it with the JavaScript. Is that doable?

If the text file is on the web, it can be AJAX’d
If not, it will have to be loaded via a File Input and then read through via an onChange firing to a FileReader.
Once you have the file’s content, split it on a regex of at least one character in the set \r\n
Iterate the result of the split to read line by line.

read from local text file

When can you make it?

We are here to help you make stuff it you get stuck, not to make stuff for you. If you want someone to create stuff for you you should go to something like freelancer.com.

3 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.