Say I have a page, which has been created by a third party, and the page
may contain some pre-specified text. How can I find and replace that
text dynamically? For example, if the page I have contains this HTML:
<div id=”oDiv” style="margin-bottom:10px;">{ when}</div>
<div>
<table style="border:1 px solid gray">
<tr>
<td>blah</td>
<td><img src="img.gif" title="image"></td>
</tr>
<tr>
<td style="backgrou nd-color:#F3F3F3;" >Visit us
<strong>{when }</strong>.</td>
</tr>
<table>
</div>
how can I replace all occurances of {when} with, say, NOW without
"upsetting" any of the existing tags?
Andrew Poulos
may contain some pre-specified text. How can I find and replace that
text dynamically? For example, if the page I have contains this HTML:
<div id=”oDiv” style="margin-bottom:10px;">{ when}</div>
<div>
<table style="border:1 px solid gray">
<tr>
<td>blah</td>
<td><img src="img.gif" title="image"></td>
</tr>
<tr>
<td style="backgrou nd-color:#F3F3F3;" >Visit us
<strong>{when }</strong>.</td>
</tr>
<table>
</div>
how can I replace all occurances of {when} with, say, NOW without
"upsetting" any of the existing tags?
Andrew Poulos
Comment