Fill Form in Webgadget Mozilla?

Just starting out? Need help? Post your questions and find answers here.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Fill Form in Webgadget Mozilla?

Post by ricardo »

As Webgadget uses a very old version of IE no matter if i put in Feature Browser Emulation 2711 to behaves like IE 10, i dont make it to work as it.

So i tried Mozilla, BUT... its so old the Activex too...

In Chromium running this will fill the form in the site and even submit it and let me in.

Code: Select all

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<form id="frm1" action="http://www.somesite.org/user/login.php" method="get">
<input type="text" name="username" value="ric"><br>
<input type="password" name="password" value="123456"><br><br>
<input type="submit"  value="Submit form">
</form>
<script>
document.getElementById("frm1").submit();
</script>
</body>
</html>

Is there any way to fill a form using the Webgadget with Mozilla...

Any advice is welcome :)

*BTW, in this browser era, PB is outdated in the browsers and its a shame that a very good programming language are outdated in the most important area of this years.
ARGENTINA WORLD CHAMPION
buddymatkona
Enthusiast
Enthusiast
Posts: 252
Joined: Mon Aug 16, 2010 4:29 am

Re: Fill Form in Webgadget Mozilla?

Post by buddymatkona »

Well if you are talking about filling a known form, you could display display/edit fields
in your gadget and then send the info through Firefox in the form of a macro.
1) Install the iMacro tool in Firefox and MacroRecord while filling out a form
2) Edit selected fields with your Gadget
3) Run Firefox + Macro from PB
Demo :

Code: Select all

RunProgram("C:\Program Files (x86)\Mozilla Firefox\firefox.exe", "http://www.google.com", "")
Delay (3000); or make sure the browser is running and ready
RunProgram("C:\Program Files (x86)\Mozilla Firefox\firefox.exe", "http://run.imacros.net/?m=Demo-FillForm.iim", "")


Command Line Macro:

Code: Select all

RunProgram("C:\Program Files (x86)\Mozilla Firefox\firefox.exe" "imacros://run/?code=editedmacrosource..." ;  
I have to admit just running Mozilla with local Macro files seems easier. That might not be the best fit for a PB App. :)
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Fill Form in Webgadget Mozilla?

Post by ricardo »

Sounds good!!

I will test it.


Thanks in advace!
ARGENTINA WORLD CHAMPION
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Fill Form in Webgadget Mozilla?

Post by Fred »

As a side note, the mozilla support will be dropped in the next release as the activex is way too old and not maintained since 2005.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Fill Form in Webgadget Mozilla?

Post by ricardo »

I cxan't make this examples run.

I have ionstalled i Macros in Firefox and Chrome (does the Activex comes included? )

I can manually run fgind it in FoireFox.

Now, if i have some mycode.iim in my macros directory (in the documents, etc) i can figure out how to run it.
I tried youur exmapls but it does ot run.
ARGENTINA WORLD CHAMPION
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: Fill Form in Webgadget Mozilla?

Post by Josh »

ricardo wrote:I cxan't make this examples run.

I have ionstalled i Macros in Firefox and Chrome (does the Activex comes included? )

I can manually run fgind it in FoireFox.

Now, if i have some mycode.iim in my macros directory (in the documents, etc) i can figure out how to run it.
I tried youur exmapls but it does ot run.
Maybe it will run when you are sobered up :mrgreen:
sorry for my bad english
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Fill Form in Webgadget Mozilla?

Post by ricardo »

I found the rproblem, i had to user a registry that makes that the imacros: protocol are enabled and used by FF.


JKust for the records the reg info is:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\imacros]
"URL Protocol"=""
@="URL:imacros Protocol"

[HKEY_CLASSES_ROOT\imacros\shell]

[HKEY_CLASSES_ROOT\imacros\shell\open]

[HKEY_CLASSES_ROOT\imacros\shell\open\command]
@="\"C:\\Program Files\\Mozilla Firefox\\firefox.exe\" \"%1\""
ARGENTINA WORLD CHAMPION
buddymatkona
Enthusiast
Enthusiast
Posts: 252
Joined: Mon Aug 16, 2010 4:29 am

Re: Fill Form in Webgadget Mozilla?

Post by buddymatkona »

@ricardo
After what Fred says about dropping Firefox support, you should probably use Firefox in its own window anyway and just work with form fields from a separate PB EditorGadget.
iMacros can both read and write CSV files so that would make an easy data interface with a PB App. Good luck.
Post Reply