US: 1-941-4621-069
  
Cyprus: 3-572-2052-781

Go Back   ISPsystem.com Forums > ISPmanager > General technical discussion


Reply
 
Thread Tools
Old 05-15-2015, 05:17 PM   #1
Junior Member
 
Join Date: Jan 2015
Posts: 28
mduh is on a distinguished road
Default Redirect on function exit

Hello,

I have defined new toolbar button, which triggers custom function. I would like to redirect to external url, once the function execution is finished.

I tried following function return:

Code:
<?xml version='1.0'?><doc><url>http://example.com</url></doc>
Code:
<?xml version='1.0'?><doc><ok type='blank'>http://example.com</ok></doc>
Code:
<?xml version='1.0'?><doc><redirect>location='http://example.com'</redirect></doc>
but none of theme work. I receive 'The plug-in failed or returned invalid xml '. Could you please post me example of correct implementation of such redirect?

Thanks,
-Maciej
mduh is offline   Reply With Quote
Old 05-18-2015, 11:47 AM   #2
ISPsystem team
 
Join Date: Jun 2013
Posts: 233
fly is on a distinguished road
Default

Hello,

Could you please show your xml with button description.

If you need to add any certain url, you need to add url to button description.

Please see the documentation
fly is offline   Reply With Quote
Old 05-18-2015, 12:06 PM   #3
Junior Member
 
Join Date: Jan 2015
Posts: 28
mduh is on a distinguished road
Default

The toolbar xml:

Code:
  <metadata name="vm" type="list" key="id" keyname="name" autoupdate="300">
        <toolbar>
             <toolbtn func="uh.console" name="console" img="t-go" type="edit"/>
        </toolbar>
  </metadata>

BTW: Is there any recent documentation about user interface development? It would be very helpful to have description of how to build xml interface, supported function return values, etc.

Thanks,
-Maciej
mduh is offline   Reply With Quote
Old 05-19-2015, 01:33 AM   #4
Junior Member
 
Join Date: Feb 2015
Posts: 3
jeremy is on a distinguished road
Default

Hello.

Try second way, but without <?xml version='1.0'?> . It's should work.

Code:
<doc><ok type='blank'>http://example.com</ok></doc>
But remember, new window open this way can be blocked by brower like pop-up window.

If you want to open url in current tab of browser, try this:
Code:
<doc><ok type='url'>http://example.com</ok></doc>
jeremy is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:42 AM.