Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    < and > turning into &lt; and &gt;

    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.

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    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.

  • #3
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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:

    Code:
    <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:
    Code:
    <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;
    Last edited by Sam46; 07-03-2011 at 03:12 PM.

  • #4
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Anyone?

  • #5
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    845
    Thanks
    11
    Thanked 79 Times in 77 Posts
    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...nners-windows/
    PageBreeze (Free visual (WYSIWYG) and HTML tag/source modes): http://www.pagebreeze.com/
    Serif WebPlus SE: http://myrtc.blogspot.com/2009/08/re...ebplus-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/
    Last edited by Major Payne; 07-04-2011 at 01:37 PM.
    ☠ ☠RON☠ ☠

  • #6
    Regular Coder
    Join Date
    Jul 2011
    Location
    India
    Posts
    496
    Thanks
    3
    Thanked 57 Times in 56 Posts
    Recommand you Aptana Studio: http://www.aptana.org/products/studio2


  • #7
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Major Payne View Post
    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...nners-windows/
    PageBreeze (Free visual (WYSIWYG) and HTML tag/source modes): http://www.pagebreeze.com/
    Serif WebPlus SE: http://myrtc.blogspot.com/2009/08/re...ebplus-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
    Last edited by Sam46; 07-04-2011 at 04:19 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •