Tanmay Tanmay - 4 months ago 10
Javascript Question

Remove inverted commas from href javascript

Hi I have href which I am dynamically cereated but i don't want inverted commas in it but its coming with inverted commas how to remove kindly help

Here is my code:

$('#txtFrameClinChn').html("<iframe src='http://localhost:46030/Login/Appointment%20Booking/Home.aspx?clhid'" + sessionStorage.LoggedInOrganizationHeadOrganizationID + "' frameborder='0' scrolling='auto' width='100%' height='1000'></iframe>");


Which generate this href :

<iframe src='http://localhost:46030/Login/Appointment%20Booking/Home.aspx?clhid='717c043d-126f-4f57-910b-247a83d58801' frameborder='0' scrolling='auto' width='100%' height='1000'></iframe>


I do not want this
clhid='717c043d-126f-4f57-910b-247a83d58801'
instead I want
clhid=717c043d-126f-4f57-910b-247a83d58801
.

Answer
 $('#txtFrameClinChn').html("&lt;iframe src='http://localhost:46030/Login/Appointment%20Booking/Home.aspx?clhid=" + sessionStorage.LoggedInOrganizationHeadOrganizationID + '" frameborder="0" scrolling="auto" width="100%" height="1000" &gt;&lt;/iframe&gt;');

Try this,it may help.

Comments