Results 1 to 16 of 16

Thread: HTML help[RESOLVED]

  1. #1

    Thread Starter
    Addicted Member Osiris's Avatar
    Join Date
    Oct 2000
    Location
    Dimension Hole
    Posts
    142

    HTML help[RESOLVED]


    Hi everyone

    I hope that this is a simple question... well.. this is my HTML code:
    HTML Code:
    <html>
    	<body>
    		<table border=1>
    			<tr>
    				<td>hi
    					<form><input type=hidden value='hello' height=0>
    					</form>
    				</td>
    			</tr>
    		</table>
    	</body>
    </html>
    Well, my problem is that the table comes up with an extra space, something like this:

    +---+
    |hi |
    | * |
    +---+

    And I would like for my table to look like this:
    +---+
    |hi |
    +---+

    I suspect the <input type=hidden> to be causing this but I dont know how to get rid of this problem. Anyone have any idea of how to fix this?
    Last edited by Osiris; Nov 12th, 2005 at 08:28 PM.
    ؊Ϯϊ

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: HTML help

    Since you have your formatting of code with a carriage return (line break) it adds the break to after your form resulting in an additional line.
    HTML Code:
    <html>
    	<body>
    		<table border=1>
    			<tr>
    				<td>hi
    					<form><input type=hidden value='hello' height=0></form>
    				</td>
    			</tr>
    		</table>
    	</body>
    </html>
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Addicted Member Osiris's Avatar
    Join Date
    Oct 2000
    Location
    Dimension Hole
    Posts
    142

    Re: HTML help

    Quote Originally Posted by RobDog888
    Since you have your formatting of code with a carriage return (line break) it adds the break to after your form resulting in an additional line.
    HTML Code:
    <html>
    	<body>
    		<table border=1>
    			<tr>
    				<td>hi
    					<form><input type=hidden value='hello' height=0></form>
    				</td>
    			</tr>
    		</table>
    	</body>
    </html>
    No, that's not it... as I understand HTML ignores any carriage return and only accepts the tag <br>...

    edit:
    Actually, the problem is the form itself, wheneven I remove the form the problem goes away...
    Last edited by Osiris; Nov 12th, 2005 at 07:05 PM.
    ؊Ϯϊ

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: HTML help

    Oops I missed the "Hi" being in there. You have a line break after the "Hi" and then your form. Place that all on one line.
    HTML Code:
    <html>
    	<body>
    		<table border=1>
    			<tr>
    				<td>hi<form><input type=hidden value='hello' height=0></form></td>
    			</tr>
    		</table>
    	</body>
    </html>
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196

    Re: HTML help

    either place the table within the form or set the forms style to display:none
    PHP Code:
    <html>
      <
    body>
        <
    form >
            <
    table border=1
               <
    tr
                     <
    td>hi <input type=hidden value='hello' height=></td>
               </
    tr>       
            </
    table>
        </
    form>
      </
    body>
    </
    html

  6. #6

    Thread Starter
    Addicted Member Osiris's Avatar
    Join Date
    Oct 2000
    Location
    Dimension Hole
    Posts
    142

    Re: HTML help

    Quote Originally Posted by RobDog888
    Oops I missed the "Hi" being in there. You have a line break after the "Hi" and then your form. Place that all on one line.
    HTML Code:
    <html>
    	<body>
    		<table border=1>
    			<tr>
    				<td>hi<form><input type=hidden value='hello' height=0></form></td>
    			</tr>
    		</table>
    	</body>
    </html>
    I have already tried that...
    the space is still there when the HTML code is only this:
    HTML Code:
    <html>
    	<body>
    		<table border=1>
    			<tr>
    				<td>hi<form></form></td>
    			</tr>
    		</table>
    	</body>
    </html>
    [/QUOTE]

    and when I remove the <form> tags it becomes ok...
    ؊Ϯϊ

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: HTML help

    Ok then, is your cell wide enough or the form could be causing a word wrap effect.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  8. #8

    Thread Starter
    Addicted Member Osiris's Avatar
    Join Date
    Oct 2000
    Location
    Dimension Hole
    Posts
    142

    Re: HTML help

    Quote Originally Posted by DeadEyes
    either place the table within the form or set the forms style to display:none
    PHP Code:
    <html>
      <
    body>
        <
    form >
            <
    table border=1
               <
    tr
                     <
    td>hi <input type=hidden value='hello' height=></td>
               </
    tr>       
            </
    table>
        </
    form>
      </
    body>
    </
    html
    Well, I wouldn't be able to do this because originally I will have this code generated by PHP and create many tables

    PHP Code:
    <html>
      <
    body>
        <
    table name='main_table'>
          <
    tr>
            <
    td>
              <
    form >
                <
    table border=1
                  <
    tr
                    <
    td>hi <input type=hidden value='hello' height=></td>
                  </
    tr>       
                </
    table>
              </
    form>
            </
    td>
          </
    tr>
          <
    tr>
            <
    td>hi 2<input type=hidden value='hello2'>
            </
    td>
          </
    tr>
        </
    table>
      </
    body>
    </
    html
    how would you set the form's style display to none?
    <form display=none>?

    I would like to try this second option...
    ؊Ϯϊ

  9. #9

    Thread Starter
    Addicted Member Osiris's Avatar
    Join Date
    Oct 2000
    Location
    Dimension Hole
    Posts
    142

    Re: HTML help

    Quote Originally Posted by RobDog888
    Ok then, is your cell wide enough or the form could be causing a word wrap effect.
    Yeah, perhaps, I will try extending the cell... or try the forms display style to none... if i am able to try it.
    ؊Ϯϊ

  10. #10
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196

    Re: HTML help

    Quote Originally Posted by Osiris
    how would you set the form's style display to none?
    <form display=none>?

    I would like to try this second option...
    HTML Code:
    <form style="display:none">
    but thats workaround not a proper solution. You might want to reconsider how the code is being generated fixing it may be a pain but it might work out better in the long run.

  11. #11

    Thread Starter
    Addicted Member Osiris's Avatar
    Join Date
    Oct 2000
    Location
    Dimension Hole
    Posts
    142

    Re: HTML help

    Quote Originally Posted by DeadEyes
    HTML Code:
    <form style="display:none">
    Setting the display to none works great!

    Thanks everyone for your help.

    but thats workaround not a proper solution. You might want to reconsider how the code is being generated fixing it may be a pain but it might work out better in the long run.
    I think I have to use this...

    I am generating a tables withing a main table and each table generated is wrapped by a form that will be submitted, and these forms are giving me extra spaces... i wouldn't know how else i would go about generating the code so it is formatted withing a table.
    ؊Ϯϊ

  12. #12

    Thread Starter
    Addicted Member Osiris's Avatar
    Join Date
    Oct 2000
    Location
    Dimension Hole
    Posts
    142

    Re: HTML help

    Heh, I didn't realize that the style="display:none" made everything in the form disappear until i applied it to my actual code... =|

    i guess you are right, that would not be a good idea to fix my problem...
    ؊Ϯϊ

  13. #13
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: HTML help

    What you see is a form margin. A simple peice of CSS will sort that. Also, don't use the border=1 attribute, it is deprecated
    HTML Code:
    <html> 
    	<style type="text/css">
    		table td form {
    			margin-top: 0px;
    		}
    
    		table td {
    			border-style: outset;
    			border-color: white;
    			border-width: 5px;
    			padding-right: 5px;
    		}
    	</style>
    		
    	<body> 
    		<table> 
    			<tr>  
    				<td>hi <form><input type=hidden value='hello' height=0>  </form> </td> 
    			</tr>
    			<tr>  
    				<td>hi <form><input type=hidden value='hello' height=0>  </form>  </td> 
    			</tr>
      </table> 
     </body>
     </html>
    Sorry, the forums screws up the spacing in the HTML - but hopefully you get the idea.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  14. #14

    Thread Starter
    Addicted Member Osiris's Avatar
    Join Date
    Oct 2000
    Location
    Dimension Hole
    Posts
    142

    Re: HTML help

    Ok, I did manage to work around the problem using the style="display:none"...

    Just in case in the future someone has the same problem I will post what I did... but I don't think will apply to all cases because we wouldn't want the form to be invisible.

    my solution:
    Code:
    <table name='main_table'>
      <tr>
        <td>
          <table>
            <tr>
              <td>
    	     information
              </td>
              <td>
                <form name='frm0' style='display:none'>
                <input type=hidden name='field0' value='x'>
                </form>
                <input type=button value='View' onclick="document.frm0.submit();">
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
    ؊Ϯϊ

  15. #15
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: HTML help

    Look at my previous post
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  16. #16

    Thread Starter
    Addicted Member Osiris's Avatar
    Join Date
    Oct 2000
    Location
    Dimension Hole
    Posts
    142

    Re: HTML help

    Quote Originally Posted by visualAd
    Look at my previous post
    Thanks visualAd

    And thanks everyone that helped...

    -------

    if we shouldn't use border=1... what should we use? the 'style' attribute?
    ؊Ϯϊ

Posting Permissions

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



Click Here to Expand Forum to Full Width