Please help me to display an Http:// url in the alert in client script

ramya0905
Kilo Expert

Please help me to display an Http:// url in the alert in client script

1 ACCEPTED SOLUTION

this will display as link... i tried this on demo just now...



g_form.addInfoMessage("<a href='"+location.href+"'>"+location.href+"</a>");


View solution in original post

17 REPLIES 17

Hi, finally i used g_form.addInfoMessage() as u suggested. thnks!


close of the loop and mark the response as answered .. thanks ....


Hello kalaisaran



I had a same requirement and created a UI page as you suggested above. I'm calling the UI page via Catalog client script ( onChange )as below.


function onChange(control, oldValue, newValue, isLoading) {


  if (isLoading || newValue == '') {


          return;


    }


  var x = g_form.getValue('computer');


  if(x == 'mac')


  {


  var dialog = new GlideDialogWindow('alertpopup'); // 'alertpopup' is the UI page


      dialog.setTitle("Please Check Macbook instructions");


      dialog.setSize(500,200);


      dialog.render();                        


                       


  }                  


}



I can see the pop up box in the ITIL/Instance view, but if i run the test via Service Portal, I do not see the alert pop up box. Is there something we have to tweak the code to make it work in the SP view as well? Any thoughts ?



Regards!
Nitin K


Sorry. When it comes to service portal, I am all at sea right now!


LOL. I can understand. A quick question, is it possible to call a Portal widget via catalog client script ?



Regards!


Nitin K