问题描述:

I have to go to https://onlineservices.tin.egov-nsdl.com/etaxnew/tdsnontds.jsp every month and fill the Form 26QB on that page .It is painful to add all details every single time i thought to automate the form filling.

Now i can manipulate the dom using jquery and do it for myself.

But i wanted to come up with a generic solution which helps everyone in this by asking the user to fill the static details only for first time and remembering it for later times.

First idea which came to my mind is to create a website where user adds all static details and get that automated .

But the problem is once i load the Form 26QB page my javascript code goes out of context.

So my questions are :

  1. Is there a way to to create a website which does this.Can you elaborate on steps as my javascript code will disappear as soon as i navigate to the page and hence not possible.

    I can use phantom.js or selenium but i am not sure how to run it in a website and whether it will be too cumbersome.

2.How about a chrome extension ?

3.At various places i hear dom manipulation might be termed as "hacking"/DOS attack, although i think since i am not automating any login here and simple filling form on client side it should be legal?

网友答案:

Probably the best solution would be to create a chrome plugin, but the easiest would be to create a jQuery script and then inject it through the chrome console.

So every time that you have to fill the form, just paste something like this:

$( "input[name*='PAN_purchaser']" ).val( "the value you want" );
$( "input[name*='PAN_seller']" ).val( "the value you want" );
$( "input[name*='PAN_seller_confirm']" ).val( "the value you want" );

and so on for each field...

相关阅读:
Top