html code replacement

General questions about using WildEdit

Moderators: AmigoJack, helios, bbadmin, Bob Hansen, MudGuard

Post Reply
Algy
Posts: 5
Joined: Mon Jan 02, 2006 12:27 pm
Location: Lake District, England
Contact:

html code replacement

Post 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
ben_josephs
Posts: 2456
Joined: Sun Mar 02, 2003 9:22 pm

Post 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?
Algy
Posts: 5
Joined: Mon Jan 02, 2006 12:27 pm
Location: Lake District, England
Contact:

html code replacement

Post 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>
ben_josephs
Posts: 2456
Joined: Sun Mar 02, 2003 9:22 pm

Post 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?
Algy
Posts: 5
Joined: Mon Jan 02, 2006 12:27 pm
Location: Lake District, England
Contact:

html code replacement

Post 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?
ben_josephs
Posts: 2456
Joined: Sun Mar 02, 2003 9:22 pm

Post 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.
Algy
Posts: 5
Joined: Mon Jan 02, 2006 12:27 pm
Location: Lake District, England
Contact:

html code replacement

Post 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.
ben_josephs
Posts: 2456
Joined: Sun Mar 02, 2003 9:22 pm

Post 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).
Algy
Posts: 5
Joined: Mon Jan 02, 2006 12:27 pm
Location: Lake District, England
Contact:

html code replacement

Post 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
Post Reply