hyperlink in on-change client script

RudhraKAM
Tera Guru

Hello there 

I have a requirement where we have a multi choice variable on catalog item, with 3 choices 

if choice 3 is selected we need to show a error message , which we are doing with client script  , in that error message we are redirecting user to another link , as of now we are just displaying the full link in the error message , can we just use click here and hyper link the user from there ?

find_real_file.png

instead of www.google.com   can we add click here so that it will redirect them to web page in new window?

Below is my on change script 

function onChange(control, oldValue, newValue, isLoading) {
   if (isLoading || newValue == '') {
      return;
   }
        if(newValue == '2'){
					g_form.showFieldMsg('center_access','Please go to www.google.com and my random text', 'error');
			
		}
   
}
1 ACCEPTED SOLUTION

Sorry, Hyperlinks are not supported in   gs.showFieldMsg method.

please use below code

 

function onLoad() {


 


    g_form.addInfoMessage("Please <a href = '/incident_list.do'>Click</a>");


 


   


 


}

 

Regards,

Sachin

View solution in original post

7 REPLIES 7

sachin_namjoshi
Kilo Patron
Kilo Patron

 

Use below code

 

g_form.showFieldMsg('center_access','Please go to + <a href = 'https://www.google.com'>Click</a> + and my random text', 'error');

Regards,

Sachin

Hello Sachin

 

it didnt work 

Sorry, Hyperlinks are not supported in   gs.showFieldMsg method.

please use below code

 

function onLoad() {


 


    g_form.addInfoMessage("Please <a href = '/incident_list.do'>Click</a>");


 


   


 


}

 

Regards,

Sachin

Hello Sachin , its working fine but not a feasible solution for this issue . the info message is not visible as it is displaying on the top , Mine is a long form where your may not notice that , can we include that in alert?