Problem with Mozilla and Post Requests [message #437499] |
Sun, 06 June 2004 12:02 |
Eclipse User |
|
|
|
Originally posted by: hs.cybertec.at
I have successfully integrated Mozilla into my GTK/SWT application (by
the way; SWT is REALLY COOL! ).
My problem now is: I can tell the browser to open a certain URL but I
have no idea how to handle post requests and links.
Here is my code:
final Browser browser = new Browser(shell, SWT.NONE);
browser.setSize(640, 400);
browser.setUrl("http://80.78.255.19");
browser.addLocationListener(new LocationListener()
{
public void changed(LocationEvent event)
{
Elog.Elog("an event has occurred: " +
event.location);
Elog.Elog(" doit: " + event.doit);
Elog.Elog(" top: " + event.top);
/* location.setText(event.location); */
// browser.setUrl(event.location);
}
public void changing(LocationEvent event)
{
Elog.Elog("an event has occurred 2: " +
event.location);
Elog.Elog(" doit: " +
event.doit);
Elog.Elog(" top: " + event.top);
browser.setUrl(event.location);
}
});
Button quit = new Button(shell, SWT.PUSH);
quit.setSize(100, 50);
quit.setText("Quit");
quit.setLocation(50, 420);
quit.addSelectionListener(new SelectionAdapter()
{
public void widgetSelected(SelectionEvent e)
{
Elog.Elog("Calling quit");
shell.dispose();
}
});
The problem now is ...
[Jun 6, 2004 2:00:32 PM] - 0 - NOTICE: The Administration interface will
be started
[Jun 6, 2004 2:00:34 PM] - 0 - NOTICE: an event has occurred:
http://80.78.255.19/
[Jun 6, 2004 2:00:34 PM] - 0 - NOTICE: doit: false
[Jun 6, 2004 2:00:34 PM] - 0 - NOTICE: top: true
[Jun 6, 2004 2:00:39 PM] - 0 - NOTICE: an event has occurred 2:
javascript:fSubmit('1','de')
[Jun 6, 2004 2:00:39 PM] - 0 - NOTICE: doit: true
[Jun 6, 2004 2:00:39 PM] - 0 - NOTICE: top: false
[Jun 6, 2004 2:00:39 PM] - 0 - NOTICE: an event has occurred 2:
javascript:fSubmit('1','de')
[Jun 6, 2004 2:00:39 PM] - 0 - NOTICE: doit: true
[Jun 6, 2004 2:00:39 PM] - 0 - NOTICE: top: false
[Jun 6, 2004 2:00:39 PM] - 0 - NOTICE: an event has occurred 2:
javascript:fSubmit('1','de')
[Jun 6, 2004 2:00:39 PM] - 0 - NOTICE: doit: true
[Jun 6, 2004 2:00:39 PM] - 0 - NOTICE: top: false
[Jun 6, 2004 2:00:39 PM] - 0 - NOTICE: an event has occurred 2:
javascript:fSubmit('1','de')
[Jun 6, 2004 2:00:39 PM] - 0 - NOTICE: doit: true
[Jun 6, 2004 2:00:39 PM] - 0 - NOTICE: top: false
An endless loop is started. As you can see the script function is said
to be the target of my click (I am hitting a link which is supposed to
call a JScript function).
How can I solve my problem and how can I make this (= navigation and
submit) work?
Best regards,
Hans
|
|
|
|
Powered by
FUDForum. Page generated in 0.03261 seconds