Replace Part of an Link in an HTML File
Hello community,
I want to replace a part of a link. See my example below.
The Links :
1)
href="
/businessapplications/iop/weschein/Lists/Receipts/EditForm.aspx?ID=219"
2) href="/businessapplications/iop/weschein/Lists/Receipts/EditForm.aspx?ID=220"
should be changed into :
1) href="http://www.newsite.de/new.aspx?ID=219"
2) href="http://www.newsite.de/new.aspx?ID=220"
Thank you in advance for your support
I've alredy try this but this doesn't work.
$('table tr td.ms-vb-icon a').attr('href', $('table tr td.ms-vb-icon a').attr('href').replace('/businessapplications/iop/weschein/Lists/Receipts/EditForm.aspx','http://www.newsite.de'););
Example :
<tbody id="tbod1-2__" isloaded="true">
<tr>
<td>
</td>
</tr>
<tr class="">
<td class="ms-vh-group " width="10px">
<img src="/_layouts/images/blank.gif" alt="" width="10px" height="1px">
</td>
<td class="ms-vb-icon">
----The mared part of the link should be changed ---
<a href="/businessapplications/iop/weschein/Lists/Receipts/EditForm.aspx?ID=219"
onclick="GoToLink(this);return false;" target="_self">
<img alt="Edit" src="/_layouts/images/edititem.gif" border="0"></a>
</td>
<td class="ms-vb2">
12015
</td>
<td class="ms-vb2">
</td>
<td class="ms-vb-icon">
----The mared part of the link should be changed ---
<a href="/businessapplications/iop/weschein/Lists/Receipts/EditForm.aspx?ID=220"
onclick="GoToLink(this);return false;" target="_self">
<img alt="Edit" src="/_layouts/images/edititem.gif" border="0"></a>
</td>
<td class="ms-vb2">
</td>
<td class="ms-vb2">
2010-09-24
</td>
<td class="ms-vb2">
TEST
</td>
<td class="ms-vb2">
AfaPolytekNiederlande
</td>
<td class="ms-vb2">
A.V.Thomas&co.Ltd.
</td>
<td class="ms-vb2">
</td>
</tr>