JEditorPane - Links and Mailtos...

Hi everyone,
For a while now, I have been trying to figure out how to get hyperlinks working in a JEditorPane. I realize I could make it uneditable and all that, but I need two things above and beyond:
1) I need the link you clicked to open in your default web browser.
2) I need "mailto" links to open a new e-mail in your default e-mail client.
I have no idea where to find code for (1) and (2)... I have searched high and low and can't find anything useful, especially for (2).
I would be grateful for any help.
Thank you,
Wojciech

Hello Jesper:
I do have mye links as a componet and it is easy to make any changes, but the links still add size to every page, which is what I don't want. I might have to redo my website using frames because I think this is the only way to have the links load once. (is this right?).
I was hoping to not have to redo my entire site ... as it will be a lot of work and I was hoping there would beanother option.
Thank you for your help.
Brenda

Similar Messages

  • XHR and mailto links

    Hello there,
    I just ran into a bug with using XHR and mailto links. I have a simple app that fetches customer info from a web service, then reads some email templates and plugs the customer info into the email templates which are implemented as mailto links with subject and body parameters.
    The bug is that XHR stops working after I click any mailto link. The XHR will go out but its readyState never changes. If I restart the app, everything works again. If I add an event handler to the mailto links that stops the event, then the XHR doesn't break (but the email client doesn't get called either).
    The best solution I've come up with is to add a bogus target to my mailto links. That causes a new window to be displayed when the link is clicked so it's not ideal but it prevents my XHRs from going crazy.
    Is this a known bug? Is there a place to file bugs so they can be tracked? I filed it somewhere but there was a disclaimer saying they won't get back to me and it didn't tell me where bugs are tracked.
    I wanted to make a server call so the server could send the mail, but my client doesn't have a server that he can upload scripts to, it's an ecommerce website that he is not allowed to touch except from their web interface.
    I thought about issuing a command line call, but found that Adobe Air has no easy way to send a simple command.
    I also thought about finding a library that can send email; I found one in flash, which means I can use it from adobe air, but that would mean I'd have to write the UI for the email editor.
    Does anybody have any suggestions? Please drop a line with anything you may find useful

    Is anybody out there? No answers to this question yet. I just installed FF 6.0.2, and the bug is still there. What are the plans to fix it????

  • Send Link and Mail To are stop working after update to FF v.13 on WinXP

    Send Link and Mail To where stopped working after upgrade to FF13 on win XP. I'd appreciate any suggestions.
    Thank you in advance

    Can you check to see whether your mailto setting got changed?
    orange Firefox button ''or'' classic Tools menu > Options > Applications
    In the Search box above the list, type or paste '''mailto''' and pause while Firefox filters the list. On the right side, you can select your mail application. Unless it's missing. Are you able to establish the connection?

  • How to update link and import data of relocated incx file into inca file?

    Subject : <br />how to update link and import data of relocated incx file into inca file.?<br />The incx file was originally part of the inca file and it has been relocated.<br />-------------------<br /><br />Hello All,<br /><br />I am working on InDesignCS2 and InCopyCS2.<br />From indesign I am creating an assignment file as well as incopy files.(.inca and .incx file created through exporing).<br />Now indesign hardcodes the path of the incx files in inca file.So if I put the incx files in different folder then after opening the inca file in InCopy , I am getting the alert stating that " The document doesn't consists of any incopy story" and all the linked story will flag a red question mark icon.<br />So I tried to recreate and update the links.<br />Below is my code for that<br /><br />//code start*****************************<br />//creating kDataLinkHelperBoss<br />InterfacePtr<IDataLinkHelper> dataLinkHelper(static_cast<IDataLinkHelper*><br />(CreateObject2<IDataLinkHelper>(kDataLinkHelperBoss)));<br /><br />/**<br />The newFileToBeLinkedPath is the path of the incx file which is relocated.<br />And it was previously part of the inca file.<br />eg. earlier it was c:\\test.incx now it is d:\\test.incx<br />*/<br />IDFile newIDFileToBeLinked(newFileToBeLinkedPath);<br /><br />//create the datelink<br />IDataLink * dlk = dataLinkHelper->CreateDataLink(newIDFileToBeLinked);<br /><br />NameInfo name;<br />PMString type;<br />uint32 fileType;<br /><br />dlk->GetNameInfo(&name,&type,&fileType);<br /><br />//relink the story     <br />InterfacePtr<ICommand> relinkCmd(CmdUtils::CreateCommand(kRestoreLinkCmdBoss)); <br /><br />InterfacePtr<IRestoreLinkCmdData> relinkCmdData(relinkCmd, IID_IRESTORELINKCMDDATA);<br /><br />relinkCmdData->Set(database, dataLinkUID, &name, &type, fileType, IDataLink::kLinkNormal); <br /><br />ErrorCode err = CmdUtils::ProcessCommand(relinkCmd); <br /><br />//Update the link now                         <br />InterfacePtr<IUpdateLink> updateLink(dataLinkHelper, UseDefaultIID()); <br />UID newLinkUID; <br />err = updateLink->DoUpdateLink(dl, &newLinkUID, kFullUI); <br />//code end*********************<br /><br />I am able to create the proper link.But the data which is there in the incx file is not getting imported in the linked story.But if I modify the newlinked story from the inca file,the incx file will be getting update.(all its previous content will be deleted.)<br />I tried using <br />Utils<IInCopyWorkflow>()->ImportStory()<br /> ,But its import the incx file in xml format.<br /><br />What is the solution of this then?<br />Kindly help me as I am terribly stuck since last few days.<br /><br />Thanks and Regards,<br />Yopangjo

    >
    I can say that anybody with
    no experience could easily do an export/import in
    MSSQLServer 2000.
    Anybody with no experience should not mess up my Oracle Databases !

  • Getting links and its names from a html file

    Hi everyone
    My problem about the a getting links with name from a html file. For example
    &#304;n a web page in this site ?SUN? when use click SUN the browser open http://java.sun.com
    &#304; want both of them, so the links and name. I can succeeded the get link but i don t know how to get the link name.
    For example :
    <B>setRightComponent(Component)</B>
    &#304;n this code segment i want to get B tag. But how i don t know. To get A tag i used this code
    List result = new ArrayList();
    try {
    // Create a reader on the HTML content
    URL url = new URI(uriStr).toURL();
    URLConnection conn = url.openConnection();
    Reader rd = new InputStreamReader(conn.getInputStream());
    // Parse the HTML
    EditorKit kit = new HTMLEditorKit();
    HTMLDocument doc = (HTMLDocument)kit.createDefaultDocument();
    kit.read(rd, doc, 0);
    // Find all the A elements in the HTML document
    HTMLDocument.Iterator it = doc.getIterator(HTML.Tag.A);
    while (it.isValid()) {
    SimpleAttributeSet s = (SimpleAttributeSet)it.getAttributes();
    String link = (String)s.getAttribute(HTML.Attribute.HREF);
    if (link != null) {
    result.add(link);
    it.next();
    &#304; can use B tag but i don t know hot to get its value because it has no prefix such as HREF....
    i am sorry if i use a bad explanation style or incorrect word.

    import java.io.*;
    import java.net.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    class GetLinks
        public static void main(String[] args)
            throws Exception
            // Create a reader on the HTML content
            Reader reader = getReader( args[0] );
            // Parse the HTML
            EditorKit kit = new HTMLEditorKit();
            HTMLDocument doc = (HTMLDocument)kit.createDefaultDocument();
            doc.putProperty("IgnoreCharsetDirective", Boolean.TRUE);
            kit.read(reader, doc, 0);
            // Find all the A elements in the HTML document
            HTMLDocument.Iterator it = doc.getIterator(HTML.Tag.A);
            while (it.isValid())
                SimpleAttributeSet s = (SimpleAttributeSet)it.getAttributes();
                String href = (String)s.getAttribute(HTML.Attribute.HREF);
                int start = it.getStartOffset();
                int end = it.getEndOffset();
                String text = doc.getText(start, end - start);
                System.out.println( href + " : " + text );
                it.next();
        // If 'uri' begins with "http:" treat as a URL,
        // otherwise, treat as a local file.
        static Reader getReader(String uri)
            throws IOException
            // Retrieve from Internet.
            if (uri.startsWith("http:"))
                URLConnection conn = new URL(uri).openConnection();
                return new InputStreamReader(conn.getInputStream());
            // Retrieve from file.
            else
                return new FileReader(uri);
    }

  • When i search for a website it takes me to another website.  I will click on the link and it takes me to one ive never wanted?  please help very frustrating!  I am not very computer savy, is it my settings or something?  Jen

    When I search for a website it itakes me to another website.  I will click on a link and it takes me to something completely different or yellow pages etc. Please help I am very frustrated and not very computer savy!  Thanks!  Jen

    Hi Jeff I have uninstalled Muse from my applications and have tried to download the new version but it displays a message 'file not found'. I have included a screenshot.

  • On YouTube, I can't play playlists there. It says I need to update my Java and it is updated already. When I go to different sites like Yahoo! the links and images are all distorted. This is the second time this has happened to me now

    Hello Firefox,
    I am having problems with my Firefox's image processor I believe. My web browser is fine but then a few minutes later I get some weird look on my page. It then just stays here and I can't fix it. When I go to Yahoo all the links and images do not look normal. I really cannot explain this and wish I could send a picture instead. When I go to the Log in page for Facebook I do not see the image of the small faces networking around the world. It's blank and the links are widely spread apart. With YouTube the page is also distorted. Nothing is arranged properly. I can watch videos. However when I go to someone's profile or a playlist videos cannot play or show up. It says I need to update my Java player and it is already updated. It still happens when I uninstall and re install back. I was only able to fix this problem by uninstalling everything related to Firefox. I do not know how to solve this any other way. I don't like it when all my information is lost such as saved passwords and bookmarks. If there is any way to solve this thanks. I don't want to uninstall this again.

    Your above posted list of installed plugins doesn't show the Flash plugin for Firefox.<br />
    See [[Managing the Flash plugin]] and [[Installing the Flash plugin]]
    You can check the Adobe welcome and test page: http://www.adobe.com/software/flash/about/
    You can use this manual download link:
    *http://kb2.adobe.com/cps/191/tn_19166.html#main_ManualInstaller

  • My iMessage says it needs to be activated but i clicked the link and it already says its been activated...how do i get my imessage to turn on?

    I just updated my 3GS to the 6 and everything has turned out well, but when i started signing up for the imessage i ran into some problems. I went through each step as it asked and then it sent a verification link to my email and thats where im lost at. I went to my email and clicked on the link and it says my account has already been verified. When i go back to settings and down to messages where you turn on imessage it says "waiting for activation. What is going on? thanks in advance

    First thing to try is to reset your device. Press and hold the Home and Sleep buttons simultaneously ignoring the red slider should one appear until the Apple logo appears. Let go of the buttons and let the device restart. See if that fixes your problem.

  • Safari 6.0 crash when right clicking a link and choosing open in new tab

    Hi all,  just a general question.  I admit i did not search the forums yet.  Hopefully this little annoyance can be resolved.
    When using safari on say CNN.COM i'll right click on a link and choose Open in new tab.  safari randomly disappears.  no crash warnings,  just gone.  I can open it right up and be fine sometimes all day.   This has happened to me about 5x since ML was released (i wiped my laptop the day it came out)
    This has happened on a couple of different website at different times of the day.  only safari was running. No other apple apps have this issue.
    I have a MacBook Pro from earily '08 type 4,1
    i have only apple software on this machine
    i do have adobe flash installed v11.3 updated today.
    i do have lastpass enabled
    i do have ad-block disabled
    While i'm waiting for help from you guys i'll disable all addon's and try to remove adobe to see if that is the issue.  Is there any other steps i can try like delete .plist file or maybe even trying a new user profile.  I am a IT professional and am not afraid to get my hands dirty trying to get this resovlved.
    Thanks in advance.
    P.S. i'll search the forums too and if i see a similar post i'll remove this one.
    Bill Siegfried.

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the page that opens.
    Step 1
    Enter the name of the crashed application or process in the Filter text field. Post the messages from the time of the last crash, if any — the text, please, not a screenshot.
    Important: Some private information, such as your name, may appear in the log. Edit it out by search-and-replace in a text editor before posting.
    Step 2
    Still in the Console window, look under User Diagnostic Reports for crash reports related to the process. The report name starts with the name of the crashed process, and ends with ".crash". Select the most recent report and post the contents — again, the text, not a screenshot. In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.) Please don’t post shutdownStall, spin, or hang logs — they're very long and not helpful.

  • How can I stop from getting the "Firefox is already running" error message when trying to open links and FF has already been opened through a symbolic link?

    I use symbolic links and program shortcuts as a way to easily open different Firefox profiles ie. one for casual/personal use and another for work. This works well, but I get the "Firefox is already running, but is not responding" error message if I try to open external links with FF as my default browser. FF is actually open and running fine, but I guess it doesn't acknowledge this fact because of how I'm originally starting the process.
    I wasn't able to add the symbolically linked executables to the default program pane. Is there a way to bypass this error or other way to fix this?
    The solution to the question linked below is what I'm using to open the different FF profiles.
    http://superuser.com/questions/255312/pin-same-app-multiple-times-in-windows-7

    hello, this is probably happening when you run the default profile with the -no-remote switch.
    http://kb.mozillazine.org/Profile_in_use

  • When I click a link, it won't open in a new tab unless I right click and select open in new tab. How do I change it so that I can click on a link and it will open?

    I want to click on a link and have it open, how do I do that, without right clicking?

    Click the link with the scroll wheel.

  • I am unable to open new tabs, in any way I attempt to do so. I have checked the settings and they are fine, so it's not those. The only way I can open a new tab is to right click on a link and instruct it to open in a new tab.

    Any way I attempt to open new tabs, be it clicking on the new tab button or using the short-cut Ctrl-t, I am unable to open any new tabs on my browser window.
    The only way I have found that I can open a new tab is to right-click on a link and instruct that link to open in a new window.

    Try disabling the Ask Toolbar extension.

  • Links and destinations problems - page view

    Hi there,
    I'm working on a large PDF in Adobe Acrobat 9 Pro. This PDF has a LOT of internal links, and I want to link to a page view, and inherit zoom. Not only do I have to manually change the zoom to "inherit zoom" after I create a link, but Acrobat has stopped saving my changes.
    Things were going along swimmingly for awhile - I was creating links, making the destination a page view (so that the user can find the appropriate glossary entry I'm linking them to), and then going back and choosing "Inherit Zoom". And then copying the link and pasting it throughout the document as I needed. all great. Until, randomly, one of the links didnt' test right. I clicked on it and was taken to the TOP of the page, not the page view - its action was set to "Go to a page in this document" instead of "Go to a page view". So I deleted that link, and started over with a fresh one, making sure it was set to "Go to a page view". Then I copied that link, and pasted it 2 pages later. I tested that second link, and once again it just took me to the top of the page. I tested the original one - the one I made to replace the faulty one 2 pages ago - and even though I had JUST set it to page view, it too just went to the top of the page.
    This is so frustrating - Acrobat is literally just ignoring my commands. I am at a loss as to what to do. Please help!

    Somewhere you are doing an add to the vector without first clearing it somewhere...

  • EJB Finder View Links and CMR

    Hi,
    Can someone please give me some input on the following warning in the JDeveloper online help!
    "Warning: You cannot create an EJB finder view link that expresses the same relationship as a CMR."
    I'm new to EJB, BC4J and JDeveloper. I created container managed entity beans with local interfaces only to represent my data and relationships. No problems with the mapping so far.
    To test the beans I used Session Facades with remote interfaces and build a sample test client.
    Now I thought I could create EJB Entity Facades, EJB Finder View Objects, EJB Finder View Links and EJB Application Modules to make use of the BC4J framework in order to speed up programming clients (JSP and JClient).
    So I've started studying the JDeveloper online help (which seems to be very useful) and found the above mentioned warning.
    Well, better a warning than nothing at all, but some more explanations would have been even better.
    Is there no need to use view links with CMR?
    How to achieve the same functionality (synchronizing two view objects in a master-detail-relationship) with CMR?
    Do you know any examples? I couldn't find any examples using EJB entity facades in the "sample code" area on OTN.
    Any comments about other (better) architectures are also welcome. Would it be better to use BMP entity beans in conjunction with BC4J?
    Many thanks for your help!
    Regards,
    Eric

    Steven,
    thank you for your reply and suggestions - I'll count on that. If I find time I'll read this book. It seems to be very interesting.
    For educational purposes I'd like to look at both persistence implementation strategies. I agree that it looks definitly easier to use entity objects. Certainly it's also performancewise a better choice.
    Anyhow, could you give me some useful tips for cmp entity beans and finder view objects?
    Is there something which works completely different if I use BC4J on top of it?
    How to implement a master-detail relationship in JClient (Swing) for example?
    What about writing an ejbfinder which doesn't return all, but all data where the foreign key is equal to a parameter passed to the finder method and use this as the source for a detail view object. This could be the primary key of the selected master. Well, I don't know whether this is doable. But that's what comes to my mind spontaneously.
    Would this be a solution? I'm still thinking about the aforementioned warning in the online help regarding view links.
    I guess the problem is that the foreign key is not part of the entity bean as it's not a cmp-field. Instead you have accessor methods to retrieve a related object or a collection of objects.
    I'm sure my questions are not too complicated to answer. It's only hard for a beginner to get an overview.
    I'm quite confident that I'll manage this if I give my best and get some help from knowledgeable people like you Steven.
    Regards,
    Eric

  • User clicks one link and goes to other and comes back state maintain prob

    1st say 2 links r there,
    aaa --> if u click on "aaa" (my requirement) as shown below.
    problem : the bean values still maintaining when i go to "bbb" and come back to "aaa".
    ======
    NOTE: when user enters all fields and clicks on button it goes to "second.jsp" their ajax response (1 table) generating. That means page wont get refreshed. (panel is fixed) only down 1 table will generate.
    on FROM DATE AND TO DATE basis.
    if user presses on F5 also state maintaining with the help of bean object.
    i.e, say user in response table clicks on "page 5" then presses on F5 .
    but problem is when user goes to "bbb" link or "ccc" or "dddd" (separate interface or link) which is not related to this
    (they r nearly 50 interfaces or links) and comes back to "aaa" still old response is there.
    NOTE: i can clear the bean object, but if i clear the bean object in "onload" or general i cant handle F5 issue.
    bbb
    ccc
    ddd
    sample
    =====
    first.jsp
    =====
    <jsp:useBean id="sd" class="TestPage" scope="session">
    </jsp:useBean>
    <jsp:useBean id="sptb" class="TestPageBean" scope="session">
    </jsp:useBean>
    <script type='text'/javascript'>
    function testfun()
    --ajax response.
    forwarding to to
    "second.jsp"
    </script>
    <%
    HttpSession mdsession=request.getSession(false);
    if(mdsession!=null){
    String s1=sptb.getTxtname();
    String s2=sptb.getTestselect();
    %>
    <form>
    <table>
    <tr><td><input type='text' name='fromdate' value='fromdate'></td></tr>
    <tr><td><input type='text' name='todate' value='todate'></td></tr>
    <tr><td><select name='testselect''><option value=1>aaa</option></select></td></tr>
    <tr><td><input type='contains' name='txtname' value=''></td></tr>
    <tr><td><input type='button' name='clickname' value='Click' onclick='testfun()'></td></tr>
    </table>
    </form>
    <%
    %>
    second.jsp (this is ajax response)
    =======
    <%
    String txtname= request.getParameter("txtname");
    String testselect= request.getParameter("testselect");
    String fromdate= request.getParameter("fromdate");
    String todate= request.getParameter("todate");
    --storing in bean
    sptb.setTxtname(txtname);
    sptb.setTestselect(testselect);
    sptb.setTxtname(fromdate);
    sptb.setTestselect(todate);
    ---database conn...resultset values retrieved on "fromdate" and "to date" basis
    out.println("<table><tr><td>testeno</td><td></testename></td><td>fromdate</td></tr></td>");
    while(rs.next())
    out.println(rs.getString(3);
    %>
    output
    ====
    input screen
    1 fromdate
    1 todate
    1 selectbox
    1 contains
    1 button
    -> after clicking on button ajax response displayed below is (with out page refresh)
    1 table gets displayed on "FROM DATE" AND "TO DATE" BASIS
    with pagination

    Michael,
    Thanks a lot for the reply.
    In the case you have mentioned, how does application has to know the user is 'moving away'[clicking on other role] from the application.
    Thanks in advance,
    Regards,
    Ganga

Maybe you are looking for

  • Short dump if we run RSCONN01

    Hi, I'm getting a short dump if I run RSCONN01. Is there any way to avoid that, or any setting required to run the report. It happens in a FORM Routine XAB_RUN_DRIVER            if new_function = space.                                                

  • HT1386 can i sync 20 iphones with the same itunes?

    can i sync 20 iphones with the same itunes?

  • Service Entry sheet Creation for Shipment cost Document

    Dear All, While creating a shipment cost document .A service PO is getting generated in the back ground based on which a service entry sheet is created and LIV is made.But in the configuration we are mapping the Transportation planning point to Purch

  • Billing Document- Condition types- report -reg

    Hi experts, 1. I see a billing document in VF03, 2. I select a line item and click on pricing button. 3. I get all the pricing condition types and the corresponding values against them.        Pls let me know how do I get the values of "Net Value Bef

  • Every thing except the processor goes to sleep

    When I put my Power Mac G5 to sleep, everything turns off except the fans still run and the display lamp doesn't do the breathing thing. I've removed everything except keyboard and mouse. I've turned off all automatic software instances I could find.