Anchor tag on sortable columns

Hi,
Whenever you set a report-column to be sortable, Apex generates an anchor -tag in the column-header. It looks like this:</br>
<.a title="Sort by this column href="...>.
</br>
I would like to change the anchors attribute href by using javascript, but then I have to be able to identify the anchor.
</br>
Is it somehow possible to set the anchors-attribute name or id?
</br>
Thanks
</span>

Hi.
Use next code snippet:
<af:goLink id="test" destination="#anchor1"/>
<af:goLink id="anchor1" destination=""/>Regards.

Similar Messages

  • How to add anchor tag dynamically on infopath (OOTB task form of workflow .xsn) by jquery -dynamically as i did by below script on newform.aspx where I will read Help title and URL value from list

    on newform.aspx just above the top of cancel button I want to put 1 hyperlink "Help"
    but I want to do this by script/jquery by reading my configuration list where 1 column is TITLE and other is- URL
    Configuration List has 2 columns Title and URLValue
    Title                                    UrlValue
    HelpNewPage                    
    http://url1
    HelpEditPage                      http://url2
    so script should read Title and display "Help"--->1st part on NewForm.aspx/EditForm
    Script should read UrlValue column and on click of help-(display link) the respective url should be open in new window.-->second part
    Please let me know reference code for adding anchor tag dynamically by reading from list
    Help/Reference 
    http://www.sharepointhillbilly.com/Lists/Posts/Post.aspx?ID=5
    I can see hyperlink near cancel button-
    //This block is just placing help link near cancel button- 
    $(document).ready(function() {
        GetHelpLinkFromConfigList();
    var HelpLinkhtml ='<a href="#" text="Help">Help</a>';
    var position =$("input[value='Cancel']").parent("td").addClass('ms-separator').append(HelpLinkhtml);
    var HelpLinkhtml ='<a href="#" text="Help" onclick="GetHelpLinkFromConfigList();">Help</a>'; 
    var position =$("input[value='Cancel']").parent("td").addClass('ms-separator').append(HelpLinkhtml);
    var HelpLinkimageButton ='<IMG SRC="../../Style Library/Help.bmp" style="width:35px;"/>'; 
    var position1 =$("input[value='Cancel']").parent("td").addClass('ms-separator').append(HelpLinkimageButton );
    //Rest script
    function GetHelpLinkFromConfigList()
     //The Web Service method we are calling, to read list items we use 'GetListItems'
     var method = "GetListItems";
     //The display name of the list we are reading data from
     var list = "configurationList";
     //We need to identify the fields we want to return. In this instance, we want the Title,Value fields
     //from the Configuration List. You can see here that we are using the internal field names.
     var fieldsToRead = "<ViewFields>"+"<FieldRef Name='Title' />"+"<FieldRef Name='Value' />"+"</ViewFields>";
     //comment
     var query = "<Query>" +
                            "<Where>" +
                                "<Neq>" +
                                    "<FieldRef Name='Title'/><Value Type='Text'>Help</Value>"
    +
                                "</Neq>" +
                            "</Where>" +
                            "<OrderBy>" +
                                "<FieldRef Name='Title'/>" +
                            "</OrderBy>" +
                        "</Query>";
     $().SPServices(
     operation: method,
        async: false,
        listName: list,
        CAMLViewFields: fieldsToRead,
        CAMLQuery: query,
        completefunc: function (xData, Status) {
        $(xData.responseXML).SPFilterNode("z:row").each(function() {
        var displayname = ($(this).attr("ows_Title"));
        var UrlValue = ($(this).attr("ows_Value")).split(",")[0];
        AddRowToSharepointTable(displayname,UrlValue)
    function AddRowToSharepointTable(displayname,UrlValue)
        $("#NDRTable").append("<tr align='Middle'>" +
                                    "<td><a href='" +UrlValue+ "'>+displayname+</a></td>"
    +
                                   "</tr>");
    <table id="NDRTable"></table>
    sudhanshu sharma Do good and cast it into river :)

    Hi,
    From your description, you want to add a help link(read data from other list) into new form page.
    The following code for your reference:
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    ExecuteOrDelayUntilScriptLoaded(AddHelpLink, "sp.js");
    function AddHelpLink() {
    var context = new SP.ClientContext.get_current();
    var list= context.get_web().get_lists().getByTitle("configurationList");
    var camlQuery= new SP.CamlQuery();
    camlQuery.set_viewXml("<View><Query><Where><Eq><FieldRef Name='Title'/><Value Type='Text'>Help</Value></Eq></Where></Query></View>");
    this.listItems = list.getItems(camlQuery);
    context.load(this.listItems,'Include(Title,URL)');
    context.executeQueryAsync(function(){
    var ListEnumerator = listItems.getEnumerator();
    while(ListEnumerator.moveNext())
    var currentItem = ListEnumerator.get_current();
    var title=currentItem.get_item("Title");
    var url=currentItem.get_item("URL").get_url();
    var HelpLinkhtml ='<a href="'+url+'">'+title+'</a>';
    $("input[value='Cancel']").parent("td").addClass('ms-separator').append(HelpLinkhtml);
    },function(sender,args){
    alert(args.get_message());
    </script>
    Result:
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Method call in html anchor tag

    I have read about how to place a hyperlink in JTable cell in other threads. i have a method called Details() which has a mouse pressed event which responds on left click on the first column cells of my JTable. then i get the column and row positions and open up a JDialog.
    so Now i have to show the first column cells as hyperlinks(underlined and handcursor on visit).
    i have done something like this,
    setText( "<html><a href=\"\">" + (String)(value==null?"":value ) +"</a></html>"); this makes the cell values blue colored as well as underlined as soon as the table is loaded.
    how can i make it behave like a hyperlink ? that is colored, underlined and handcursor only when mouse is placed on it.
    Can i have the call to Details() method inside the anchor tag which i have shown above?
    Thanks,

    Well what do you know, I was doing everything correctly.
    Firefox does not allow local file links from a web page.
    http://kb.mozillazine.org/Firefox_:_Issues_:_Links_to_Local_Pages_Don%27t_Work

  • # Anchor Tag Syntax

    I have a page with a Dynamic SQL Region that generates several large blocks of HTML. In the SQL code for the region, I have included:
    '<a name="'||P1_ID||'">'which yields a series of anchor tags that look like:
    <a name="1">, <a name="2">...This all works fine. I then have a "Table of Contents" Report Region at the top of the page that lists all of the dynamically generated blocks and I am trying to create a linked column using
    '<a href="#'||P1_ID||'">'to jump to a particular block. The problem I'm running into is that APEX automatically prepends the domain path (http://apexserver/pls/apex/) to any URL that is not fully qualified. So, instead of getting
    <a href="#1">I am getting
    http://apexserver/pls/apex/f?p=260:54:1540498514490201:::::#1As my link. How do I get APEX to only include the anchor tag without prepending the URL path so I can jump to a location on the same page? Or, if you have an idea for a better way of achieving this, I'm all ears.
    Thanks,
    Jeff

    I don't think APEX is generates that, please look into your page view source it will be just as you want.
    I guess it is browser showing it like that

  • Anchor tag error, also copy and pasting text comes up "null"

    After the recent update I am receiving anchor tag errors telling me to start with an alphabetic letter, which I was. Also no longer lets me copy and paste text onto a page, instead it says "null". Any ideas on a fix ?

    I don't see a closing </body> tag in your code.  There's an opening tag, but no closing tag, hence unbalanced.
    ^_^

  • Not able to open document using anchor tag in firefox

    Hello Friends,
    I would really need your help in solving this issue.My application is deployed in server machine.
    I'm accessing the application through fire fox. In my application, i have a link where i need to open a document on click of it.
    For this, i am using html anchor tag.
    Eg:
    Test
    where IP is the server machine address and dir is the shared directory.
    It works in IE but didn't work in fire fox. Please help me out on to fix it.
    Cheers,
    Cap

    Try out to open doc using following link, {color:#ff0000}*use 5 back slashes instead of 2*
    {color}Test Link
    once you done the code change, close the browser and open a new browser and try it.
    Edited by: Thagelapally on Jul 17, 2009 6:05 AM

  • CS5.5 Phonegap - Anchor Tags Don't Work

    So I made a test Android app using the phonegap template and it seemed to work okay. Now I'm trying to add anchor tags to link a table of contents from the top to text found lower on the page like this:
    <a href="#cq">Clinical Question</a>
    <a id="cq">Clinical Question:</a>
    But I get "ERROR LOADING PAGE" when testing in multi-view and web browser.
    External links work just fine though like:
    <a href ="http://www.adobe.com">Adobe</a><br>
    I'm assuming it has something to do with how the page/site is saved, does anyone have a solution?

    GP Animations wrote:
    So I made a test Android app using the phonegap template and it seemed to work okay. Now I'm trying to add anchor tags to link a table of contents from the top to text found lower on the page like this:
    <a href="#cq">Clinical Question</a>
    <a id="cq">Clinical Question:</a>
    But I get "ERROR LOADING PAGE" when testing in multi-view and web browser.
    That's correct. The jQuery Mobile framework uses IDs to load page blocks in multiple-page files. You cannot link to an ID within an individual page block. See this page in the jQuery Mobile documentation for a detailed explanation: http://jquerymobile.com/demos/1.0a4.1/#docs/pages/docs-pages.html. Confirmation that you can't do what you're trying to achieve is near the bottom of the page.

  • Apache Sling JCR Resource Resolver doesn't work for the anchor tags which is been rendered through j

    Certainly I realized that Apache Sling JCR Resource Resolver doesn't work for the anchor tags which is been rendered through jquery or javascript.
    e.g.
    In Felix Console , in Apache Sling JCR Resource Resolver configuration I have added following mapping.
    /content/myproject/-/
    So If any anchor tag is there like <a href="/content/myproject/en.html"> click me </a> then it will be mapped to "/en.html" automatically.
    But the problem is there in following scenario.
    I have an anchor tag as follows.
    <a href="#" id="test"> click here </a>
    And I am assigning the href to anchor through JQUERY.
    <script>
    $("#test").attr("href","/content/myproject/en.html");
    </script>
    Ideally this should have been mapped to "/en.html".
    But it is not mapping to "/en.html". It still shows "/content/myproject/en.html".
    How to resolve this.
    Thanks,
    Sai

    In a servlet you have access to the resourceResolver so if you know which attributes contain links then it's relatively easy to apply resourceResolver.map to those links.
    Your challenge is clearly how do you know which attributes are links and which aren't. Its is the same challenge that makes parsing the response and rewriting it on the way out difficult - the JSON doesn't have any semantic meaning so how do identify which attributes require rewriting. There really is no good answer ot that question in my experience - all the options have down sides.
    Create some convention - all attributes matching this pattern X get mapped before being converted to JSON (could be attributes whose name ends in link, or it could a convention applied to the value of the attribute - if the attribute is a string that starts with /content apply the resource resolver mapping. In this case you have train your developers to follow this convention which is the down side.
    Create some configurable list of attribute names that require mapping. This is brittle, requires training and is easy to break.
    Implement a client side version of the resource resolver mapping. It wouldn't be as full proof as server side mapping (because that takes into account but you could make it work for simple logic like stripping of /content/site/en. If ou are just trying to solve the simple version of this issue - stripping off the top of the repository path this might be your best option.
    Not worry about it and set up Apache 301 redirects that catch any long URLs and redirect them to short URLs (so configure apache to look for any URL matching /content/site/en and strip off /content/site/en and do a 301 redirect to the shortened URL. You end up with a lot of extra HTTP request because of all the 301s but it would work (I wouldn't recommend this option - but it is possible).

  • File Download not working for anchor tags

    Hello,
    I've encountered a bug with the 4.1.31 version of Tomcat. Apparently, when
    I use an anchor tag for a file, and I click on the link, it does not show the
    file download message "Do you want to open or save this file?" with the open
    and save options. Instead, it displays the file in the browser. I know you
    could normally save this information from the browser to a file, but I need it
    to show the download message because it's easier for users to save their
    file. I'm using Internet Explorer version 6, SP2. I've also tried setting
    the "Confirm open after download" check box for file types to no avail. It
    use to work in Tomcat 4.1.18.
    Any help would be appreciated.

    Can anyone pls. help me ? I tried all options from disbling firewall to uninstalling Bonjour.. But nothing works. Had I known that Apple makes such worst software I would never have bought iPhone !!!! Apple really *****!!!!!!!

  • Click attribute in textFlow anchor tag in Flash Builder 4

    Hi folks,
    At first congratulation to you, Adobe and Flex team for Adobe Flash Builder 4 & flex 4 SDK final release...
    then, I have a click attribute in my textFlow anchor tag, just like this:
    <fx:Script>
         <![CDATA[
         import mx.controls.Alert;
         public function func():void{
              Alert.show("hello!");
         ]]>
    </fx:Script>
    <s:RichEditableText x="50" y="50" editable="false" id="RET" >
         <s:TextFlow>
              <s:a href='http://www.adobe.com' click='func()'>
                   <s:img source='adobe.jpg' width='50' height='50' />
              </s:a>
         </s:TextFlow>
    </s:RichEditableText>
    When I run the project, everything's allright; and after click on my image, I have adobe site in new window, and also have my popup alert window with "Hello!" text...
    But the Problem is another thing. I want to give this textFlow content from one webservice and put it in a string var then bind it to my RichEditableText. I receive it from webservice, put it in the string, and then bind this string to textFlow attribute of my RichEditableText obj with simple function... after running my project, I can see the content, and when I click on my image, I have adobe site in new window, again. but my function does not call!
    What is the problem?! the code is something like this (of course without webservice codes!):
    <fx:Script>
         <![CDATA[
         import flashx.textLayout.conversion.TextConverter;
         import mx.controls.Alert;
         public function func():void{
              Alert.show("hello!");
         internal var str:String;
         public function func2():void{
              str = "<TextFlow xmlns='http://ns.adobe.com/textLayout/2008' paddingRight='5'>"+
              "<a href='http://www.adobe.com' click='func();'><img source='adobe.jpg' width='50' height='50' /></a>"+
              "</TextFlow>";
              RET.textFlow= TextConverter.importToFlow(str, TextConverter.TEXT_LAYOUT_FORMAT);
         ]]>
    </fx:Script>
    <s:RichEditableText x="50" y="50" editable="false" id="RET" />

    Listening for a FlowElementMouseEvent.CLICK event will be beneficial.
    In your webservice feed (Textflow), have a tag such as:
    <a href="event:adobe.jpg">Click here to view Adobe's logo!</a>
    Then in your ActionScript code, listen for any FlowElementMouseEvent.CLICK events from your textFlow instance.
    textFlow.addEventListener(FlowElementMouseEvent.CLICK,
    onLinkHandler);
    Next, declare onLinkHandler:
               * In the XML there are href tag which has 'event:' prefix to the value.  This prefix
               * allows method calls.
              private function onLinkHandler(event:FlowElementMouseEvent):void
                   //extract the number value from the string.
                   var uri:String = LinkElement(event.flowElement).href.split(":")[1];
                   trace(uri);//outputs: adobe.jpg

  • Can I "catch" a click on a sortable column header of a report?

    Hi,
    I have a report.
    Most columns are made sortable: users can click on them to sort.
    I notice that when clicked only page-rendering executes (i.e. not page processing).
    Here is the question.
    I need to call some custom PL/SQL when the user clicks on a sortable column header. This PL/SQL could executes in the before header (it needs to fire before the page re-executes the query).
    The PL/SQL needs to know which column was clicked on: how can I determine this?
    Can I access the url (example below)? I see that it shows which column was clicked.
    https://dev.centraal.boekhuis.nl:4443/pls/apex/f?p=100:3:145900176972409:fsp_sort_4::RP&fsp_region_id=1562722058676533
    Thanks,
    Toon

    That would order the report by C1 when I click C2, which isn't what I want. I want to preserve the order of C1 (whether that's ascending or descending) and then have C2 ascend or descend for each set of values in C1.
    If I can't set the Order By then I'll need something like this as my query. The "last_col1_order" and "this_col2_order" would be items, set according to the last few values of Request. It's horrible, but it gets the job done. This would be so easy in forms!
    WITH data AS (
      select level col from dual connect by level < 6)
    SELECT
      col1,
      col2,
      lpad(case last_col1_order
             when decode(this_col2_order,'asc','asc','desc') then col1
             else col1_desc end,20,'#') ||
        lpad(col2,20,'#') col2_sort
    FROM (
      SELECT
        col1,
        col2,
        (max(col1) over(partition by 1))-(dense_rank() over(order by col1)) col1_desc,
        'asc' last_col1_order,
        'desc' this_col2_order
      FROM (
        SELECT a.col col1, b.col col2
        FROM data a, data b
    order by col2_sort desc

  • How to remove html tags from a column

    Hi
    Problem is this: I get a column with a comma separated list of id's and I can successfully parse these id's and use them elsewhere. BUT, occasionally there are html tags within that id list like this:
    1082471,1237423<br xmlns="http://www.w3.org/1999/xhtml" />
    Is there a way to just automatically remove all tags from a column? Could do this with regex, but since there is no support, I don't know what to do.

    Hi,
    If the HTML can be detected by a starting symbol like „<“, then you could use the following:
    Unfortuntely the operation “ReplaceRange” is only available on a Text-level, so you have to invoke a function (at least to my knowledge). You also need an Index-column in your table, so if you don’t have it, you need to create one as well.
    This is your function:
    let
       fnRemoveHTML = (Value, Index) =>
    let
       Source = Excel.CurrentWorkbook(){[Name="Tabelle1"]}[Content],
       IndeNo = Index,
       Value_ = Source{IndeNo-1}[Value],
       length = Text.Length(Text.From(Value_)),
       position = Text.PositionOf(Text.From(Value_), "<"),
       range = length-position,
       new= if Value_ is number then Value_ else Text.ReplaceRange(Value_, position, range, "")
    in
        new
    in
      fnRemoveHTML
    And this is how you invoke it:
    let
        Quelle = Excel.CurrentWorkbook(){[Name="Tabelle1"]}[Content],
        Last = Table.AddColumn(Quelle, "Custom", each fn_RemoveHTML([Value], [Index])),
        ChangedType = Table.TransformColumnTypes(Last,{{"Custom", type number}})
    in
        ChangedType
    Provided your table is called “Tabelle1” & the column with your values to be replaced “Value” & your index-col “Index”
    Imke

  • Netui: anchor tag with target attribute.

    I am using the netui:anchor tag inside an iframe to post to an action. But the
    resulting page is displayed within the iframe. Will the target attribute of the
    netui:anchor tag help solve the problem. What is a valid value of the target
    attribute.
    thanks,
    Shankar

    does the action have a formSubmit = true? If not then your modal dialog should be shown via the onclick and you have to javascript the link click (based on your modal dialog options)
    If you do have a formSubmit=true, then you'd have the onclick show the modal dialog and you would have to write additional javascript to submit the form (Along with setting its action)
    regards
    deepak

  • Anchor tag passing "this" as a parameter not working

    i have an anchor tag that is calling a javascript function passing in the parameter 'this'. it seems that 'this' is undefined and not the anchor object, why is this? how do i pass the anchor object in a similar way to using 'this'?
    this is my code i am using
    href="javascript:show_region(this);
    whatever i do to the passed in object it says it is undefined

    managed to get it working by using onclick instead of href

  • Jtable: display sortable columns

    Hi all,
    As I undersatnd, by default jtable shows the sorting triangle only after you click on the column header. I wonder how you could display a disabled sorting triangle icon on sortable columns which becomes enabled after you click on the column header. I'm not sure whether it is easier to answer in general terms but just in case here is a code of a basic implementation of sortable table that I have. Any help regarding how the code should be modified are very welcome.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    * @author
    public class Example5 extends JFrame {
        MyCell[][] data = {{new MyCell("A11"), new MyCell("A12")},
                {new MyCell("A21"), new MyCell("A22")}};
        String[] headers = {"A", "B"};
        /** Creates a new instance of Example5 */
        public Example5() {
            setTable();
            setSize(200, 200);
            setVisible(true);
            super.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        public void setTable() {
            DefaultTableModel model = new DefaultTableModel(data, headers){
                public Class getColumnClass(int column) {
                    return MyCell.class;
            MyTable table = new MyTable(model);       
            JScrollPane scrollpane = new JScrollPane(table);
            JPanel top_panel = new JPanel();
            top_panel.setLayout(new BorderLayout());
            getContentPane().add(top_panel);
            top_panel.add(scrollpane, BorderLayout.CENTER);
        public static void main(String[] args) {
            Example5 ex = new Example5();
        class MyTable extends JTable {
            public MyTable(TableModel model) {
                super(model);
                MyCellRenderer cell_renderer = new MyCellRenderer();
                TableColumnModel columnModel = getColumnModel();
                for(int i=0; i<columnModel.getColumnCount(); i++) {
                    TableColumn column = columnModel.getColumn(i);
                    column.setCellRenderer(cell_renderer);
                TableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(model);
                setRowSorter(sorter); 
        class MyCellRenderer implements TableCellRenderer {
            public MyCellRenderer() {
             public Component getTableCellRendererComponent(JTable table,
                Object value, boolean isSelected, boolean hasFocus, int row, int column) {
                return (MyCell)value;
        class MyCell extends JLabel implements Comparable<MyCell> {
            String text;
            public MyCell(String text_) {
                text = text_;
            public String getText() {
                return text;
            public int compareTo(MyCell a) {
                return text.compareTo(a.getText());
    }

    I'm not sure whether it is easier to answer in general terms Its easy to answer in general terms, be specific will be more difficult.
    I don't use JDK6, so I don't know how the table sorter works. But in the old version a separate SortedModel was used and a MouseListener was added to the TableHeader to handle mouse clicks. So when a header was clicked the "state" of the header was used to determine whether the "up", "down" or no icon was used in the header. So once you determine where that logic is coded it should be reasonably easy to create and code a "disable sort" icon and display it in the defalut unsorted state.

Maybe you are looking for

  • Spool request internal error

    Dear All, When I am executing a report in background using tcode se38, I am not able to view the output of the report from the spool request . When I try to view the contents of the spool request, It simply gives a message as follows : Request 74837

  • Bad performance with many xmlqueries in select and big resultset

    I'm running into big performance problems with the following query (edited the query a bit to remove sensitive information): SELECT id "id",created "created",   xmlcast(xmlquery('declare default element namespace "http://www.example.com/myproject/sch

  • Task killer apps.  Yes or No?

    I recently purchased my first smartphone, a Droid Razr, and have a question about task killer apps. Several people have told me that I should install a task killer app.  They have recommended "Advanced Task Killer".  They claim that a task killer app

  • EHP4 upgrade question - ABAP Stack and EA-HR

    Hi Experts, My ABAP stack in the ECC system is at 7.01 SP3. My EA-HR module is at 600 SP38. We want to upgrade EA-HR to 604 (EHP4) so that we can benefit from some of the MSS functionality but the question is, what ABAP stack level do I need to be on

  • AT LINE-SELECTION won't be triggered when I use SET PF-STATUS?

    Dear All, I have a simple program that shows a list. My program has AT LINE-SELECTION event. I also use a GUI status for my list. When I ran my program and double clicked a line, the AT LINE-SELECTION event was never triggered. Later, I deleted the l