# Re: Get action back from Gtkmozembed

**URL:** <https://www.ruby-forum.com/t/re-get-action-back-from-gtkmozembed/136843>\
**Category:** Ruby-Gnome 2\
**Created:** [May 6, 2008, 8:15pm UTC](https://www.ruby-forum.com/t/re-get-action-back-from-gtkmozembed/136843 "2008-05-06T20:15:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![liberte](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9e8a1a/32.png) [@liberte](https://www.ruby-forum.com/u/liberte)\
**Post date:** [May 6, 2008, 8:15pm UTC](https://www.ruby-forum.com/t/re-get-action-back-from-gtkmozembed/136843/1 "2008-05-06T20:15:18Z")

</div>

I haven’t tested this, but it should work.

Suppose that you put your textbox and button in an HTML form with a GET  
action:

 Username: When the user fills out the form and clicks submit, GtkMozembed will try to open the url "html\_form\_action.html?user=dan".

So in your code, set up a handler for the ‘open\_uri’ signal and examine  
the url that the user is trying to open. If it looks like  
“html\_form\_action.html?user=XXX” then handle the signal yourself,  
extract the XXX and use the data however you want.

Dan

----- Original Message ----  
From: Diego B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: removed\_email\_address@domain.invalid  
Sent: Tuesday, May 6, 2008 5:01:10 PM  
Subject: [ruby-gnome2-devel-en] Get action back from Gtkmozembed

Hi guys,

## If i use Gtkmozembed without a webserver, using it with just ruby and a template library, if i make a textinput or button or anything, how can i read back the data? anyone have a suggestion?

Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

* * *

This [SF.net](http://SF.net) email is sponsored by the 2008 JavaOne(SM) Conference  
Don’t miss this year’s exciting event. There’s still time to save $100.  
Use priority code J8TL2D2.  
[http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone](http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone)

* * *

ruby-gnome2-devel-en mailing list  
removed\_email\_address@domain.invalid

> **[ruby-gnome2-devel-en List Signup and Options](https://sourceforge.net/projects/ruby-gnome2/lists/ruby-gnome2-devel-en)**
>
> This project is a set of Ruby language bindings for the various application development libraries included with the GNOME/GTK+ environment.
> This…

---

<div class="post-metadata">

**Author:** ![liberte](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9e8a1a/32.png) [@liberte](https://www.ruby-forum.com/u/liberte)\
**Post date:** [May 7, 2008, 6:00am UTC](https://www.ruby-forum.com/t/re-get-action-back-from-gtkmozembed/136843/2 "2008-05-07T06:00:34Z")

</div>

I have no idea how to do this, i tried some codes and none worked, i  
dont know well how to work with http \>.\< need some help  
this is the code im using to render the data, mab is a markup generated  
from markaby

(window = Gtk::Window.new).signal\_connect(“destroy”) {Gtk.main\_quit}  
gecko = Gtk::MozEmbed.new  
window.add(gecko).show\_all

gecko.open\_stream “file:///”, “text/html”  
gecko.append\_data “#{mab}”  
gecko.close\_stream

Gtk.main
