I am looking to build a personal project in which i am on a website and want to pull text from it to populate my database.
I think i need to have JavaScript running as an extension/greasemonkey and then populate an ASP.NET form (not visible to the user) with the data before submitting the invisible form to populate my database
What i am asking really is A: is this possible, and if so could somebody provide me with some information or sources so that i can get a working idea?
Yes it is possible with greasemonkey. You can create a form in javascript, set the action to your asp.net page that will save the data. Then you populate the form fields with data, and call form.submit method.
It's possible to do it on server side. You can use DOM parsers such as SharpQuery or Agility Pack to read load and lead HTML document and populate your database.
Related
The Film-Production Software Shotgun offers a web interface.
To write notes, coordinator often have to fill in the same information into the forms, because there is no easy way to pre-fill the form automatically based on a project or page.
How can you prefill an autogenerated form, where you do not have access to the sourcecode of the website, which you would like to alter as a client automaticlly.
This is not trying to achieve, to alter the whole website on the web, rather just trying to alther the users html to improve the speed and remove redundant form entries.
Thanks
It would be possible to store this data in the cookies, although I do not know which implications this would have security wise. Ofcourse this would be much easier if there was a way to store this data server sided and collected from there.
Try creating a dictionary or JSON object based on the form, and store this data in the cookies. collect the data from the cookies if the user lands on the form again. The benefit from this is that you could implement this without ever actually handling the data, and being able to base it on a session so the cookies get cleared once a user drops the page.
I have a form on my website that I want to ensure each client only submits once per year.
To do this, I would like to save the client's id # and the current year to a .txt file on my server when they submit the form.
When the form is submitted, I also need to check the current contents of that file to ensure their id has not already been recorded, and display a message if they have already submitted the form that year.
I believe I need to use PHP to do this, but I'm brand new to PHP and I'm also not very experienced with jQuery. Any assistance would be much appreciated!
Using a simple database would be much better, because it will be easier to retrieve the stored data later on. There are more than enough tutorials if youre not familiar with databases (use mysql database if you have few experience with databases).
If you use a database you can also store the submitted data from the form very easy.
As Dan already said, first learn PHP and database connects and querys and then jQuery (which you dont need for putting data from a form into a database, but with ajax its cooler (you dont even need jQuery for ajax, vanilla javascript can also do that for you) ;) ).
Just google everything, there are more than enough tutorials online.
If you don't want to use a database, probably the simplest option will be to rename the received file with clientId-currentYear when you put it on the server.
For example, when a user submits a file for client 12345, you will have to check if a file 12345-2018 already exist. If it doesn't exist, you can create it, if not, you send your message to the user.
This is going to be easier to manage than a text file or a database if your programming level is low.
I have an lotus domino form that will be filled by the user of my web app. You can see it on the image below.
As you know, those fields that use the client-side code will be filled automatically when the form is loaded and when the agent in web query save triggered. How do i recreate this "mechanism" when i'm using SSJS code to create this form?
FYI, i'm creating an API using SSJS to create this form. So the data that i'll receive from the front-end are those that filled by user. It'll be too much work if i have to code the fields that supposed to be filled by client-side code. And the front-end that i'm using is Angular.
Pardon my english.
On a XPages there is the possibility to trigger and Query Save action, see http://www.xpageswiki.com/apps/wiki-xpages/wiki-xpages.nsf/page.xsp?documentId=C483F4FA895B5790C12578090038E377&action=openDocument#Set+fields+in+backend+document+in+QuerySave+event
Right now we're using a Javascript API to pull our JBPM user forms from the back-end and place them in an iframe which is sitting on our custom front-end.
What we'd like to do is pull data from one of our database servers and display it in a suggestion field on our front end (when someone starts typing an id, suggestions are displayed in the field). So the idea is that when someone selects an id this field will populate the underlying jbpm form with the appropriate data from the sql query.
Problem is:
How to get at the jbpm form (field id's seem to be dynamic)
Anyone know of a potential solution to the specific or general problem?
For this issue we ended up avoiding the jbpm forms altogether. Instead we used a Marionette/Backbone front end with our own forms and our own databases to store and display data. Our usage of JBPM 6.1 was scaled back to be used only for keeping track of where a particular process instance was in terms of human tasks.
A client wants a web application that performs a calculation based on text inputs, pulldown selections, checkbox selections, etc. They want to persist form data input but they are don't want to store them on the server. Instead they prefer to retain the inputs locally.
I've been searching and determined that this not a standard approach. Then I came across HTML5 Storage but it looks like that option isn't exactly what I thought it was.
Client wants to be able to save and load sets of inputs such as mortgage scenario 1 or mortgage scenario 20 year. Basically like a "save as" and an "open" button.
I reported back that this approach isn't really feasible and a server database or some other form of server persistence is the norm.
Am I way off base in being insistent that we need to use a database? Or are there any options I'm not aware of such as jquery?
How about object serialization? If you use PHP as backend, you could gather form data to array, serialize it and output to downloadable file.
Another attempt is to catch form data into JSON using only JS, and then making user save it. Look here for more info: How to generate and prompt to save a file from content in the client browser?