Open browser from html area

Hi all and a happy new year:

I have one form with that contains an html-area which show a html-form (method post) and I want that clicking the button, to open a browser with the corresponding page. But not working.

Any idea?

Best regards.

Hi Adelo,

Can you show us some code of what you are doing ?

Good morning:

my code is:

var 	testOpenPagePostMethod='<html>\
		<head> \
		</head> \
		<body> \
			<form action="http://www.icarushotels.com" method="post" target="_blank"> \
				<input type="hidden" name="field_1" value="one">  \
				<input type="hidden" name="field_2" value="two"> \
				<input type="submit" name="sending" value="Send" border="0"> \
			</form> \
		</body> \
	</html> ';

This function is in the onOpen form and she shows correctly the button in the html-area, but when I click, not open the url in one new browser.
Thanks in advance.

are we talking here about a web or smartclient?

In webclient.

the thing that could go wrong is that we already have a tag, that wraps everything.
And i think nested form tags are not really legal in the browser.

You can workaround it by using the HTTP plugin for the post action and invoking the servoy method from the html area, it has also the benefit that let’s you keep all your logic inside servoy methods and not deep buried into html. To call a servoy method from a not-editable html area use: .

Hello:

Really I not have call a servoy method, but I have to open an url in separate browser.

The idea is sending to PayPal the required data for post method, and show the PayPal page in another browser.

This work fine in html, but if I put the html code in the html area not working.

Otherwise, if I use the http plugin, I can not show the page, I can only receive the page code.

Thanks in advance.