cancel
Showing results for 
Search instead for 
Did you mean: 

html form and links in dashlets?

targa2000
Champ in-the-making
Champ in-the-making
I wanted to use a simple html form <form> tag as well as an html link <a> tag in a dashlet. 

I see I can display regular html in a dashlet, but when I use a form, and I want to remain in the same dashlet on the same page, where do I point the action= attribute?  do I use the web script url for the dashlet?  If I do so, will I remain in the dashlet?  And for the <a> tag can I link to another html page and have it display within the dashlet that called it?
1 REPLY 1

mikeh
Star Contributor
Star Contributor
You've got two options as I see it:

1 - Develop your dashlet as an iframe. The dashlet itself would consist of little more than <iframe> markup. The iframe source contains your form and links.
Advantages: Any navigation (e.g. POSTing a form or clicking a hyperlink) will remain inside the dashlet.
Disadvantages: The dashlet can't be resized easily. IFrames aren't XHTML-compliant.

2 - Use AJAX to submit the form. There's no simple answer to the hyperlink in this case; options include: opening in a new window / pop-up or injecting the page's content into the dashlet (depends what the content is as to whether this will work or not).
Advantages: Dashlet is resizable. Page can remain XHTML compliant. Subjectively better user experience.
Disadvantages: More development.

It very much depends what content you're trying to link to and your development experience.

Thanks,
Mike