Infopath 2010: Anyway to make a hyperlink in a rich text control open in the same window?
-
2012年3月13日 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
すべての返信
-
2012年3月13日 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
- 回答としてマーク Entan MingMicrosoft Contingent Staff, Moderator 2012年3月22日 2:58
-
2012年3月14日 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.
-
2012年3月15日 5:53モデレータ
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
- 回答としてマーク Entan MingMicrosoft Contingent Staff, Moderator 2012年3月22日 2:58
-
2012年3月20日 22:29Ok, can anyone post a jquery example related to setting hyperlink properties? In the meantime, I will do some reading about JQuery :)
-
2012年3月21日 4:58モデレータ
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

