Javascript code to verify an entry of a textbox - requiredfieldvalidator

Please I'm new to Javascript and i want add a JS code to check (using the "if" Selection structure) if the book code entered into the search box is valid (from a table data) and then proceed to the next page and if not, it should display invalid code..
I couldn't add the image of the output as I'm new here..
Please I'd appreciate the help.. Thanks in anticipation..

Related

How to generate the html form data in the qr code?

I have searched many way in the online to find how to generate the html form data become qr code, but I can't get the suitable result for me. Hope anyone can share the guideline or tutorial for me how to generate the html form data become qr code.
This is my example situation:
I have a form to save the data in the table, after that in the table qr code button when I've clicked, it will show me the qr code picture. If I've scanned the qr code, the content will show me in the phone what I've selected .
For example, I want the expected result like below the picture after I've scan the qr code and see the selected result on my phone:
Hope someone can guide me or give the logic for me to solve my problem. Thanks.
Please have a look at the answer below.
if you use JS and Jquery it can be done.
Link: Generating a Simple QR-Code with just HTML

Selected Files can not display in FileChooser in JavaFX

I have problem with my code where i want to know selected file in file chooser, i try with system.print.ln can respon selected file but with text take result null.
Where error happen?
If you want someone to look at your issue quickly, DONT put your code as screenshot. Anyway I think your issue is at declaring actionStatus field using #FXML. Remove the "static" keyword.

Modify HTML content during Web Scraping

I try to do some Web Scraping
The objective is to collect all remedials according to the postal code. The problem is when I try my code, my list is empty because the url did't change according to the postal code. This is why I want to change the HTML value during the scrape.
I'm not sure how to do this. I tried using Selenium and XPATH however I wasn't able to find anything.
Here's the HTML Code: (in red is what I need to change.)
EDIT : Indeed, the goal is to collect the pagination with the name and the type of remedial according to the postal code, this is why I want to change the HTML content during the scrap.
This is the best that I can do for the moment, I hope u will see the error
This input is in a form, which is good because Selenium has special functionalities to handle forms.
from selenium import webdriver
url = "https://www.maif.fr/services-en-ligne/consultationreparateurs/geolocaliserReparateur.action?view"
query = "whatever you want to put into the search box"
driver = webdriver.Chrome()
driver.get(url)
webform_input = driver.find_element_by_xpath("//input[#id='adresseInternaute']")
webform_input.send_keys(query)
webform_input.submit()
The key here is submit(). It will walk the HTML tree until it finds a button within the current form, meaning you don't have to write an extra two lines just to click the search button.

Use a Visio PageName as an Email Subject

I hate to do this, but I have the same question as the following link: Visio 2010 using a page name in mailto link
I have attempted to use the answer given but all I'm getting is PAGENAME() in the subject field of the generated email. My Visio file is rendered to a html file where this link will be used.
I'd have added a comment to avoid creating a new question but don't have enough Rep to follow up on the comments there.
If anyone can give me a pointer, that'd be great. The line I have at the moment is
>
mailto:my.email#email.com&Subject=PAGENAME()&Body=Text...
Okay, looks like I've worked this one out.
I needed to right click the object & head in to the "Show ShapeSheets" window.
Once in here, adjust the 'Hyperlinks' entry: In the 'ExtraInfo' box change:
="subject=PAGENAME()"
to
="subject="&PAGENAME()
Logical when you look at it.
I do have the problem now that when Visio renders the html files, it doesn't use the foreground PAGENAME() in the same way was when you insert PAGENAME() into an object. The email title is always the background name & not the foreground.
I doubt there'll be a way of resolving that one, but glad I got to see it in action.

Extract POST URL using GET

I am trying to simulate the functionality of a form in this website, but don't know exactly what the post URL looks like.
The link to the website is here:
selfservice.mypurdue.purdue.edu/prod/bwckschd.p_disp_dyn_sched >> then click on Spring2013. The code I am trying to replicate is the one that happens when the user clicks Course Search and selects CS from the subject list.
You can look at the HTML file to see the values they use in their POST command. How do I see what the values look like once the button is clicked, as I am trying to replicate this and set the variables to the same values. What I need is a URL to be shown with all of the variables set to their respective values. I understand this can be done with a GET command. Can someone tell me how to extract this URL for me so I can proceed?
I edited the page using chrome inspector and changed the form action to GET - this is the URL that was displayed.
https://selfservice.mypurdue.purdue.edu/prod/bwckschd.p_get_crse_unsec?term_in=201320&sel_subj=dummy&sel_day=dummy&sel_schd=dummy&sel_insm=dummy&sel_camp=dummy&sel_levl=dummy&sel_sess=dummy&sel_instr=dummy&sel_ptrm=dummy&sel_attr=dummy&sel_subj=CS&sel_crse=&sel_title=&sel_schd=%25&sel_from_cred=&sel_to_cred=&sel_camp=%25&sel_ptrm=%25&sel_instr=%25&sel_sess=%25&sel_attr=%25&begin_hh=0&begin_mi=0&begin_ap=a&end_hh=0&end_mi=0&end_ap=a
However, this URL dosen't resolve as the script is obviously expecting POST data.