Display hyperlink instead of full url in URL field

carlh
Kilo Guru

Good morning,

Yesterday I got some help from ctomasi and it's working great!     Can we concatinate 2 fields to complete a URL?

Recap.

I have a URL field that is created by concatenating 2 values.   For extra credit, I would like to show a hyper link rather than the full ugly URL on the form.   Can this be done?

Please advise and thank you!!!

Regards,

Carl

21 REPLIES 21

It's a URL field and it's clickable already, and works great. It's just ugly. The question is how to display a nice looking hyper link. Like "LINK" rather than the long URL it is showing


Ah, I see. Thank you for the clarification.



Let me see... I have an idea.


Trust Chuck to come up with something amazing! He'd almost never leave you hanging!


Zero doubt! Thanks all!


Write an onLoad client script on this table and put this script in there. See the comments highlighted for the syntax.



function onLoad() {


  var url_id=$('incident.u_url_field_link');   // $('<table name>.<fieldname_link>');


//Event.observe('<table name>.<fieldname_lock>', 'click', function(){


  Event.observe('incident.u_url_field_lock', 'click', function(){


  if(url_id.text!=''){


  url_id.text='put the text you want to display here';


  }


  });


  if(url_id.text!=''){


  url_id.text='put the text you want to display here';


  }



}