dream25 Posted November 13, 2008 Share Posted November 13, 2008 Hi, Im new to HTML, i just plan to create one page with a image by using the select option, there are 4 choice, right, left, top, bottom, if i click the right option, the image will be in the right side of the page, like the remaining options, how can i code for this, plz help me. the code below i tried here.. <html> <head> <title>picture</title> <form method="post" action="circle.html" > <select> <option>Please select your option</option> <option value="Left">Left</option> <option value="Right">Right</option> <option value="Top">Top</option> <option value="Bottom">Bottom</option> </select> </form> <img src="file:///C|/Documents and Settings/SES.SUMITAA-4088532/My Documents/My Pictures/001.jpg" </head> </html> Thanks in Advance Quote Link to comment Share on other sites More sharing options...
haku Posted November 13, 2008 Share Posted November 13, 2008 So do you have a question, or are you just blogging? Quote Link to comment Share on other sites More sharing options...
Goldeneye Posted November 13, 2008 Share Posted November 13, 2008 So you're trying to position the image based on a selected option from a form? Well, to start, HTML can't do anything with form values, so you'll want your form to point to a page that can (like php). So if this is the code for circle.html, change your filename to circle.php and learn a little basic PHP. Quote Link to comment Share on other sites More sharing options...
dream25 Posted November 15, 2008 Author Share Posted November 15, 2008 hi Goldeneye, Thanks for your reply. Is it possible to do in css. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
dropfaith Posted November 15, 2008 Share Posted November 15, 2008 you could have the form submit post data via php and use get to then pull the selected option to a css class so if user selects right the div becomes div class="right">img</div> or if user picks left gets the left side div.. i cant really write out the entire code but yeah use post and then get the data from the form and use it as a css classname Quote Link to comment Share on other sites More sharing options...
BoltZ Posted November 16, 2008 Share Posted November 16, 2008 And for future reference please wrap your code in tags please. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.