Page 1 of 1
html code replacement
Posted: Mon Jan 02, 2006 12:37 pm
by Algy
I am trying to replace a form with another form in web pages (Freefind code for Google code). While I cannot get this to work in the web pages if I create a text file with the code of one form it will be replaced with the other form code.
Can anyone help, please? I'm hoping to do this on 2,500 web pages.
Algy
Posted: Mon Jan 02, 2006 1:50 pm
by ben_josephs
I have no idea what you mean.
Exactly what do you want to replace and exactly what do you want to replace it with?
html code replacement
Posted: Mon Jan 02, 2006 2:59 pm
by Algy
I want to replace code in each page of my web site as follows:
FIND
<FORM ACTION="
http://search.freefind.com/find.html"
METHOD="GET" target="_self">
<p>
<font size=1 face="arial,helvetica" ><A HREF="
http://search.freefind.com/find.html?id=517987">
<font color="#FFFF00">Search this site</font></a><font color="#FFFF00">
powered by </font> <A HREF="http://www.freefind.com"><font color="#FFFF00">FreeFind</font></A><br>
<INPUT TYPE="HIDDEN" NAME="id" SIZE="-1" VALUE="517987">
<INPUT TYPE="HIDDEN" NAME="pid" SIZE="-1" VALUE="r">
<INPUT TYPE="HIDDEN" NAME="mode" SIZE="-1" VALUE="ALL">
<INPUT type="HIDDEN" name="n" value="0">
<INPUT TYPE="TEXT" NAME="query" SIZE="20">
<INPUT TYPE="SUBMIT" VALUE=" Find! "></font></p>
</FORM>
REPLACE
<FORM method=GET action=
http://www.google.com/custom>
<TABLE bgcolor=#FFFFFF cellspacing=0 border=0>
<tr valign=top><td>
<A HREF=
http://www.google.com/search>
<IMG SRC=
http://www.google.com/logos/Logo_40wht.gif border=0 ALT=Google align=middle></A>
</td>
<td>
<INPUT TYPE=text name=q size=31 maxlength=255 value="">
<INPUT type=submit name=sa VALUE="Google Search">
<INPUT type=hidden name=cof VALUE="S:www.disabilityfilms.co.uk;GL:0;AH:center;AWFID:13ee7c928d291f89;">
<input type=hidden name=domains value="www.disabilityfilms.co.uk"><br><input type=radio name=sitesearch value=""> Search WWW <input type=radio name=sitesearch value="
www.disabilityfilms.co.uk" checked> Search
www.disabilityfilms.co.uk
</td></tr></TABLE>
</FORM>
Posted: Mon Jan 02, 2006 6:08 pm
by ben_josephs
The text you are searching for and what you want to replace it with seem to bear little relationship to each other.
In what way does the replacement text depend on the text that is found?
html code replacement
Posted: Mon Jan 02, 2006 6:12 pm
by Algy
Hi
I want to replace all the 'found' text with the 'replace' text. Will WildEdit not allow the replacement of such a large chunk of text?
Posted: Mon Jan 02, 2006 6:25 pm
by ben_josephs
Paste the search expression into the Find what box, paste the replacement expression into the Replace with box, unselect Regular expression (because of the ?), and replace away.
html code replacement
Posted: Mon Jan 02, 2006 6:44 pm
by Algy
Thanks for the trouble you're taking. This is what I have been doing which is why it is so frustrating. Luckily I'm only trying this out on a few pages so the results are instant.
Posted: Mon Jan 02, 2006 10:54 pm
by ben_josephs
Do you mean that this is what you have been doing, but that it doesn't work? Does it work when you paste the target pages into the Test pane? Do the target files have Unix line endings (LF)?
If so, in the Options pane, try selecting Literal line break characters: Linefeed only (Unix).
html code replacement
Posted: Tue Jan 03, 2006 1:01 pm
by Algy
Bingo. It did work in the test field and it worked on the files when I ticked the option Linefeed Only. So thankyou very much.
David