Displaying HTML link in an MVC application

I  have created a form which use a text editor to post content to the database. However on my news page the link are not showing as hyperlink but as HTML  like this <a href="www.microsoft.com">Microsoft.com</a>
I am using the @Html.displayFor helper
<p> @Html.DisplayFor(modelItem => item.postContent)</p>
What am I missing?

There are many ways to do it. But, a simple way will be
<p> <a href="Model.postContent">Link Name</a> </p>
If you found this post useful, Please "Mark as Answer" & "Vote as Helpful". Best Regards.

Similar Messages

  • Display HTML stream in Web Dynpro application

    Hello,
    Sorry, I am new to the Web Dynpro environment, so this might seem like a stupid question.
    How can I display streaming HTML content in a Web Dynpro application.  The IFrame element only seems to allow you to point to a URL.  In this case, I am receiving an HTML stream back from an R/3 system via a BAPI call.
    Thanks very much.

    Hi
    As per your question, I understand that HTML output is getting generated through a R3- Bapi call. Fine, create a model with the data binding to the context to some text view. Simply create view with the relevant UI element through which you want to exhibit the data and call the R3 call through your model. instead of a HTML output, you will get your data in the view.
    you may not get the exact format / style of the html output.
    Otherwise, directly HTML content cannot be shown in webdynpro. You need to have some UI control to take its content.
    Or else, you can go in for j2ee stack and end up with a java based appl, use a simple jsp and get the output!
    if you have any specific queries do let us know
    hope this helps you
    thanks

  • Html and email link in a java application

    Hi all
    How do you put a email or HTML link into a Java application.
    I want to put my web site address and email address into a about dialog.
    I would like to be able to open the default email application and web site from this dialog box.
    Thanks to all
    Craig

    Try just making a label, and formatting it to look like a generic link. Then add a listener that performs the desired action when you click on it. The "desired action" would probably involve starting the user's default browser/mail-program and loading something in it. I have no idea how to do that, but the above should at least get you a "link" that responds when you click it, and that's a start.

  • Adding a html link to a carousel

    i have followed a tutorial to build a flash craousel and have had no problems in building that.  i wanted to add a html link to a section of the carousel but everything i have tried up to now has failed.  All the information is passed through to the carousel from an xml file and everything works fine except for the link.
    i have slightly modified the tutorial so i have an extra box on the information page which holds the web address for the site they are looking at in the portfolio.  i have the address showing up but i cannot use the text as a link.
    the box that i am putting it in is a dynamic text box which has been set up with the following settings
    theLink.html = true;
    theLink.htmlText = t.Link;
    so as far as i know these are set to be able to handle html tags/code but they are not playing games.
    i have tried to pass the link through to the swf file from the xml file with the following code but this just seem to break the whole application.
    Link="<![CDATA[<a href='http://www.acmeart.co.uk/pip_new']]"
    to view how i have the file working upto now please view the link below.
    http://acmeart.co.uk/carousel
    i feel the problem is not with the flash application but more with how i am trying to pass the html link over to the application from the xml file.  i will attach the xml file to the post.

    What I had in mind was to place the link inline in your text. Something like this:
    <item name="valley" full="assets/valley.png"
            title='Book - CD ROM'
            body='This product was a Shockwave holiday card. It began as a jigsaw puzzle. As the puzzle was solved, it opened and displayed the holiday greeting. &lt;a href=&quot;http://www.amazon.com" &gt;Purchase a copy.&lt;a\&gt;'>
        </item>
    The url is right in the text. The html markup is escaped as html entities.

  • How to Display Html Text with Image

    HI Frens,
    I am getting some html text from a source, Later i want to
    display that data, but it may happened that it has some images in
    it. Currently I am using text area to display it.
    Now My question is if there is any image will it show, as we
    can see it in our mails? if Not, Which component I should use for
    this?
    I also want that I need to select some file from, How can i
    get open dialog box here?
    Thks in Advance for replies frens:
    Ashish Mishra

    Hi Ashish,
    If I have understood your requirement properly, u want to
    display html text on a flex application.
    I think there its better if you use the html component to
    display the text. I have a sample code which will give you a
    direction to think on.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
    xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="vertical"
    creationComplete="initApp( )">
    <mx:Script>
    <![CDATA[
    public function initApp( ):void
    var initHtml:String = "<html><head> \
    <title='Page Example'/> \
    <body bgcolor='#ccddee'><h1>Page
    Example</h1> \
    <p>This is a complete <b>HTML</b> \
    page as a
    <em>string</em>.</p></html></body>";
    this.html.htmlText = initHtml;
    ]]>
    </mx:Script>
    <mx:HTML id="html" width="100%" height="100%" />
    </mx:Application>
    Also do you want a file open dialog box??

  • Displaying HTML in a java application

    Is there any other way to display HTML in a java application besides JEditorPane and JLabel (which are fairly restrictive). Its tableing I'm really after.

    Eureka!
    http://home.earthlink.net/~hheister/

  • Create MVC Framework UI to load others MVC application and those should display their view in Framework UI Layout and work independently

    Hi,
    How it is possible to develop a UI Framework/ MVC UI Framework which will loads the others MVC Application. The Framework will show the views of loaded MVC app into UI Framework view. At the same time the Framework UI will show the default view of each loaded
    MVC app(Module). If user click on any MVC Module on the UI then that MVC module should update itself by calling its own controller and others MVC app view should not disturb due to this operation. The UI Framework layout need to facilitate somehow to show
    the default view of each MVC somehow in different DIV. All MVC App will work independently and having communication with UI Framework only. HTML5, CSS3 and MVC 5 can be used
    Can anyone please suggest how to proceed on this?

    That's a strange request, but anyway, the MVC section is at the link below,
    http://forums.asp.net/1146.aspx/1?MVC

  • Mouse over HTML link causes single frame to display at top of page Netscape only

    Having a wierd problem. When you run the mouse over HTML
    links on the page a single frame of the flash movie apears at the
    top center of the page. It only happens in netscape in firefox
    mode. IE, Opera, and Firefox do not have the problem.
    Problem site
    Thanks in Advance,
    Vorsch

    The problem goes away if i modify my .css file by removing
    the
    border: 1px solid #999999;
    line from the "a:hover" style.
    I ran my css file thru the validator at w3c and its fine. The
    Page also validates as xhtml transitional.
    and just a note the same file version is on my public server
    and my testing server.
    Has anyone ever seen this before?? I have several sites with
    a:hover effects and flass media and have never run across this
    before.

  • HTML links won't display in Dynamic Text Field

    I am loading external text files in dynamic text fields on my
    webage. These texts contain html links (<a href="page.html"
    target="_blank">Click Here</a> and I have "render as HTML"
    on and "selectable" off in my dynamic text field. Also, I am
    loading a CSS file. Not only do I not have a hand cursor, but I do
    not even have any of the text from that piece of html code down.
    What is going on with this? Please respond asap, as I have been
    struggling with this for a day now. Here is the Actionscript for
    loading the CSS:
    var flash_css = new TextField.StyleSheet();
    flash_css.load("styles.css");
    flash_css.onLoad = function(success:Boolean) {
    if (success) {
    zloc_txt.styleSheet = flash_css;
    } else {
    trace("Error loading CSS file.");
    var zloc_lv:LoadVars = new LoadVars();
    zloc_lv.load("zloc.txt");
    zloc_lv.onLoad = function(success:Boolean) {
    if (success) {
    zloc_txt.text = this.content;
    } else {
    trace("unable to load text file.");
    zloc_txt.html = true;
    zloc_txt.editable = false;
    _global.styles.TextArea.setStyle("backgroundColor" ,
    "transparent");
    _global.styles.TextArea.setStyle("border styles" , "solid");
    Here is a sample of the text file code:
    &content=<span class="headline">Northwest Arkansas
    Locations</span>
    121 Main St.
    Russellville, AK 77801
    (626) 111-1111<br />
    <html><a href="
    http://www.mapquest.com"
    target="_blank">Click Here for Driving
    Directions</a></html><br />
    Thanks for the help,
    Chuck

    The error is here:
    zloc_txt.text = this.content;
    Even if you rendered the textfield as HTML, you still need to
    tell flash that the variable you are inserting is HTML. Therefore
    you need to use the htmlText property.
    zloc_txt.htmlText = this.content;

  • How to display HTML file from Unix server on UI at runtime

    Hi Experts,
    My requirement is to display  HTML files,  related to some particular person, on UI. The file is existing on a separate UNIX server and a file related to one person may have a lot of attached files as well , as is the case generally with HTML files, including pictures etc. So it is no use transferring file on my CRM system, as the files are kept separately on this UNIX server which is particularly for this kind of storage.
    I am able to show files residing on MIME repository ( I created some new HTML files )  of my CRM system on UI. but I don't know how to go ahead with this particular requirement.
    One idea is that I can map one folder of my application server to that unix server so that I can see the HTML files in this particular folder. but I don't know how to map MIME repository folder to application server directory or directly to the UNIX server .
    Please advise. Is my approach correct or is there any other way ?
    thanks in advance.
    Regards,
    Vikas

    Maybe this is too simple, but have you got an HTTP server on the UNIX machine? You could simply link the URL into you CRM application and display the contents directly from UNIX.
    cheers Carsten

  • Html:link action html:link on results page null

    I am sure that this is something simple and small but I have been banging my head against this problem for a while now.
    I am using the <html:link> tag on my index.jsp page activates an action, retrieves a result and forwards to the homePage.jsp. The home page has a tiles layout and the results are actually in homePage_lowerLeftLevel.jsp within the homePage.jsp. Below the results I have an <html:link> tag which is identical to the tag in the index.jsp but now instead of seeing the link there is [ServletException in:/pages/homePage_leftLowerLevel.jsp] null' and if I go back to the index.jsp I get the following error�
    java.lang.NullPointerException
         at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:313)
         at index.jspService(index.jsp:29)
         [SRC:/index.jsp]
         at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:57)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:356)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:498)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:402)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:673)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    If this <html:link> tag is not on the results page the results display perfectly. Here is my code:
    ********index.jsp**************
    <%@ page language="java" %>
    <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
    <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
    <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
    <h2 class="lowerColumnHeader">Statistics</h2>
    <table class="statisticsTable">
    <tr>
    <td>
    ICF Published Parcels:
    </td>
    <td class="results">
    <bean:write name="homePageForm" property="result" />
    </td>
    </tr>
    </table>
    <html:link page="/homePage.do?areaId=bcId">Click Me </html:link>
    *********homePage_lowerLeftLevel.jsp*************
    <%@ page language="java" %>
    <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
    <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
    <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
    <h2 class="lowerColumnHeader">Statistics</h2>
    <table class="statisticsTable">
    <tr>
    <td>
    ICF Published Parcels:
    </td>
    <td class="results">
    <bean:write name="homePageForm" property="result" />
    </td>
    </tr>
    </table>
    <html:link page="/homePage.do?areaId=bcId">Click Me </html:link>
    *****************struts_config.xml**********************
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    under the License.
    -->
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
    "http://struts.apache.org/dtds/struts-config_1_3.dtd">
    <struts-config>
    <form-beans>
    <form-bean name="homePageForm"
    type="ca.bc.gov.srm.app.pip.HomePageForm" />
    </form-beans>
    <global-exceptions>
    <!-- sample exception handler
    <exception
    key="expired.password"
    type="app.ExpiredPasswordException"
    path="/changePassword.jsp"/>
    end sample -->
    </global-exceptions>
    <global-forwards>
    <forward
    name="homepage"
    path="/homePage.do"/>
    </global-forwards>
    <action
    path="/homePage"
    name="homePageForm"
    type="ca.bc.gov.srm.app.pip.action.HomePageAction"
    scope="request"
    validate="false"
    input="/pages/homePage.jsp"/>
    </action-mappings>
    <message-resources parameter="MessageResources" />
    <plug-in className="org.apache.struts.tiles.TilesPlugin" >
    <set-property property="definitions-config"
    value="/WEB-INF/tiles-defs.xml" />
    <set-property property="moduleAware" value="true" />
    </plug-in>
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property
    property="pathnames"
    value="/org/apache/struts/validator/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    </plug-in>
    </struts-config>
    Thank you very much for your help

    It should be used something like this!!!
    <html:link action="myStrutsAction" paramId="user" paramName="userName"/>if the userName attribute had the value "Bob" that would produce:
    http://struts.apache.org/struts-doc-1.2.x/userGuide/struts-html.html#link

  • How to use html:link in Ajax

    Hi frnds,
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
    <%@page import="java.sql.*" %>
    <html>
    <head>
    <script type="text/javascript">
    var xmlhttp;
    function loadXMLDoc()
    xmlhttp=null;
    alert(document.getElementById('country').value);
    alert(document.getElementById('url').value);
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    url=document.getElementById('url').value+"action=search&q="+document.getElementById('country').value+"&scope=tracker";
    xmlhttp.onreadystatechange=onResponse;
    xmlhttp.open("POST",url,true,"platts","platts1234");
    xmlhttp.send("");
    function onResponse()
    if(xmlhttp.readyState!=4) return;
    if(xmlhttp.status!=200)
    alert("Problem retrieving XML data: "+xmlhttp.statusText);
    return;
    y=xmlhttp.responseXML.documentElement.getElementsByTagName("response");
    alert(y.value);
    //alert(xmlhttp.statusText);
    txt="<div style='overflow:auto;height:400px;width=1200px' align='top'>";
    txt=txt+"<table border='1' style='border-collapse: collapse' bordercolor='#111111' width='100%'>";
    txt=txt+"<tr bgcolor='#D3D3D3'>";
    txt=txt+"<th width='5%'> </th>";
    txt=txt+"<th width='10%'>UID</th>";
    txt=txt+"<th width='7%'>PUBLICATION</th>";
    txt=txt+"<th width='10%'>INFRASTRUCTURE</th>";
    txt=txt+"<th width='10%'>PROJECT</th>";
    txt=txt+"<th width='10%'>STATUS</th>";
    txt=txt+"<th width='10%'>CAPACITY</th>";
    txt=txt+"<th width='10%'>STARTUP</th>";
    txt=txt+"<th width='28%'>NOTES</th>";
    txt=txt+"</tr>";
    x=xmlhttp.responseXML.documentElement.getElementsByTagName("tracked-item");
    for (i=0;i<x.length;i++)
    txt=txt + "<tr bgcolor='white'>";
    txt=txt+ '<td width="5%"><html:link action="Unpub" name="lng" property="uri"><img src="./images/Unpub.png" height="16" width="16" border="0" title="UnPublished Icon">';
    xx=x.getElementsByTagName("uri");
    document.getElementById('uri').value=xx[0].firstChild.nodeValue;
    try
    txt=txt + "<td width='10%'><input type='text' name='uri' value="+ xx[0].firstChild.nodeValue +">" + xx[0].firstChild.nodeValue + "</td>";
    catch (er)
    txt=txt + "<td width='10%'> </td>";
    txt=txt+'</html:link>';
    xx=x[i].getElementsByTagName("Publication");
    try
    txt=txt + "<td width='7%'>" + xx[0].firstChild.nodeValue + "</td>";
    catch (er)
    txt=txt + "<td width='7%'> </td>";
    xx=x[i].getElementsByTagName("infraStructure");
    try
    txt=txt + "<td width='10%'>" + xx[0].firstChild.nodeValue + "</td>";
    catch (er)
    txt=txt + "<td width='10%'> </td>";
    xx=x[i].getElementsByTagName("project");
    try
    txt=txt + "<td width='10%'>" + xx[0].firstChild.nodeValue + "</td>";
    catch (er)
    txt=txt + "<td width='10%'> </td>";
    xx=x[i].getElementsByTagName("status");
    try
    txt=txt + "<td width='10%'>" + xx[0].firstChild.nodeValue + "</td>";
    catch (er)
    txt=txt + "<td width='10%'> </td>";
    xx=x[i].getElementsByTagName("capacity");
    try
    txt=txt + "<td width='10%'>" + xx[0].firstChild.nodeValue + "</td>";
    catch (er)
    txt=txt + "<td width='10%'> </td>";
    xx=x[i].getElementsByTagName("startup");
    try
    txt=txt + "<td width='10%'>" + xx[0].firstChild.nodeValue + "</td>";
    catch (er)
    txt=txt + "<td width='10%'> </td>";
    xx=x[i].getElementsByTagName("notes");
    try
    txt=txt + "<td width='28%'>" + xx[0].firstChild.nodeValue + "</td>";
    catch (er)
    txt=txt + "<td width='28%'> </td>";
    txt=txt + "</tr>";
    txt=txt+ "</table>";
    txt=txt+ "</div>";
    document.getElementById('tab').innerHTML=txt;
    </script>
    </head>
    <body onload="loadXMLDoc()" bgcolor="#D8D8BF" >
    <html:form action="Unpub" styleId="searchForm">
    <%@ include file="header.jsp" %>
    <img src="./images/Unpub.png" height="16" width="16"/> --> Unpublished Data
    <br><br><br><br>
    <html:hidden property="country" name="lng"/>
    <html:hidden property="uri" name="lng"/>
    <html:text property="uri" name="lng"/>
    <input type="hidden" id="url" value='<%=application.getInitParameter("url")%>'>
    <div style="overflow:auto;height:400px" align="top">
    <div id="tab"></div>
    </div>
    </html:form>
    </body>
    </html>
    Here is my code.... my intension is ... when i click the <html:link> which is there in the script i want to get the corresponding rows 'uri'. and that uri i need to pass to the bean.
    Here in this case my problem is which ever icon i press i'm able to get the last uri
    for ex:- if there are 10 records displayed in tabular format. if i press any icon i'm getting only the 10th uri....
    So, kindly please help me to sort out this problem.

    Hi Gobinath,
    Please check the below similar links
    How to display a HTML Page in Webdynpro (without IFrame)?
    can i embed an html page in the webdynpro
    HTML Editor in WebDynpro
    How to connect to a html using webdynpro
    Hope that helps
    regards
    Anil
    Message was edited by:
            Armin Reichert

  • Converting HTML Links to Hyperlinks in InDesign

    Hi--I'm new to this forum, so forgive any newbie-ness...
    Working on a pretty intense automated page layout which creates a product cut sheet based from content that is on the web (using AppleScript). One feature I'm trying to build in is to convert typical HTML href tags to an actual hyperlink in InDesign.
    I'm using GREP to find all the html tags, which works very well.
    What I can't do (and it might be a limitation of GREP in ID) is store the 'change to' locations as variables in AppleScript. For example, I use:
    --find the href tag
    set find what of find grep preferences to "(?i)(<a href=\")(.+?)(\")(.*)(>)(.*)(</a>)"
    --change to the stuff in the href=" " and the text I want to keep
    set change to of change grep preferences to "$2 $6"
    What I NEED is the ability to make $2 and $6 variables.
    Any advice, tips, hints, tricks, and/or help?
    Thanks all!

    Sorry, it's been a while since I solved this, so its not too fresh. There may be pieces missing. Here's the exerpt of what I did to change real html marked-up text (which contains hyperlinks) into real, clickable InDesign hyperlinks. In a few words, I found the html hyperlinks in the text, and "marked it up" with my own "xml" type language (for later). Then I think I made an array of every link and location, then had InDesign go through and convert to hyperlinks.
    ---CONVERT HREFS TO HYPERLINKS------------------------------------------------------
        set find grep preferences to nothing
        set change grep preferences to nothing
        --FIND HYPERLINKS
        set include footnotes of find change grep options to false
        set include hidden layers of find change grep options to false
        set include locked layers for find of find change grep options to false
        set include locked stories for find of find change grep options to false
        set include master pages of find change grep options to true
        set find what of find grep preferences to "(?i)(<a href=\")(.+?)(\")(.*?)(>)(.*?)(</a>)"
        --set find what of find grep preferences to "(?i)(?<=<a href=\").+?(?=\")"
        set change to of change grep preferences to "<url>http://www.mywebaddress.com$2</url> <linked text>$6</lt>"
        set applied character style of change grep preferences to nothing
        tell specSheet
            change grep
        end tell
    set find grep preferences to nothing
        set change grep preferences to nothing
        --FORMAT HYPERLINKS
        set include footnotes of find change grep options to false
        set include hidden layers of find change grep options to false
        set include locked layers for find of find change grep options to false
        set include locked stories for find of find change grep options to false
        set include master pages of find change grep options to true
        set find what of find grep preferences to "http://.+?(?=</url> <linked text>)"
        set change to of change grep preferences to ""
        set applied character style of change grep preferences to nothing
    tell specSheet
            set myFoundItems to find grep
            set linkURL to get myFoundItems
        end tell
        set find what of find grep preferences to "(?<= <linked text>).+?(?=</lt>)"
        tell specSheet
            set myFoundTextLinks to find grep
            set linkNames to get myFoundTextLinks
        end tell
        set masterList to {}
        set numItems to count of linkURL
        set n to 1
        repeat numItems times
            set end of masterList to {item n of linkURL, item n of linkNames}
            set n to (n + 1)
        end repeat
        tell specSheet
            repeat with currentLink in masterList
                set hyperLinklocation to item 2 of currentLink
    try
                    set hyperLink1 to make hyperlink URL destination with properties {name:item 2 of currentLink as string, destination URL:item 1 of currentLink as string}
                on error
                    set hyperLink1 to hyperlink URL destination (item 2 of currentLink as string)
                end try
                try
                    set hyperLinkText to make hyperlink text source with properties {source text:hyperLinklocation, hidden:false, applied character style:character style "hyperlink"} --name:item 2 of currentLink as string,
                on error
                    set hyperLinkText to hyperlink text source (item 2 of currentLink as string)
                end try
                try
                    make new hyperlink with properties {destination:hyperLink1, source:hyperLinkText, hidden:false} --name:item 2 of currentLink as string}
                on error
                    make hyperlink with properties {destination:hyperLink1, source:hyperLinkText, hidden:false}
                end try
            end repeat
            --set linksDone to "true"
        end tell
        set myFoundItems to {}
        set myFoundTextLinks to {}
    end tell
    tell application "Adobe InDesign CS5"
        --REMOVE MARKUP -URLS FROM COPY
        set find grep preferences to nothing
        set change grep preferences to nothing
        --Set the find options.
        set include footnotes of find change grep options to false
        set include hidden layers of find change grep options to false
        set include locked layers for find of find change grep options to false
        set include locked stories for find of find change grep options to false
        set include master pages of find change grep options to true
        set find what of find grep preferences to "<url>.+?</url> "
        set change to of change grep preferences to ""
        tell specSheet
            change grep
        end tell
        --Clear the find/change preferences after the search.
        set find grep preferences to nothing
        set change grep preferences to nothing
        --display dialog "URL text deleted."
        --LINKED TEXT TAGS REMOVAL AND CHARACTER FORMAT
        set find grep preferences to nothing
        set change grep preferences to nothing
        --Set the find options.
        set include footnotes of find change grep options to false
        set include hidden layers of find change grep options to false
        set include locked layers for find of find change grep options to false
        set include locked stories for find of find change grep options to false
        set include master pages of find change grep options to true
        set find what of find grep preferences to "<linked text>|</lt>"
        set change to of change grep preferences to ""
        --set applied character style of change grep preferences to "hyperlink"
        tell specSheet
            change grep
        end tell
        --Clear the find/change preferences after the search.
        set find grep preferences to nothing
        set change grep preferences to nothing
        --display dialog "Linked text tags removed, style applied."
    end tell

  • Button with HTML-Link

    Hi!
    I've to create buttons on a dynpro, which process the currently installed frontend mail client (zB. Notes, Outlook, etc.) and fill the recipients, subject and mail body dynamically at the end of "PROCESS AFTER INPUT".
    The application handling should be like a HTML-Link (for example: <a href="mailto:[email protected]?body=Hello%20Fritz,%0D%0A%0D%0Aich%20wollte%20nur%20sagen,%20dass%20">Mail mit Body</a>).
    The solution should work in SAPGui for Windows and SAPGui for HTML.
    Does anybody knows a example coding?
    Any hints are welcome.
    Thanks, happy new year!
    Peter Lintner

    develop a FM with the following code and call it onclick of a button.
    function y_outlook_mail_create.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(I_SUBJECT) OPTIONAL
    *"  TABLES
    *"      EMAIL_BODY STRUCTURE  SOLI OPTIONAL
    *"      ADDRESS_LIST STRUCTURE  SOLI OPTIONAL
    *"      ATTACHMENTS STRUCTURE  SOLI OPTIONAL
    *"  EXCEPTIONS
    *"      INVALID_PATH
    *"      DOWNLOAD_FAILED
    *"      EXECUTION_FAILED
    data:
        v_translate(2),
        it_vbs          like soli
           occurs 50 with header line,
        v_last,
        v_vbs_filename  like rlgrap-filename,
        wf_filename like rlgrap-filename ,
        commandline(1000).
    *- Prepare a code to translate a quote into a hex-tab
    *- so it can then be translated back to 2 double quotes.
      concatenate '"' '9' into v_translate.
    *  CON_HEX-TAB'
      append:
        'Dim myolapp                                        ' to it_vbs,
        'Dim olNamespace                                    ' to it_vbs,
        'Dim myItem                                         ' to it_vbs,
        'Dim myRecipient                                    ' to it_vbs,
        'Dim myAttachments                                  ' to it_vbs,
        '                                                   ' to it_vbs,
        'Set myolapp = CreateObject("Outlook.Application")  ' to it_vbs,
        'Set olNamespace = myolapp.GetNamespace("MAPI")     ' to it_vbs,
        'Set myItem = myolapp.CreateItem(olMailItem)        ' to it_vbs,
        '                                                   ' to it_vbs.
    *- Translate the body into a single line.
      loop at address_list.
        concatenate
          'Set myRecipient = myItem.Recipients.Add("'
          address_list
          into it_vbs.
        append it_vbs.
      endloop.
      append:
        'myItem.VotingOptions = "Approve;Reject"' to it_vbs.
    *- Build the subject line.
      concatenate
        'myItem.Subject = "'
        i_subject
        into it_vbs.
      append it_vbs.
    *- Prepare attachments
      append:
        'Set myAttachments = myItem.Attachments' to it_vbs.
    *- Check if the attachment exists
      loop at attachments.
      clear wf_filename .
      move: attachments-line to wf_filename .
        call function 'WS_QUERY'
             exporting
                  filename       = wf_filename "ATTACHMENTS
                  query          = 'FE'
             exceptions
                  inv_query      = 1
                  no_batch       = 2
                  frontend_error = 3
                  others         = 4.
        if sy-subrc eq 0.
          concatenate 'myAttachments.Add("'
                      attachments
            into it_vbs.
          append it_vbs.
    * '    olByValue, 1, "4th Quarter 1996 Results Chart"'
    *      append '    olByReference, 1' to it_vbs.
        else.
          message i017(zz) with
             'Could not attach' attachments.
        endif.
      endloop.
    *- Prepare the email body.
      clear: v_last, it_vbs.
      append it_vbs.
      loop at email_body.
        at first.
          append 'myitem.HTMLbody = _' to it_vbs.
        endat.
        at last.
          v_last = 'X'.
        endat.
        translate email_body using v_translate.
        while sy-subrc eq 0.
          replace '09' with '""' into email_body.
        endwhile.
        if v_last = 'X'.
          concatenate '"' email_body '" &vbCrLf '
            into it_vbs.
        else.
          concatenate '"' email_body '" &vbCrLf  &_'
            into it_vbs.
        endif.
        append it_vbs.
      endloop.
      append 'myItem.Display' to it_vbs.
    *- Prepare the vbscript filename for download and execution
      clear v_vbs_filename.
      call function 'WS_QUERY'
           exporting
                environment    = 'TEMP'
                query          = 'EN'
           importing
                return         = v_vbs_filename
           exceptions
                inv_query      = 1
                no_batch       = 2
                frontend_error = 3
                others         = 4.
      if sy-subrc <> 0.
        raise invalid_path.
      endif.
      concatenate v_vbs_filename 'mail.vbs'
        into v_vbs_filename.
      commandline = v_vbs_filename.
    *- Download the file
      call function 'WS_DOWNLOAD'
           exporting
                filename            = v_vbs_filename
                filetype            = 'DAT'
                mode                = 'S'
           tables
                data_tab            = it_vbs
           exceptions
                file_open_error     = 1
                file_write_error    = 2
                invalid_filesize    = 3
                invalid_table_width = 4
                invalid_type        = 5
                no_batch            = 6
                unknown_error       = 7
                others              = 8.
      if sy-subrc <> 0.
        raise download_failed.
      endif.
      call function 'WS_EXECUTE'
           exporting
                commandline    = commandline
                program        = 'WSCRIPT.EXE'
           exceptions
                frontend_error = 1
                no_batch       = 2
                prog_not_found = 3
                illegal_option = 4
                others         = 5.
      if sy-subrc <> 0.
        raise execution_failed.
      endif.
    endfunction.
    Regards
    Raja

  • MIME-TYPE is stored incorrectly sometimes, browsers can't display html content

    Our company is switching from Netscape Communicator to Internet Explorer 5.5 . This resulted sometimes in html-documents which could not be opened in netscape anymore, but caused the save-as dialogue box to pop-up.
    Analysis of this problem, with the aid of Oracle Support, showed some html-documents were stored in WWV_DOCUMENT with mime-type application/octer-stream. This is a mime type which should trigger the save-as pop-up dialogue in browsers. Netscape acts accordingly, but IE does display the content normally.
    The following events cause this problem:
    1. create a html document using a microsoft office product (word/excel)
    2. DON'T close the document in the office application
    3. Use the portal wizard to upload the file to a content area
    4. Use table WWV_THINGS and WWV_DOCUMENT and see mime-type isn't text/html but application/octet-stream
    5. IE shows the file, NN wants to save it.
    The workaround to this problem is to close the file in MSOffice before uploading it.
    Oracle Development confirmed it's the browser which sends this incorrect mime-type, and portal just stores this type. It seems this mime-type is overruling the extension to mime-type mapping in the configuration of Apache, using AddType or the file mime.types.
    So the mime-types defined in apache are only used outside mod_plsql, that is, when files from the filesystem of the webserver itself are used.
    When uploading a zip-file, and unzipping it in the database, all files get the right mime-type. It seems in this situation the mime-type is determined by looking either at the file-extention or the magic bits.
    Oracle says it's a microsoft bug, so I'll have to ask Bill for a fix.
    They are probably right, and I think I could reproduce this using CGI-scripting without modplsql and portal.
    But:
    It seems not logically to me that it depends on the method of uploading files (single files, or zipped files) which method of mime-type determination is used.
    Furthermore, I find it strange that it depends on the storage location of the file (database or filesystem) which mime-type is presented at the user.
    I'd like to hear your opinions about this
    Regards,
    Ton Haver

    You want to be using <html:link forward="YOUR_FORWARD"> only when you want to forward to static elements and not elements that require actions. So in index.jsp, since you just want to forward to a static jsp page (allarticle.jsp), you can use
    <html:link forward="show">Show All forum</html:link>But since you want your "one forum" link to populate a session attribute BEFORE loading /jsp/loveforum.jsp, you need
    <html:link action="article">one forum</html:link>The reason it's not working now is because you're accessing a session attribute that isn't populated becuase you link to the page statically and it never gets the value of "list" actually stored in the session.
    The reason it works when you change your forward element is because it calls the action that saves "list" into your session.

Maybe you are looking for