Skip to main content
Tweeted twitter.com/#!/StackSharePoint/status/299912883876294656
added 87 characters in body
Source Link
Dominik
  • 392
  • 1
  • 7
  • 21

so I tried to add a little horizontal menu to a wiki-site and wanted one of the links to open in a modal Dialog (a contact form). Every time I try to add it about the UI, sharepoint removes the link. Same in SP Designer.

Here's the syntax I'm using:

<a onclick="javascript:SP.UI.ModalDialog.ShowPopupDialog('url/contactform.aspx');">Contact Form</a> 

I don't have a clue why it's not working, it's the same syntax I'm using for one of my webpart-buttons and it works like a charm there, would be great to have some ideas on this :)

update: I tried it with href attribute, too. same behaviour, sp removes the attribute :(

so I tried to add a little horizontal menu to a wiki-site and wanted one of the links to open in a modal Dialog (a contact form). Every time I try to add it about the UI, sharepoint removes the link. Same in SP Designer.

Here's the syntax I'm using:

<a onclick="javascript:SP.UI.ModalDialog.ShowPopupDialog('url/contactform.aspx');">Contact Form</a> 

I don't have a clue why it's not working, it's the same syntax I'm using for one of my webpart-buttons and it works like a charm there, would be great to have some ideas on this :)

so I tried to add a little horizontal menu to a wiki-site and wanted one of the links to open in a modal Dialog (a contact form). Every time I try to add it about the UI, sharepoint removes the link. Same in SP Designer.

Here's the syntax I'm using:

<a onclick="javascript:SP.UI.ModalDialog.ShowPopupDialog('url/contactform.aspx');">Contact Form</a> 

I don't have a clue why it's not working, it's the same syntax I'm using for one of my webpart-buttons and it works like a charm there, would be great to have some ideas on this :)

update: I tried it with href attribute, too. same behaviour, sp removes the attribute :(

Source Link
Dominik
  • 392
  • 1
  • 7
  • 21

Open a modal from a link in wiki-site: Sharepoint removes javascript

so I tried to add a little horizontal menu to a wiki-site and wanted one of the links to open in a modal Dialog (a contact form). Every time I try to add it about the UI, sharepoint removes the link. Same in SP Designer.

Here's the syntax I'm using:

<a onclick="javascript:SP.UI.ModalDialog.ShowPopupDialog('url/contactform.aspx');">Contact Form</a> 

I don't have a clue why it's not working, it's the same syntax I'm using for one of my webpart-buttons and it works like a charm there, would be great to have some ideas on this :)