Forums | Mahara Community

Developers /
Adding buttons that activate URLs


anonymous profile picture
Account deleted
Posts: 20

03 March 2011, 10:24

Hi,

   Can anybody help. I am looking to add an extra button to the side panel that appears when a view is given a secretURL. I want this button to call out to another website / service in anyway POST or GET or redirect.

   At the moment the Remove button is present. I have looked through the code and replicated the button but with my function name on it although it appears name/mahara.Anyway, the main problem is how do I get the page to redirect onto another page using the new button or send a message in the background eitherway is ok.

   The code for the remove button is

connect(removeButton, 'onclick', function() {
       removeElement(row);

  So I need to know what to put insted of the removeElement(row); I have tried redirect('someurl'); but that does not seem to work.

Any ideas?

Thanks,

Tom

 

Yuliya Bozhko's profile picture
Posts: 21

09 March 2011, 18:12

As I remeber, in javascript if you want to redirect to another page, you just have to write in you function code:

window.location.href = 'someurl';

And user will be redirected to the location.

Is that whant you need?

2 results