Infopath 2010: Anyway to make a hyperlink in a rich text control open in the same window?
-
13 martie 2012 17:32
I am creating hyperlinks dynamically in a rich text box control, within a repeating table. I cant seem to force the links to open in the same window, I have tried setting the target property of the hyperlink with no success. Any other ways to accomplish this?
Thanks
Toate mesajele
-
13 martie 2012 21:15
Hi Sean,
I saw this blog post and with the help of jQuery it should be possible. I have never tried this aproach so I don't know if it works but maybe it's worth a try?
Blog: Married to SharePoint Twitter: @SPNiax
- Marcat ca răspuns de Entan MingMicrosoft Contingent Staff, Moderator 22 martie 2012 02:58
-
14 martie 2012 17:22Thanks SPNiax, any idea of how I would go about this for setting hyperlink target behaviour in html running in a rich text field, an example maybe? I'm not too familiar with JQuery, as I am mostly an asp/c# developer, yet have found the time savings of using infopath to construct complicated business forms and run them within a XmlFormView control on the page. Is this impossible to do within Infopath, or maybe some other way to force the link to open in the same window? Any other information or approaches would be greatly appreciated.
-
15 martie 2012 05:53Moderator
Hi ,
There are two ways to make the hyperlinks to open in the same window .
- You can change the IE settings :Tools>Internet Options. Click Settings behind ‘Change how webpages are displayed in tabs’ under the General tab .Check ‘Always open a pop-up in a new tab ’ .
- You can use JQuery to change the target of a hyperlink to _self just as SPNiax suggests .
Thanks
Entan Ming
TechNet Community Support
- Marcat ca răspuns de Entan MingMicrosoft Contingent Staff, Moderator 22 martie 2012 02:58
-
20 martie 2012 22:29Ok, can anyone post a jquery example related to setting hyperlink properties? In the meantime, I will do some reading about JQuery :)
-
21 martie 2012 04:58Moderator
Hi ,
Here are some JQuery codes to change the link properties ,you can refer to these sites for more information :
Change Link With Jquery (or javascript) : http://www.codingforums.com/showthread.php?t=172438
How to change the href for a hyperlink using jQuery : http://stackoverflow.com/questions/179713/how-to-change-the-href-for-a-hyperlink-using-jquery
jQuery API: http://api.jquery.com/attr/
Thanks
Entan Ming
TechNet Community Support