auto submit/click
|
|
hi guys u all scrip writers doin a great job. i want a script wre, in a form when a particular field is filled (say it b d last field in d form)
plz inform |
|
|
what if the last input is a checkbox ?
|
|
|
no no its no a check box it a drop down field
|
|
|
document.evaluate('//select[@name="gatewayID"]', document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue.addEventListener('change',function(e)
{
e.target.form.elements.namedItem('Submit').click();
}, false);
|
|
|
2 errors prohibited this script from being saved There were problems with the following fields: * Name can't be blank
ALSO HOW TO LOAD THE SCRIPT GIVEN BY U THANX A LOT IGUESS ITS DONE.
|
|
|
// ==UserScript==
// @name IRCTC : Quick Book
// @namespace http://gm.wesley.eti.br/irctc
// @description Submits the form after the payment option be chosen
// @include https://www.irctc.co.in/cgi-bin/bv60.dll/irctc/booking/quickBook.do?*
// ==/UserScript==
document.evaluate('//select[@name="gatewayID"]', document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue.addEventListener('change',function(e)
{
e.target.form.elements.namedItem('Submit').click();
}, false);
|
|
|
eew... why not:
// ==UserScript==
// @name IRCTC : Quick Book
// @namespace http://gm.wesley.eti.br/irctc
// @description Submits the form after the payment option be chosen
// @include https://www.irctc.co.in/cgi-bin/bv60.dll/irctc/booking/quickBook.do?*
// ==/UserScript==
document.evaluate('//select[@name="gatewayID"]', document, null, 9, null).singleNodeValue.addEventListener('change',function(e)
{
e.target.form.elements.namedItem('Submit').click();
}, false);
? The XPathResult types are really just integer constants. |
|
|
I'll help him with it guys. |
|
|
This style has problems that may prevent it from working: Selector expected. Ruleset ignored due to bad selector. Unexpected end of file while searching for closing } of invalid rule set. Do you want to use this code anyway? i still dont know how to install the script plz help |
|
|
ok now i managed to install both the above sctipts both seems working quit d same way, can u differentiate both
other wise its working exactly the way i want. thanx a lot. is thre any thing by which v can do away with confirmation prompt "turn off confirmation prompt" |
|
|
also let me know if i want to submit a form wre last entry is a radio button site : http://irctc.co.in/
plann my travel page ( i want to click "find trains" as soon as i select " i ticket/e ticket" |
|
|
Stop trying to install it to Stylish and install it to Greasemonkey. |
|
|
both scripts works exactly the same way.
change the line: e.target.form.elements.namedItem('Submit').click();
to: e.target.form.submit(); This will prevent from triggering the onclick event |
|
|
@w35l3y : If you're talking about speed, |
|
|
e.target.form.submit(); Is not working
also i want what if last item is a radio button. n if i can select a radio button b default, wre its not selected. >> also let me know if i want to submit a form wre last entry is a radio button site : http://irctc.co.in/
plann my travel page ( i want to click "find trains" as soon as i select " i ticket/e ticket" |
