Hyperlink in a dialog - possible? (Javascript)

Hi
Is it possible to make a hyperlink in a dialog
E.g., To execute a mailto: which would open the email app with settings
Thanks
David

Hi David,
What you can do is create and save a file with an .html extension (say
into the Folder.temp folder -- just don't try  Folder.appData
In the file, add some html like this:
Then you can do an execute() on that file.
It should open the browser, and then immediately open the default email
client installed on the user's machine.
If you're lucky, the tab that was opened in the browser will also close
(and if it's the only tab, then the entire browser). But probably what
will happen is that the browser will stay open with a script alert!

Similar Messages

  • Hyperlink to SSRS Report throws JavaScript Error

    Hoping this is the right place to get help here. I'm not sure if this is an error in ASP.NET, SQL Server 2005 Reporting Services or some compatibility issue between VS 2010 and VS 2013 Express for Web.
    I have an ASP.NET web form written in VS 2010 / VB.NET. The form has three hyperlink controls that have NavigateURL properties that are set at runtime. Those URLs point to reports on a SQL Server 2005 Reporting Server. The app runs in our Intranet and we use
    Windows authentication throughout. I am using the ASP.NET Development Server (Version 4.0.30319.18408) locally.
    This app used to work just fine, but recently it broke. Now when I run my code and click the hyperlink control (IE is the default browser) I get a JavaScript error of monumental complexity/density.
    The URLs work in IE. They work in FireFox. If I set FireFox to be my default browser it's opens fine from VS. But when I run it in IE I get the error. 
    When I click the Hyperlink, I get a messagebox saying "Javascript runtime error. Access is Denied." [Break] [Continue] [ Ignore] 
    Behind that, in Visual Studio, there's a 'Script Block [dynamic] tab open. It has a lock symbol on it and the window is FILLED with hugely dense and incomprehensible Javascript.  If I break, I'm dropped into the code. The offending line is:
    this.FieldFocus=function(a){var b="undefined"!=typeof LP?LP.getBrowser().selectedTab.linkedBrowser:null;if("undefined"==typeof LP||b){var c=b?b.contentDocument:document;if(c&&!("undefined"!=typeof c.FieldFocusDone&&!0==c.FieldFocusDone))if("undefined"!=typeof
    c.LPlpUseLastPassLogin&&!0==c.LPlpUseLastPassLogin)lploggedin?(c.LPlpUseLastPassLogin=!1,LP.FieldFocus(a)):(lp_showNotification("UseLastPassLogin",b,0,"login",null),c.LPlpUseLastPassLogin=!1,c.LPlpm_setupFocusHandler=!1,c.FieldFocusDone=!1);
    else{if(lpNotificationsAfterClick)lpCheckGenPwAndFF(b,c,!1);else if("undefined"==typeof c.LPlpgenerateandfill&&"undefined"!=typeof c.LPlpfillforms)lp_showNotification("FillableFormDetected",b,0,"formfill");else
    if("undefined"!=typeof c.LPlpgenerateandfill)lp_showNotification("GeneratePassword",b,c.LPlpgenerateAids,"generate",c.LPlpgenerateForm,null,c.LPlpgenerateandfill,c.LPlpfillcurrent);else return;c.FieldFocusDone=!0}}};
    Needless to say, I have no frickin' clue what this is. I'm new to web programming, so this is totally beyond my abilities. 
    Possible Factors:
    Compatibility view is on for all Intranet sites, but turning that off makes no difference.
    I recently upgraded from WinXP to Win7 64-bit. 
    I also recently tried loading the Web Project into VS 2013 Express. 
    I'm not sure which of these may be a factor, just thought I'd mention them.
    Fix Attempts:
    I tried removing my fancy code and just setting the correct URL in code. Error.
    I created another hyperlink control, and in code I copied NavigateURL from the existing control to this one. Clicking that one WORKS. WTH?
    Any help would be deeply appreciated, thanks.
    Barry

    Well you can post a question in the ASP .Net forum and see if you can get an answer.
    "The URLs work in IE. They work in FireFox. If I set FireFox to be my default browser it's opens fine from VS. But when I run it in IE I get the error. "
    The above makes no sense to me. The URLs work in IE but when I run it in IE I get the error?
    This makes no sense either "This app used to work just fine, but recently it broke" as apps don't just break. Something changes to cause an issue with them. Which systems did the app "break" on? What upgrades were recently done on those
    systems?
    When you opened the project in Visual Studio Express 2013 for web is that when the app broke? Maybe the app requires more than Visual Studio 2013 Express for web has available.
    Was Visual Studio 2010 an Express edition for web? Or did it have more capability than that?
    Did you load a newer version of IE on that system? As the WebBrowser control, from what I understand, uses the current rev of IE on the system as "The
    WebBrowser control is a managed wrapper around a component installed with Internet Explorer. Use this property to determine which version of Internet
    Explorer is installed. This is useful when your application uses a feature of Internet Explorer that is present only in certain versions. If the required version is not present on the local machine, you can provide alternative functionality or prompt the user
    to upgrade". Maybe something there occured. Or do you use the WebBrowser control?
    Is Visual Studio 2010 on the Win 7 64 bit machine? If so does that app not work in that too?
    Did you compile the app to AnyCPU rather than X86 or X64 or try to compile it to one of the other two to see if that corrected the issue?
    There's obviously something going on which you've not taken into account from a to b.
    Please BEWARE that I have NO EXPERIENCE and NO EXPERTISE and probably onset of DEMENTIA which may affect my answers! Also, I've been told by an expert, that when you post an image it clutters up the thread and mysteriously, over time, the link to the image
    will somehow become "unstable" or something to that effect. :) I can only surmise that is due to Global Warming of the threads.

  • Open Print Dialog using JavaScript

    Hi folks, I'm trying to open dynamically the print dialog window for printing the PDF (Ctrl + P) in WebDynpro ABAP using JavaScript.
    The JavaScript seems to be executed only for Interactive Forms, however I don't need to use interactive but only Print-Based Forms.
    This line of code works if I assign it to an event like click for a button, I tried to call it in the doc:ready event but it does not work
    xfa.host.print(1, "0", "0", 0, 1, 0, 0, 0);
    Please I need some help and I hope it's possible!
    Alex

    Thanks, we are getting close!
    This line of code works, but it does not prompt me with the print dialog box (because of the first parameter is 0)
    xfa.host.print(0,"0","0", 0, 1, 0, 0, 1);
    I got this message box "This document is trying to print. Do you want to allow this?" Yes/No....
    Ok, that works but I would like to have the standard print dialog window instead, where you could select your printers.
    This line of code prompt me to save the XDP, this is not what I want
    xfa.host.exportData("",1);
    In which event should I place the script??
    Also, script only seems to be executed for interactive forms, I don't want to generate interactive forms, they are more heavy to render, this is only for print based forms!
    thanks
    Alexandre Giguere

  • Open up "Save As" dialog in javascript

    Hello all,
         I am a newbie to scripting and to be honest it makes my head hurt lol, Kudos to all that make this look easy. I found some good resources but following everything is going to take a bit. I have am using the object model viewer and its a great resource. Long story even longer I am trying to automate a bunch of repetitive tasks that we have to run on a ton of pre-built documents. I have been hobbling together some code that has been working. everything is working and I can worry about cleaning up the code later (for my sake. I have OCD)
    I can't seem to find a way to open up the "save as" dialog so that the user can save the document to a directory that will change from week to week. The file name will vary across the run of files. I don't need anything to automate that part. I just want it to pop up and then continue the run. I'd like to do this at the start of the script so that when all the changes are made I can just have the document close. (I haven't included the closing code yet) Is this possible? I cant seem to find anything out there to point me in the right direction.
    Here is what I have so far.
    myDoc=app.activeDocument; 
    for (var  n=myDoc.masterSpreads.length-1; n>=0; n--){ 
         if (isMasterSpreadInUse(myDoc.masterSpreads[n])==false){ 
              myDoc.masterSpreads[n].remove(); 
    function isMasterSpreadInUse(myMasterSpread){ 
         var myDoc=myMasterSpread.parent; 
         for (var  n=myDoc.masterSpreads.length-1; n>=0; n--){ 
              if (myDoc.masterSpreads[n].appliedMaster==myMasterSpread){ 
                   return true; 
         for (var  n=myDoc.pages.length-1; n>=0; n--){ 
              if (myDoc.pages[n].appliedMaster==myMasterSpread){ 
                   return true; 
         return false; 
    Array.prototype.filter = function(collection) { 
              var k, i, con, ids = collection.everyItem().id; 
              con: for (k = ids.length - 1; k >=0; k--)  
                        for (i = 0; i < this.length; i++) 
                        if (this[i].id == ids[k]) { 
                             ids.splice(k, 1);  
                             continue con; 
              return ids;     // array with unmatched ids from collection 
    var  
              mL = app.activeDocument.pageItems.everyItem().itemLayer, 
              mUnusedLayersID = mL.filter(app.activeDocument.layers), 
              len = mUnusedLayersID.length; 
    while (len-->0) 
              app.activeDocument.layers.itemByID(mUnusedLayersID[len]).remove();
    var layers = app.activeDocument.layers.everyItem().getElements();
    for(var i=layers.length-1;i>=0;i--){
    if (layers[i].name[0] == "X"){
         layers[i].remove();
    app.documents.everyItem().xmlElements.item(0).xmlElements.everyItem().untag();
    myPreset = app.printerPresets.item("AdQ 8½x11");
    app.activeDocument.print(false, myPreset);
    SaveOptions.YES

    I've suddenly started getting this issue today on SSMS 2008 with Win 7.  I can do Save but as soon as I try Save As the whole thing just locks up.  I get a flashing Save icon in the bottom right corner but no Save dialog and all I can do at
    that point is close the whole thing down using Task Manager.
    Does anyone know if there is a fix for this?

  • Hyperlink in table cell possible?

    Hello experts,
    is it possible to have a table that contains hyperlinks? If so, how?
    I've tried to configure a column as Action: System action: Hyperlink; Apply to: Self; Hyperlink address: "http://localhost/", but the column doesn't react to clicks.
    Your help is much appreciated,
    Florian

    Hi Florian,
    it seems, that some elements do not react to actions, even though they have an action tab in the properties dialogue.
    I suggest you insert a button into the table, use the hyperlink-action an include the url into the caption of the button.
    Kind Regards,
      Benni

  • Trigger Save As... dialog with Javascript?

    I have a script that makes some significant changes to an Illustrator file and would like to have a "Save As..." dialog pop up at the end of the script to give the user a chance to save the changes in a location of their choosing.
    I know how to trigger a Save As dialog box with AppleScript using GUI scripting, is there a way of doing this with Javascript?

    In short I think you answer is NO… There is no 'showing dialog' parameter in either language. You can prompt for a location pretty much the same as 'choose folder' in AppleScript. You can however construct your own dialog using ScriptUI and have the user input some options and a place to save. I am currently working on these myself for use my scripts… Here is an example of some for Photoshop…
    First dialog offers a selection of File Format to use:
    On choosing you get a second dialog (with limited options) for input:

  • Save file dialog - possible?

    Hi! I need to save a file to the clients local file system, so it would be nice if he could choose the directory and file name. I know it;s possible in PHP, so I believe there is something similar in JSF (JSP maybe?). Actually, my application uses ADF Faces but it could work. Thanks for any clues!

    You can use the MIME type which will use the browser to pop up the dialog box. I've used this with saving an Excel file through POI and it works well.
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExternalContext externalContext = facesContext.getExternalContext();
    try {
    HttpServletResponse resp = (HttpServletResponse)externalContext.getResponse();
    ServletOutputStream out = resp.getOutputStream();
    // SET THE MIME TYPE
    resp.setContentType("application/vnd.ms-excel");
    // set content dispostion to inline in
    // case the open/save dialog needs to appear
    resp.addHeader("content-disposition", "inline; filename=" + this.getFileName());
    wb.write(out);
    out.flush();
    out.close();
    facesContext.responseComplete();
    } catch (FileNotFoundException fne) {
    } catch (IOException ioe) {
    ioe.toString());
    }

  • Non-Modal SUD Dialog Possible?

    Is it possible to have a non-modal SUD dialog box?  I would like to use a SUD dialog box to show some things going on while a script is running, and would like it to operate much like a non-modal message box. 
    Thanks!  Julia

    Thank you for your reply, I was hoping to display a table (with changing values) or some images while scripts were executing, but I will be content with the non-modal MsgBoxDisp dialog boxes 

  • Quit X11.app without dialog - possible ?

    Hi,
    i am using X11.app daily and its part of my login items.
    I was always wondering if there is a "hack" to get X11 closed while shutdown without having that "are-you-sure" dialog.
    Its just useless for my individual case and its slows down the shutdown process.
    any ideas ?
    Best regards
    fidel

    Fidel,
    Copy this line of code and paste it into Terminal and then hit your Return key:
    defaults write com.apple.x11 noquitalert true
    Then quit both Terminal and X11. The change will take effect the next time you open X11.
    If for any reason you have a need to undo this action, replace the word "true" with "false," and repeat the above.
    Documentation can be found here. (Scroll down to "Changes in Beta 3...")
    Good luck!
    Andrew99
    iMac 1 GHz Flat Panel 15" PPC 768 MB RAM   Mac OS X (10.4.10)  

  • Can't find Dialog in javascript (by code corner example)

    Hello,
    I've recently found an Code Corner OTN Harvest 09/2011 article with "Launching popup dialogs maximized".
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/sept2011-otn-harvest-508189.pdf
    The code is:function openPopup(popupId, panelWindowId){
      return function(event){
       var agent = AdfAgent.AGENT;
    var windowWidth = agent.getWindowWidth();
    var windowHeight = agent.getWindowHeight();
    var popup = AdfPage.PAGE.findComponentByAbsoluteId(popupId); // found
    var panelWindow = popup.findComponent(panelWindowId); // null here
    panelWindow.setContentWidth(Math.max(100, windowWidth-60));
       panelWindow.setContentHeight(Math.max(100, windowHeight-80));
       if(popup != null)
         popup.show();    
    }I've tried the same in my application and it didn't work.
    <af:commandButton text="Search" id="cb3" partialSubmit="true">
                       <af:clientListener type="action"
                       method="openPopup('p_search','d7')"/>
                    </af:commandButton>
    <af:popup id="p_search">
            <af:dialog id="d7" resize="on"
                       dialogListener="#{backingBeanScope.Page1ManagedBean.toContentSearchResult}"
                       contentWidth="800" contentHeight="600"
                       stretchChildren="first">
              <af:panelStretchLayout id="psl4" topHeight="auto">
    ...I have found out that this code can't find panelWindow (dialog) component.
    I've also tried AdfPage.PAGE.findComponentByAbsoluteId to find the dialog, but still no luck.
    Any ideas?
    Thanks.
    ADF 11.1.1.4

    Hi,
    maybe you are not setting the approapriate componentId..
    have a look here
    Problem Finding component on A Page
    Regards,
    Dimitris.

  • No search in place-dialog possible

    Hallo,
    I am an InDesign User since version 4, but now the firts time i got a simple problem:
    I get no search-results in the place dialog window shown.
    There appears no spinning wheel and i can´t see any progress.
    This happens too in my hole CreateveSuite (InDesign, Photoshop and Illustrator).
    This only happens if i am searching for pictures on our NAS - the search results on my computer goes perfect.
    ...this is the search (Place-Dialog-Box)
    ...and this is the result.
    My System:
    AdobeCreative Suite CS6
    Mac Yosemite 10.10.2.
    NAS Laie 5Big NAS Pro
    Sorry for this bad english, but thank you for the answears.

    Hallo Michael,
    all of these workarrounds don´t work.
    I installed 3 Mac Minis, and all of them got the same problem.
    I tried as Guestuser - the same.
    Iv´e tried too to redet the Index from the NAS, but can not change it in terminal.
    Iv ´e tried to reset the Index by the Spotlight-Pref (add to private and so on...) no effect.

  • How do I disable dialogs? (javascript, PcCS5)

    I have a script which fills the layer with a certain color:
    docRef.selection.fill(fillColor, ColorBlendMode.NORMAL, 100, true);
    I have recorded the script into an action, since I want to batch it on a collection of files.
    But, when I run my script with my action, the fill dialog window pops up!
    I tried this to get rid of it, but it didn't work:
    app.displayDialogs = DialogModes.NO;
    displayDialogs = DialogModes.NO;
    Is there any way I can get rid of that dialog?

    This is how i do it.
    var selection = docRef.selection
    var desc203 = new ActionDescriptor();
    var desc204 = new ActionDescriptor();
    desc204.putUnitDouble(     charIDToTypeID( "Hrzn" ), charIDToTypeID( "#Pxl" ), 0 );
    desc204.putUnitDouble(     charIDToTypeID( "Vrtc" ),  charIDToTypeID( "#Pxl" ), 0 );
    desc203.putObject(          charIDToTypeID( "From" ), charIDToTypeID( "Pnt " ), desc204 );
    desc203.putInteger(         charIDToTypeID( "Tlrn" ),   100 );
    desc203.putBoolean(        charIDToTypeID( "Mrgd" ), true );
    desc203.putBoolean(        charIDToTypeID( "AntA" ), true );
    desc203.putEnumerated(  charIDToTypeID( "Usng" ), charIDToTypeID( "FlCn" ), charIDToTypeID( "FrgC" ) );
    executeAction( charIDToTypeID( "Fl  " ), desc203, DialogModes.NO );//  fill selected area
    No way to pick a color though but it will use the fore color in the color picker thingy whatever its called.

  • Possible JavaScript GREP Bug?

    I have run into a situation that works in inDesign's GREP dialog box (in the program itself), but does not work as a script, and I think it may be a bug.  If anyone can shed light on the situation, it would be much appreciated.
    Basically, I want to run a Find/Change GREP query repeatedly until no more matching text is found, and a problem arises when I try to use more than one lookbehind.
    The code, in its simplest form, looks like this:
    #target indesign
    var myFoundText;
    target = app.selection[0].parentStory;
    app.findGrepPreferences.findWhat = "1";
    myFoundText = app.findGrep();
    while (myFoundText.length != 0){
        app.findGrepPreferences.findWhat = "((?<=March )|(?<=June ))(1)(?!st)";
        app.changeGrepPreferences.changeTo = "$0st";
        target.changeGrep();
        myFoundText = app.findGrep();
    The problem is that the script finds the '1', adds a 'st' to the end, but then gets stuck in an infinite loop (even though it should stop running after the first change operation, as the 1 no longer needs an 'st' after it) .
    The problem seems to be multiple lookbehinds, as the same script will NOT get stuck in an infinite loop if I only use a single lookbehind.  It appears that there is no way to script a GREP query to consider multiple different lookbehinds, although it is quite easy to do so inside the program itself.  Is this a bug, or have I missed something?
    Thanks,
    -Ryan

    Harbs,
    Brilliant.  That was the problem.  I changed from app.findGrep() to target.findGrep() and the example script works like a charm.  Just updated my original (full-size) script with the lessons learned in the example, and the whole thing performs exactly as I want.
    The original script formatted all sorts of dates in a uniform way, and before now it was a 'dumb' script that ran a set number of times, just to cover any likely amount of changes it would need to make (e.g. a for loop that runs 20 times).  However, we've begun to use the script on some very slow computers, and it was really bogging them down even on stories that did not need a single change!  As well, in the rare cases that there were more changes than the max loop number, those extras would go unformatted and would need to be later corrected manually.  Now the script only runs if changes are necessary, and then runs only as many times as it needs to before stopping.  Much more efficient!
    Thank you very much for your help!
    -Ryan

  • How to get hyperlinks labels from javascript

    Folks,
    in my jsp, i'm using custom tags to generate hyperlinks. Now what i want is to have the label of the hyperlinks in the javascript. How can i do that. I tried document.anchors but it gives me zero length array. Is there any other way of doing it.

    JSP generates the HTML (and possibly Javascript) that the browser displays. Once the browser is displaying it, the JSP page's work is already long done, and is not "running" anymore. So there's no connection between your JSP page and what's in the browser.
    JSP does not change how HTML works, only how it's generated.
    Otherwise you are asking a Javascript question, and Java != Javascript, so you should go find a Javascript forum.

  • How do I set (or auto populate) the value of a modal dialog field using javascript?

    I have a Modal Dialog on my SharePoint 2010 page the following fields: Your Name, Subject, Priority, Message. 
    It links to a list I have on the site. The second field, Subject, I want to auto populate it when the window opens, so the user can leave it as is or modify the subject. I want to set the field value using javascript. 
    I've tried setting the field with this code:
    document.getElementById('Subject').value = "Test";
    and also, this:
    setFieldValue('Subject','My custom value');
    Neither work. 
    How do I set the value of the subject field when the user first opens the dialog using javascript?
    Please help.

    I am sure, you are looking at default field value of a list column(single line) in a modal window, if so please try below code
    <script src="https://code.jquery.com/jquery-2.1.0.min.js" type="text/javascript" abp="397"></script><script type="text/javascript" abp="398">
    $(document).ready(function(){
    $('input[name*="Subject"]').val("Test");
    </script>​​​​​​
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

Maybe you are looking for