How to add an variable value in between the hyperlink in javascript -


i sending email via javascript. in mail.parameter.text property need send hyperlink. in code below hardcoding url whick looks lengthy , need add /dashboard @ end of url. idea on how shorten url?

var parent = space.getparent(); var sitegroup = "group_email_contributors"; var mail = actions.create("mail"); mail.parameters.to_many = sitegroup; mail.parameters.subject="new site created in community" mail.parameters.text=" new site called " + document.properties.name +"is created.click http://pc1:8080/share/page/site/"+document.properties.name+"/dashboard"+"   join site";  //execute action against document mail.execute(document); 

sorry if basic question dont know javascript. entire script , not using html tags in between.

you can change this, example:

mail.parameters.text="click <a href='http://pc1:8080/share/page/site/" + document.properties.name + "/dashboard'>here</a>"; 

your link appear "here" , nevertheless lead url specified. mean "shorten url"?


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -