ISPsystem.com Forums

ISPsystem.com Forums (http://forum.ispsystem.com//index.php)
-   General technical discussion (http://forum.ispsystem.com//forumdisplay.php?f=8)
-   -   Redirect on function exit (http://forum.ispsystem.com//showthread.php?t=2464)

mduh 05-15-2015 05:17 PM

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

fly 05-18-2015 11:47 AM

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

mduh 05-18-2015 12:06 PM

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

jeremy 05-19-2015 01:33 AM

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>


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

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.