Hello All,
I was filling out the online passport registration form and had problems with the date field. After the focus was moved to any other field, the last digit of the date would get cut. You can try it out on the link below. https://passport.gov.in/pms/OnlineRegistration.jsp Even reducing the date from 4 to 2 characters show the same result.
Even in windows the same problem existed in firefox. The only way it worked was in IE7. (It may be working in IE6 too but I don't have it). Is there a work around for this? I am planning to write to the Delhi office that may be in charge of the website. You could write too.
On 4/9/07, Rony ronbillypop@yahoo.co.uk wrote:
I was filling out the online passport registration form and had problems with the date field. After the focus was moved to any other field, the last digit of the date would get cut. You can try it out on the link below. https://passport.gov.in/pms/OnlineRegistration.jsp Even reducing the date from 4 to 2 characters show the same result.
It's not a JSP problem, it's a javascript problem. It's because the web designer has chosen to use some IE specific code.
The page is typical amateur web-designer stuff with slap-on scripts that they've found from the interweb. So you can't really expect clean cross-browser javascript from them.
The lack of consistency in variable naming, commenting, the silly right-click disabled script, etc. are the telling signs if anyone's wondering. The only thing missing was a mouse tail; I remember they were a rage a few years back ;)
On Mon, Apr 09, 2007 at 02:11:19AM +0530, Siddhesh Poyarekar wrote:
The lack of consistency in variable naming, commenting, the silly right-click disabled script, etc. are the telling signs if anyone's wondering. The only thing missing was a mouse tail; I remember they were a rage a few years back ;)
IIRC, both indianrail.gov.in and irctc.co.in will cry "You are not allowed to press that button" or something like that if I right click anywhere on the page, even today.
Kumar
IIRC, both indianrail.gov.in and irctc.co.in will cry "You are not allowed to press that button" or something like that if I right click anywhere on the page, even today.
Both these sites however work beautifully on firefox. I had to use passport.gov.in with IETab extension on windows firefox.
Vinayakam Murugan wrote:
IIRC, both indianrail.gov.in and irctc.co.in will cry "You are not allowed to press that button" or something like that if I right click anywhere on the page, even today.
Both these sites however work beautifully on firefox. I had to use passport.gov.in with IETab extension on windows firefox.
I have done rail bookings in Linux without any change in settings.
On Mon, Apr 09, 2007 at 08:43:03AM +0530, Vinayakam Murugan wrote:
IIRC, both indianrail.gov.in and irctc.co.in will cry "You are not allowed to press that button" or something like that if I right click anywhere on the page, even today.
Both these sites however work beautifully on firefox. I had to use passport.gov.in with IETab extension on windows firefox.
OK, just got web access, and indianrail.gov.in and IRCTC are perfect.
Kumar
Here's a solution for you. Let me know if it worked.
1. Install the Firebug extension for Firefox. 2. Open the passport website where you're facing problems 3. Click on the green coloured tick-mark at the lower right corner. This will open the Firebug window. 4. Click on Console 5. Execute the following statement with the appropriate field name. The example given below till change the column for DD Date to 01/01/1983 : for(i=0, a=document.getElementsByTagName('input'); i<a.length; i++) {if (a[i].name=='DDDATE') {a[i].value='01/01/1983'; break;}}
HTH, Saurabh.
Sometime Today, SN cobbled together some glyphs to say:
- Execute the following statement with the appropriate field name.
The example given below till change the column for DD Date to 01/01/1983 : for(i=0, a=document.getElementsByTagName('input'); i<a.length; i++) {if (a[i].name=='DDDATE') {a[i].value='01/01/1983'; break;}}
easier to do document.getElementsByName('DDDATE')[0].value='01/01/1983';
and you don't need firebug to do this, you can do it in your URL bar by typing this:
javascript:alert(document.getElementsByName('DDDATE')[0].value='01/01/1983')
Philip
Philip Tellis wrote:
easier to do document.getElementsByName('DDDATE')[0].value='01/01/1983';
and you don't need firebug to do this, you can do it in your URL bar by typing this:
javascript:alert(document.getElementsByName('DDDATE')[0].value='01/01/1983')
Thanks but it does not work. Try it on https://passport.gov.in/pms/OnlineRegistration.jsp
What happens is that as soon as you move to another field, the date gets cut by 1 character in the right. Is there any problem in the web page's client script, that can be brought to the notice of the webmaster? Javascript and Firefox are like brothers.
Sometime Today, R cobbled together some glyphs to say:
What happens is that as soon as you move to another field, the date gets cut by 1 character in the right. Is there any problem in the web page's client script, that can be brought to the notice of the webmaster? Javascript and Firefox are like brothers.
ok, I had a look at the site. There are two ways to fix it.
1. Programmatically remove the onblur event from all date fields - you can use the method I showed you earlier
2. Use the DOM inspector: (Ctrl+Shift+I), then click the selector button (the little button next to the binoculars), then click on the first date field. On the right hand pane you'll see onblur. Right click and delete it. Do the same for all date fields.
As far as what's wrong with the code, don't get me started. That code was written by a school child who's never studied programming in their life.
If you just want to fix this problem, then get rid of this line in date_diff.js:
vDateName.value = vDateName.value.substr(0, (vDateValue.length-1));
Any one who's ever used a substring function in his life before will tell you that whoever wrote that code was missing a brain somewhere. They were obviously missing pride as well, because they've got this at the top of the file:
var message="Developed and Maintaned \n\tby\n\ NIC, MEA Division, New Delhi";
seriously. If I'd written that shit, I wouldn't want my name anywhere near it.
Philip
Philip Tellis wrote:
Sometime Today, R cobbled together some glyphs to say:
What happens is that as soon as you move to another field, the date gets cut by 1 character in the right. Is there any problem in the web page's client script, that can be brought to the notice of the webmaster? Javascript and Firefox are like brothers.
ok, I had a look at the site. There are two ways to fix it.
Thanks. I will try it out at night. :)
and you don't need firebug to do this, you can do it in your URL bar by typing this:
javascript:alert(document.getElementsByName('DDDATE')[0].value='01/01/1983')
Whoa! Didn't know you could do this in Firefox. The browser keeps throwing gems like these ever so often!
Nandz.
Sometime on Apr 16, SN cobbled together some glyphs to say:
javascript:alert(document.getElementsByName('DDDATE')[0].value='01/01/1983')
Whoa! Didn't know you could do this in Firefox. The browser keeps throwing gems like these ever so often!
You can do this in any javascript enabled browser IIRC.