TableTools button to URL?

TableTools button to URL?

StpdudeStpdude Posts: 30Questions: 0Answers: 0
edited January 2013 in TableTools
Hey guys, im trying to create a button in tabletools that just points to a basic URL, i cant seem to figure out what i should do....

[code]
{
"sExtends": "href",
"sButtonText": "Create New Entry",
"sUrl":"add/cmsgroup"
}
[/code]

thinking it should be something easy like that?

Replies

  • essexstephessexsteph Posts: 57Questions: 0Answers: 0
    I wasn't aware that TableTools provided a 'href' button and (on a quick search) can't see it documented - where did you find it?

    When I want to do something similar I do this:

    [code]
    {
    "sExtends": "text",
    "sButtonText": "Add Participant",
    "fnClick": function ( nButton, oConfig, oFlash ) {

    window.location = "http://www.google.co.uk"

    }
    }
    [/code]
  • StpdudeStpdude Posts: 30Questions: 0Answers: 0
    edited January 2013
    Well the 'href' isnt in there, i was just giving an example of how i thought it should work. I couldnt find any documentation on how to make it just point to a simple URL. Thanks, yours worked exactly like i needed it to :)
  • allanallan Posts: 61,915Questions: 1Answers: 10,149 Site admin
    @essexsteph's method is exactly how I'd suggest it be done :-).

    You could make a plug-in button which have an `sUrl` option if you wanted!

    Allan
This discussion has been closed.