...

View Full Version : < and > turning into &lt; and &gt;



Sam46
07-03-2011, 10:58 AM
Hi guys, I'm relatively new to HTML and I'm just messing around trying to do a contact form table for a website but for some reason it keeps turning the < and > symbols in the second half of the code into &lt; and &gt; making it unviewable as the web page literally shows the code as &lt; and &gt;

How do I convert this back into < > and make it stick so it doesn't keep happening? Everytime I replace the code again it works fine then when I save it or something it turns is back into &lt; and &gt;. Thanks.

DanInMa
07-03-2011, 11:57 AM
what program are you editing with? it sounds like you are in some sort of "design" view and you should be in code view to put in html.

Sam46
07-03-2011, 12:32 PM
I'm using NVU.

And I am also using HTML view and when I finish writing the code for the contact box (Has a name field, email field, telephone field and message field) I go to the design view and it all looks fine with the submit button and everything. Then when I go back to HTML and then back to design, all the HTML after the last box on the contact form is written in the message box and so my submit button dissappears and everything. This is because half of the code's < and > symbols have changed to &lt; and &gt;.

When I replace the &lt; and &gt; with the < and > symbol respectively it works again, but then I go back to design and it resets it to &lt; and &gt;

How on earth do I fix this lol

EDIT: How do I prevent NVU turning < and > into entities? But why is it only turning a few characters into entities and not the whole document?

This:



<div id="page">
<div id="content">
<div class="post">
<h1 class="title">CONTACT</h1>
<div class="entry">
<form name="contactform" method="post" action="send_form_email.php">
<table width="450">
<tbody>
<tr>
<td valign="top"><label for="first_name">First Name *</label></td>
<td valign="top"><input name="first_name" maxlength="50" size="30" type="text" /></td>
</tr>
<tr>
<td valign="top"><label for="last_name">Last Name *</label></td>
<td valign="top"><input name="last_name" maxlength="50" size="30" type="text" /></td>
</tr>
<tr>
<td valign="top"><label for="email">Email Address *</label></td>
<td valign="top"><input name="email" maxlength="80" size="30" type="text" /></td>
</tr>
<tr>
<td valign="top"><label for="telephone">Telephone Number</label></td>
<td valign="top"><input name="telephone" maxlength="30" size="30" type="text" /></td>
</tr>
<tr>
<td valign="top"><label for="comments">Message *</label></td>
<td valign="top">
<textarea name="comments" maxlength="1000" cols="25" rows="6" /></td>
</tr>
<tr>
<td colspan="2" style="text-align: center;"><input value="Submit" type="submit" /></td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
</div>
<!-- end #content -->


Is turning into:


<div id="menu">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="pricing.html">Pricing</a></li>
<li><a href="remotesupport.html">Remote Support</a></li>
<li><a href="links.html">Links</a></li>
<li class="current_page_item"><a href="contact.html">Contact</a></li>
</ul>
</div>

<!-- end #menu -->
<div id="page">
<div id="content">
<div class="post">
<h1 class="title">CONTACT</h1>
<div class="entry">
<form name="contactform" method="post" action="send_form_email.php">
<table width="450">
<tbody>
<tr>
<td valign="top"><label for="first_name">First Name *</label></td>
<td valign="top"><input name="first_name" maxlength="50" size="30" type="text" /></td>
</tr>
<tr>
<td valign="top"><label for="last_name">Last Name *</label></td>
<td valign="top"><input name="last_name" maxlength="50" size="30" type="text" /></td>
</tr>
<tr>
<td valign="top"><label for="email">Email Address *</label></td>
<td valign="top"><input name="email" maxlength="80" size="30" type="text" /></td>
</tr>
<tr>
<td valign="top"><label for="telephone">Telephone Number</label></td>
<td valign="top"><input name="telephone" maxlength="30" size="30" type="text" /></td>
</tr>
<tr>
<td valign="top"><label for="comments">Message *</label></td>
<td valign="top">
<textarea name="comments" maxlength="1000" cols="25" rows="6">&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="2" style="text-align: center;"&gt;&lt;input
value="Submit" type="submit" /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;!-- end #content --&gt;

Sam46
07-03-2011, 05:08 PM
Anyone?

Major Payne
07-04-2011, 01:09 PM
The edits you make in Visual Editor mode is the code NVU writes. It will not be changed. When you insert HTML code in Visual Edit mode without using the correct steps, NVU converts the HTML to non-active tags so it will appear as text. That's what it expects you want since you did not insert the HTML correctly. Read the Help for inserting code in Visual Edit Mode.

You can insert HTML in the page by switching to Code Edit mode, but returning to Visual Edit may upset your layout. This is normal with these visual editors where people switch mode views to work.

May I suggest that you change to KompoZer which replaces NVU? Better yet, you would be much better off making your pages in Code Edit mode and viewing your results in your own browser.
==================
Web Editors (PC):

WebPlus Starter Edition – A Free & Powerful Website Builder For Beginners [Windows]: http://www.makeuseof.com/tag/webplus-starter-edition-free-powerful-website-builder-beginners-windows/
PageBreeze (Free visual (WYSIWYG) and HTML tag/source modes): http://www.pagebreeze.com/
Serif WebPlus SE: http://myrtc.blogspot.com/2009/08/review-serif-webplus-se.html
Notepad++ (Free source code editor and Notepad replacement that supports several languages): http://notepad-plus-plus.org/ or
http://notepad-plus.sourceforge.net/uk/site.htm
Komodo Edit: http://www.activestate.com/komodo-edit

Aptana Studio: http://www.aptana.org/products/studio2
PSPad: http://www.pspad.com/
jEdit: http://www.jedit.org/
TextWrangler: http://www.barebones.com/products/textwrangler/
Official text editor of the GNOME desktop environment: http://projects.gnome.org/gedit/

Online WebSketch: http://www.websketch.com/
Online HTML Editor: http://www.onlinehtmleditor.net/

vikram1vicky
07-04-2011, 01:26 PM
Recommand you Aptana Studio: http://www.aptana.org/products/studio2

:)

Sam46
07-04-2011, 04:09 PM
The edits you make in Visual Editor mode is the code NVU writes. It will not be changed. When you insert HTML code in Visual Edit mode without using the correct steps, NVU converts the HTML to non-active tags so it will appear as text. That's what it expects you want since you did not insert the HTML correctly. Read the Help for inserting code in Visual Edit Mode.

You can insert HTML in the page by switching to Code Edit mode, but returning to Visual Edit may upset your layout. This is normal with these visual editors where people switch mode views to work.

May I suggest that you change to KompoZer which replaces NVU? Better yet, you would be much better off making your pages in Code Edit mode and viewing your results in your own browser.
==================
Web Editors (PC):

WebPlus Starter Edition – A Free & Powerful Website Builder For Beginners [Windows]: http://www.makeuseof.com/tag/webplus-starter-edition-free-powerful-website-builder-beginners-windows/
PageBreeze (Free visual (WYSIWYG) and HTML tag/source modes): http://www.pagebreeze.com/
Serif WebPlus SE: http://myrtc.blogspot.com/2009/08/review-serif-webplus-se.html
Notepad++ (Free source code editor and Notepad replacement that supports several languages): http://notepad-plus-plus.org/ or
http://notepad-plus.sourceforge.net/uk/site.htm
Komodo Edit: http://www.activestate.com/komodo-edit

Aptana Studio: http://www.aptana.org/products/studio2
PSPad: http://www.pspad.com/
jEdit: http://www.jedit.org/
TextWrangler: http://www.barebones.com/products/textwrangler/
Official text editor of the GNOME desktop environment: http://projects.gnome.org/gedit/

Online WebSketch: http://www.websketch.com/
Online HTML Editor: http://www.onlinehtmleditor.net/

Cheers however I was originally using source view :S and when I open firefox it still shows it as &lt; and &gt;

Anyway, I found a way around this by using the iframe form and it looks and works brilliant. However, I now have another problem... the footer code on my page keeps disappearing when I reinsert it.

EDIT: Don't worry, fixed it :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum