[greasemonkey-users] GreasaMonkey, Specific problem, Main site, input field, auto fill

67 views
Skip to first unread message

apophissaw

unread,
Apr 27, 2012, 5:32:46 AM4/27/12
to greasemon...@googlegroups.com

Hello Everybody. So i would like to explain my problem, sorry for english.

You can see the main site:
192.168.1.28/oszir-jarvany/faces/halalozas/pollen/PollenAdatok.xhtml.
I can edit everything on it. I made a script that can automatically click on
button: "Új" ( displayed on picture)

So GreaseMonkey works on Main Page.
Addational information: button "Új" script:
<spanid="pollen_table:buttons"><button id="pollen_table:j_idt242"
name="pollen_table:j_idt242" class="ui-button ui-widget ui-state-default
ui-corner-all ui-button-text-only btn"
onclick="PrimeFaces.ab({formId:'pollen_table',source:'pollen_table:j_idt242',process:'pollen_table:j_idt242',update:'pollen_form',oncomplete:function(xhr,
status, args){pollenUrlap.show();}}); return false;" type="submit"><span
class="ui-button-text">Új</span>

Now my Problem is that I'm not able to access anything on the Second Page
(pop up window) to fill them automatically with different integers. I try to
access it's id:
document.getElementById('tabview:pollen_fu_1').value="the value i want to
fill in";
But i can not. And when i hit F5(refresh) the Second popup page is gone.

I hope its clarified my question properly and thanks for review it :) If you
guys have any idea how can i access the Second (popup )page's input fields
please share with me. I have uploaded the website to you if its required :
http://old.nabble.com/file/p33758003/pollenAdat.rar pollenAdat.rar .



http://old.nabble.com/file/p33758003/specific_site.png

--
View this message in context: http://old.nabble.com/GreasaMonkey%2C-Specific-problem%2C-Main-site%2C-input-field%2C-auto-fill-tp33758003p33758003.html
Sent from the GreaseMonkey List mailing list archive at Nabble.com.

Tei

unread,
Apr 27, 2012, 7:26:18 AM4/27/12
to greasemon...@googlegroups.com
If is literally a popup, a new document with his own url, you need to to make your script run on that url too.  I am not going to swim in the infodump you provided to check that. 

I can't see your code, but if you are using JQuery, is possible that that ":" is making JQuery search something else. I don't even know if ":" is valid in a id.  If the document is malformed, you will probably need to walk the document with childNode ... 

--
You received this message because you are subscribed to the Google Groups "greasemonkey-users" group.
To post to this group, send email to greasemon...@googlegroups.com.
To unsubscribe from this group, send email to greasemonkey-us...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.




--
--
ℱin del ℳensaje.

apophissaw

unread,
Apr 29, 2012, 3:41:14 AM4/29/12
to greasemon...@googlegroups.com

Thank you very much.
At the very top of the main document there are several .js included like:
"pollenAdatok.xhtml_files/primefaces.js"
I will try to @include them all.

SEcondly i think i have found out what opens the popup. Sadly there is not
any url or js included.
THis is the button that opens the popup:

<button id="pollen_table:j_idt242" name="pollen_table:j_idt242"
class="ui-button ui-widget ui-state-default ui-corner-all
ui-button-text-only btn"
onclick="PrimeFaces.ab({formId:'pollen_table',source:'pollen_table:j_idt242',process:'pollen_table:j_idt242',update:'pollen_form',oncomplete:function(xhr,
status, args){pollenUrlap.show();}});return false;" type="submit"><span
class="ui-button-text">Új

However there is a primeface.js script amongst the downloaded website files.
And its included at the very top of the document:
"pollenAdatok.xhtml_files/primefaces.js"
I'm going to try to @include this in the GreaseMonkey script for sure.

Maybe it's a dumb attempt, but can not figure out better way for now.


Tei-2 wrote:
>
> If is literally a popup, a new document with his own url, you need to to
> make your script run on that url too. I am not going to swim in the
> infodump you provided to check that.
>
> I can't see your code, but if you are using JQuery, is possible that that
> ":" is making JQuery search something else. I don't even know if ":" is
> valid in a id. If the document is malformed, you will probably need to
> walk the document with childNode ...
>
> On 27 April 2012 11:32, apophissaw <apoph...@gmail.com> wrote:
>
>>
>> Hello Everybody. So i would like to explain my problem, sorry for
>> english.
>>
>> You can see the main site:
>> 192.168.1.28/oszir-jarvany/faces/halalozas/pollen/PollenAdatok.xhtml.
>> I can edit everything on it. I made a script that can automatically click
>> on
>> button: "Új" ( displayed on picture)
>>
>> So GreaseMonkey works on Main Page.
>> Addational information: button "Új" script:
>> <spanid="pollen_table:buttons"><button id="pollen_table:j_idt242"
>> name="pollen_table:j_idt242" class="ui-button ui-widget ui-state-default
>> ui-corner-all ui-button-text-only btn"
>>
>> onclick="PrimeFaces.ab({formId:'pollen_table',source:'pollen_table:j_idt242',process:'pollen_table:j_idt242',update:'pollen_form',oncomplete:function(xhr,
>> status, args){pollenUrlap.show();}}); return false;" type="submit">
>> class="ui-button-text">Új
View this message in context: http://old.nabble.com/GreasaMonkey%2C-Specific-problem%2C-Main-site%2C-input-field%2C-auto-fill-tp33758003p33763275.html
Reply all
Reply to author
Forward
0 new messages