<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Hyperlink Script Dialog in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hyperlink-script-dialog/m-p/271996#M25063</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That's a fantastic solution, and I'd like to try it; however I don't have access to the datagrid code. I was wondering if there was any way to hyperlink field comments to open a pop up window containing the same comments.&lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;Kate.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Another approach would be attach "onRowClick" event on datagrid to get id of that feature and then open a pop up to show comments. However, I am not sure you could even do that if you have no access to the datagrid code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Oct 2011 19:54:17 GMT</pubDate>
    <dc:creator>HemingZhu</dc:creator>
    <dc:date>2011-10-11T19:54:17Z</dc:date>
    <item>
      <title>Hyperlink Script Dialog</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hyperlink-script-dialog/m-p/271992#M25059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have a widget in our web app that returns results in a datagrid. We do not have access to the source code, and the "Comments" field populates the grid in a single line (which can be quite long). As a work around, I am wondering if there is a way to click the attribute info in the "Comments" field (I can make the field a hyperlink field) and run a script from the hyperlink script dialog to pop open a window displaying the "Comments" attribute info (same info that was clicked).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The hyperlink script dialog accepts JScript and VBScript, however I'm unsure how to approach this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions would be appreciated,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kate.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 13:13:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hyperlink-script-dialog/m-p/271992#M25059</guid>
      <dc:creator>KateLyndegaard</dc:creator>
      <dc:date>2011-10-11T13:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperlink Script Dialog</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hyperlink-script-dialog/m-p/271993#M25060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi there,&lt;BR /&gt;&lt;BR /&gt;We have a widget in our web app that returns results in a datagrid. We do not have access to the source code, and the "Comments" field populates the grid in a single line (which can be quite long). As a work around, I am wondering if there is a way to click the attribute info in the "Comments" field (I can make the field a hyperlink field) and run a script from the hyperlink script dialog to pop open a window displaying the "Comments" attribute info (same info that was clicked).&lt;BR /&gt;&lt;BR /&gt;The hyperlink script dialog accepts JScript and VBScript, however I'm unsure how to approach this.&lt;BR /&gt;&lt;BR /&gt;Any suggestions would be appreciated,&lt;BR /&gt;Kate.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;One approach you can try is covert the Comments field into a hyperlink in datagrid using formatter property. Basically set formatter to a javascript function that will create html hyperlink string with comments. So when the datagrid is loaded, it will convert that string to html hyperlink element. The following code snippets convert a field value into a button, the implementation should be very similiar.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
...
&amp;lt;div style="width: 650px; height: 400px"&amp;gt;
&amp;nbsp; &amp;lt;table id="billsGrid" dojoType="dojox.grid.DataGrid" sortInfo="2"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;thead&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th field="ConflictID" formatter="makeviewButton" width="20px"&amp;gt;View feature&amp;lt;/th&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th field="Oid" width="150px"&amp;gt;OID&amp;lt;/th&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th field="InVersion" width="150px"&amp;gt;Version&amp;lt;/th&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th field="ChangeType" width="150px"&amp;gt;Change Type&amp;lt;/th&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/thead&amp;gt;
&amp;nbsp; &amp;lt;/table&amp;gt;
 &amp;lt;/div&amp;gt;
...

&amp;lt;script type="text/javascript"&amp;gt;
dojo.ready(function() {
 var conflictCollection ={"items":[{"InVersion":"GDP_OWN.DataEditing_1","ChangeType":"Delete","Oid":4614,"ConflictID":"1-4614-GDP_OWN.DataEditing_1"},{"InVersion":"GDP_OWN.DataEditing_2","ChangeType":"Update","Oid":4614,"ConflictID":"2-4614-GDP_OWN.DataEditing_2"}]};

 var dataStore = new dojo.data.ItemFileReadStore({ data:conflictCollection });
 var grid = dijit.byId("billsGrid");
 grid.setStore(dataStore);
});

function makeviewButton(id){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var strArray =id.split("-");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var oid =strArray[1];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var version =strArray[2];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var vBtn = "&amp;lt;div dojoType='dijit.form.Button'&amp;gt;&amp;lt;img src='view.png'";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vBtn = vBtn + " width='18' height='18'";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vBtn = vBtn + " onClick=\"viewRow("+oid+", '"+version +"')\"&amp;gt;&amp;lt;/div&amp;gt;";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //alert(vBtn);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return vBtn;
}
function viewRow(oid, version)
{
 alert("oid=" +oid +"; version="+version);
}
&amp;lt;/script&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:17:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hyperlink-script-dialog/m-p/271993#M25060</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2021-12-11T13:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperlink Script Dialog</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hyperlink-script-dialog/m-p/271994#M25061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's a fantastic solution, and I'd like to try it however I don't have access to the code that loads the datagrid. I was wondering if I could concatenate field values for a particular record with a blank popup to provide a url for a hyperlink??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kate.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 17:58:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hyperlink-script-dialog/m-p/271994#M25061</guid>
      <dc:creator>KateLyndegaard</dc:creator>
      <dc:date>2011-10-11T17:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperlink Script Dialog</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hyperlink-script-dialog/m-p/271995#M25062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's a fantastic solution, and I'd like to try it; however I don't have access to the datagrid code. I was wondering if there was any way to hyperlink field comments to open a pop up window containing the same comments.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kate.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 18:58:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hyperlink-script-dialog/m-p/271995#M25062</guid>
      <dc:creator>KateLyndegaard</dc:creator>
      <dc:date>2011-10-11T18:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperlink Script Dialog</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hyperlink-script-dialog/m-p/271996#M25063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That's a fantastic solution, and I'd like to try it; however I don't have access to the datagrid code. I was wondering if there was any way to hyperlink field comments to open a pop up window containing the same comments.&lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;Kate.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Another approach would be attach "onRowClick" event on datagrid to get id of that feature and then open a pop up to show comments. However, I am not sure you could even do that if you have no access to the datagrid code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 19:54:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hyperlink-script-dialog/m-p/271996#M25063</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2011-10-11T19:54:17Z</dc:date>
    </item>
  </channel>
</rss>

