My question begins below this paragraph: I have a form containing an input where someone can enter a permit number (i.e. '121640466') and once an adjacent button is clicked, a new browser tab takes you to a site that contains all of that permit's information in a tabular format:
$(".bis_button").click(function() {
var inputValue = $(this).parent('.frm_form_field').find('input').val();
window.open('http://a810-bisweb.nyc.gov/bisweb/JobsQueryByNumberServlet?passjobnumber='+inputValue+'&passdocnumber=&go10=+GO+&requestid=0');
});
Now, my question has several components to it that I'm hoping can help someone point me in the direction of what I'm looking to achieve:
What I essentially want is to allow someone to enter a permit number, and once an adjacent link is clicked, multiple specific fields in my form are populated with specific content from the site containing the table.
Let's use this page (we'll call it "permit page") that contains a permit's information to show what the process would look like. For this example, let's extract the Borough (Manhattan) from the table w/ heading Location Information (Filed At):
- On my form, enter permit number 121640466 into
<input id="field_cao2yl">
- On "permit page", Find
<table>
that contains<td>
w/ content "Borough" and copy the content of the next adjacent<td>
(in this case, the content is "Manhattan") - On my form, insert "Manhattan" into
<input id="field_qeu829">
I'm hoping that this can be done with AJAX and PHP so that the page doesn't have to be refreshed to have the information from "permit page" inserted into my form's inputs.