asked the original question here:
Javascript – text field submits to a popup window
Mash was kind enough to help and answer.
I’m having a strange issue where on the Home page the code is NOT working – goes into the alert each time. but on other pages – it seems to be working properly.
to test use the code: 120663A
Scroll down and enter the lot number above
Any suggestions/help would be very welcome?
thanks
joey
Although you keep
text-transform: uppercasein both page. when you type 120663a, $(‘input[type=text]’).val() only show 120663a.That’s why
if ($('input[type=text]').val() == "120663a") {in http://freshomega.com/w/tester works andif ($('input[type=text]').val() == "120663A") {in http://freshomega.com/w/ does not work.I hope this will help.
You can test 120663A in both page, the result will be reverse.
To solve this,
I will do the input text to change upper case in both pages for consistency using toUpperCase() function or change both to lower case.
For example,
I hope this would help.