4 Replies Latest reply on Sep 16, 2013 1:16 PM by jwellsnh

    Imbed Server Name within HTML href

    jwellsnh

      My application is generating an email as a alert to an administrator to take some action.  I do not want to hard code the server name into the HTML href statement as depicted below

         -- Include link to HIR Admin page

         l_body_html :=

               l_body_html

            || '<a href="http://edwprd.dhhs.state.nh.us:7777/pls/oitp/f?p=222:469">Admin Items</a>';

      I have been able to stuff the current url into a hidden item via an on load dynamic action using this javascript

      <script type="text/JavaScript">

      $s('P481_URL', window.location.href);

      </script>

      I then transform that hidden item in a pl/sql anonymous block process using this code and set local variable

      SELECT SUBSTR ( :p481_url,
                    1,
                    INSTR ( :p481_url,
                           ':',
                           1,
                           3))
         || '469'

        INTO v_sql

        FROM DUAL;

      Which yields this string into the variable v_url

      http://vmdhhsdworad:7777/pls/oitd/f?p=103:469

       

      Is it possible to include that local variable into the href attribute?

       

      Jeff