473,385 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How do I create two forms side by side on a page?

Gud evening
Actually i want to divide my page into two forms
and i want to insert my first form in right side
and the second form in left side.
Is there any possibility to do like this
and by default the forms are created one after another
please guide me towards the solution
thanq
Jun 20 '07 #1
4 16091
You can create frames. Here's a website that shows you how to do that:
http://www.w3schools.com/html/html_frames.asp

So basically you create a frameset and divide your column by half for a example, if that is what you want. Then you set each frame to point to a different source. It should look something like this:

<html>

<frameset cols="50%, 50%">

<frame src="frame_a.htm">
<frame src="frame_b.htm">

</frameset>

</html>
Jun 20 '07 #2
xNephilimx
213 Expert 100+
Gud evening
Actually i want to divide my page into two forms
and i want to insert my first form in right side
and the second form in left side.
Is there any possibility to do like this
and by default the forms are created one after another
please guide me towards the solution
thanq
I really don't encourage the use of frames for this kind of stuff, as sandra55 did. It can be easily done with the use CSS.

I'll show you how, but only the very basic and minumum code for this to work, you can then improve this a lot and add more complex stuff and layout design.

Here's how

This way will create a web page in the form of a left "menu"/"nav" space and a right "content" space.


First let's define the basic html to use, I'll use a strict xhtml doctype.
The basic tags we'll need (appart from the "default" ones) are three div tags, one wrapper div, to.. well.. wrap the other two, one for the menu, with the id "menu" and other with the id "content" for the content (those names will be the ones we will use to reference them from CSS), and a link tag to link the stylesheet (i'll cover the CSS part later)

So, voilą:

[HTML]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="styles.css" />
<title>Untitled Document</title>
</head>
<body>

<div id="wrapper">
<div id="menu">
<!--here'll be the menu items or something like that-->
</div>

<div id="content">
<!-- here will be the page main contents -->
</div>
</div>

</body>
</html>
[/HTML]

Nothing strange to you I hope...


On to the CSS part

We just finished our HTML part, so let's dive right in the CSS.
If you see the link tag it says href="styles.css", that means that the CSS file must be named "styles.css" and must be located in the very same folder as the HTML document.

Here's the CSS document content:

Expand|Select|Wrap|Line Numbers
  1. body {
  2.     text-align:center
  3. }
  4.  
  5. #wrapper {
  6.     margin:auto;
  7.     width:900px;
  8.     height:auto;
  9.     overflow:auto;
  10.     text-align:left;
  11. }
  12.  
  13. #menu {
  14.     float:left;
  15.     width:250px;
  16. }
  17.  
  18. #content {
  19.     float:right;
  20.     width:645px;
  21. }
  22.  
Save this to "styles.css" in the same folder as your HTML.

With this you'll have your page separated in to independent columns.
Like I said before, you could (and probably should, and must) improve this as this is just a skeleton for a layout, but I settled the basics for you to explore and improve this.
You could, for example, add a header on top of the two main divs, it's not too difficult, try and you'll make it.

Well, hope it served.
Good luck!
Jun 20 '07 #3
I am realllyyy thankful to u
and i am very happy with your guidance.
I have done a small thing can u suggest me whether it is encouragable r not.
Actullay i have taken a table and in that i have embedded one form in one td i mean table data and another one in another td. My code looks like this.


<html>
<body>
<table>
<tr>
<td>
<form>.........</form>
</td>
<td>
<form>.........</form>
</td>
</tr>
</table>
</body>
</html>


Please suggest me whether we can proceed further like this or not
thanks alot
have a nice day
Jun 22 '07 #4
xNephilimx
213 Expert 100+
I am realllyyy thankful to u
and i am very happy with your guidance.
I have done a small thing can u suggest me whether it is encouragable r not.
Actullay i have taken a table and in that i have embedded one form in one td i mean table data and another one in another td. My code looks like this.


<html>
<body>
<table>
<tr>
<td>
<form>.........</form>
</td>
<td>
<form>.........</form>
</td>
</tr>
</table>
</body>
</html>

Please suggest me whether we can proceed further like this or not
thanks alot
have a nice day

Yes, that's ok, I don't know what are you planning to do, I mean, I don't know why two forms, unless you're AJaXing it. But the plain HTML is ok that way.

Consider this, when you submit a form the page will reload or continue to another page, and that won't let the user submit the other form as well. That's why it seems like you're going to do some ajax there.

Good luck with you project!
Jun 29 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET)...
14
by: Matt | last post by:
I want to know if ASP.NET Web Forms Validation Controls are Server-Side or Client-Side form validation? Since I think each validator control can select either 1) JavaScript based error dialog or 2)...
1
by: NWx | last post by:
Hi, I implement forms authentication in my application. So I have a login form. Actually I have two custom Web controls, one to login and one to redirect user to Register page Login custom...
4
by: 23s | last post by:
I had this problem in the past, after a server reformat it went away, and now after another server reformat it's back again - no clue what's doing it. Here's the flow: Website root is public, no...
5
by: Cesar | last post by:
Hello, I have an application that is using forms authentication and it seems to be working fine most of the time. Unfortunatelly, it sometimes just redirects me to the login screen. It seems that...
6
by: rs | last post by:
I wonder, performance wise, if it is better to have one form and repaint the components on that form or to have mutiple forms and show and dispose them? Thanks
5
by: Phil Powell | last post by:
Requirement is to refresh a page in the form of a continual form submittal (for server-side validation and action) Here is the Javascript I came up with that I thought would do that: <script...
5
by: c676228 | last post by:
Hi everyone, my colleagues are thinking about have three insurance plans on one asp page: I simplify the plan as follow: text box:number of people plan1 plan2 plan3
16
by: flip2flik | last post by:
Hi. I am using visual web developer express edition and I am using vb.net as the programming language. I want to create a new aspx file on a button click. I will have a template that the new...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.