HTML - Force User Selection In Form
I have a form that contains a drop down list;
<select name="list" id="list" multiple="multiple"> When the user clicks the form's submit button I want to run a function that returns true if an <option> from that <select> object was selected and false if they forgot to make a selection. What is a simple way of doing this? I was thinking that maybe there was an object method like; if(document.form.select.optionSelected()==true) {do something; return true}; else {do something else; return false;} Similar TutorialsHi everyone, I'm new to this form and html I have a login portal, I want users to accept and click on the terms and conditions tick-box before he/she can click on the "Login" button. Any tips would be greatly appreciated. Cheers Tony I have a pdf file that is the catalog for my business. Is there a way to make it so that i can create a link that says "view" and if people click on it, then the standard "FILE DOWNLOAD" box does not come up... and it just opens the file in a separate window.... and have a "download" link where if they click that... then it just downloads the file. I know that i am weird... but i think it would be something that not everybody has... and something that would be kinda cool. Thanks in advance.... Mark Hello. I was wondering if it's at all possible to have a specific checkbox or radio button checked/selected when the user gets to that page depending on the link they clicked to get to that page. For example, I have a client who wants the user to go to a single form but from different categories (rather than having a form for each), but to make sure the recipient of the email knows which category it came from, the checkbox for that category would already be checked. The user would be able to check it themselves as well, but this ensures it's already selected and creates convenience for the user. Thanks How can I select the correct field in my "Select form field", once I know the value from php/mysql? PHP Code: $_SESSION['job'] = "FX"; Now I want to update the form to display the selected value... HTML Code: <select multiple="true" name="field"> <option value="FL" selected="true">Flash</option> <option value="FX">Flex</option> <option value="AJ">Ajax</option> <option value="PH">Php</option> <option value="HT">Html</option> <option value="JV">Java</option> <option value="CC">C++</option> </select> HTML Code: <div class="contactlistdiv"> <select multiple="yes" name="send" class="contactlistone" size="6"> <option value="1" >hello</option><option value="2" >gee</option><option value="3" >gluba</option></select> </div> I am creating a list like the one above. When I style it with CSS it wont let me select any options! E.g if i float left or right(float:right; ) with CSS it wont work. Where as if I place it absolutely somewhere it will work. Problem is to get it exaclty where I want i need to float it. I have tried placing it inside a relatively placed div absolutely but it still wont let me select. I have also tried styling both classes contactlistdiv and contactlistone but it doesnt make a difference. Any help appreciated. Thanks. Hey guys i need a bit of help i have been looking for a snippet of code to add to my site which will allow my users to register an email from my domain [eg:username@mydomain.com] if anyone would be so kind as to steer me in the right direction Any help would be greatly appreciated. Timmy Hello, I have the majority of the content of my site on pages that load within an iframe within the main page. I was wondering if there was a script that I could use on the content pages that, when loaded outside the frame would redirect to the main site, with the appropriate page loaded in the iFrame. Thanks in advance! Craig J. Ward My IE is configured to automatically find the most rexent page, so when I address a website I see the current page. However, Safari and Firefox do not seem to have this optiion. So, when users address my website with those browsers they have to push the refresh button to be sure they are seeing my site's latest page. Yet when I use those browsers to access websites other than my own, I seem to get the latest page. This suggests that there may be a way to include in a page file a code that forces refresh. I know that there is a code ("no archive") that does the job where a search engine is involved, but how do I handle this problems where my URL is being directly addressed? I have a website where some pages have no scrollbar, and some do. For pages with the scrollbar, it looks fine. Because that's expected. For pages without the scollbar, it bumps the divs to the right by ~15 pixels (because there is no more scrollbar). Is there some type of script, or a way to setup a DIV, to force a scrollbar? Even if there is no overflow of content for the page? As long as I can force a scrollbar on the page, it should be consistent. Hi You would think if you did a basic DW rollover that it should work in IE Oh no!!!!!! Can anyone shed the light on this: Problem site Basically the language selection and the menus should have a change of colour, which is basically a rollover image made in dreamweaver. Menu seems to work here! This is the same menu code used to make the menu and a PC friend says that the rollover affect does work. i.e: There are peppers in the background of the words. Same code, two different affects. Any light? please??? Oh, both use PNG and both sites have the same IE PNG fix code. Did I state, its only IE that has the issue. Thanks in advance Long live Mac!!! I'm creating a webpage with multiple right-aligned images. Each chunk of text has an image associated with it to the right. I'm having a problem keeping these images stacked on top of each other. If the chunk of text isn't taller than the associated image, the next paragraph and associated image sits to the left of the first image. I want both of these to sit below the first image. Currently, I'm using <br> tags to push the next paragraph down, but I'd like to avoid that. I hope I'm being clear. Here's an image to illustrate what I mean: The example above the blue line is what I'm experiencing. Below the blue line is what I want. I'd like to do this without tables. Hi all, How do I force a single web page to update to its most recent content? This file is being loaded from a frameset and when I load it in IE it doesn't update, I have to wipe all the temporary IE files in order to see the updated content. Thanks in advanced. Hi, I am trying to figure out how to restrict users (guests) from browsing straight to a page within my site. I would like to ensure that all users must access the site via www.mysite.com Example: User- browses to www.mysite.com/pages/interestingpage.php (or .htm) I would prefer to force the "User" to click their manually via the links on my main page. I imagine some sort of session would be required for this. However I do not wish to require users to log in. I've heard that .htaccess or Apache's config file can be used but so far I have not been successful. I do have full access to the server/configuration. Hoping someone can assist. Examples would be most ideal. Thanks! force download via server side scripting e.g. php <------ DOES ANYONE KNOW HOW TO DO THIS??? I want to have downloads on my site, but dont want to use zip files or the "right click, save as" garbage.... Hi all, I'm currently using the script below to resize a user's browser window when the site is opened: Code: <script language="JavaScript"> <!-- window.resizeTo(850,630) --> </script> Is there a piece of code I can add to this so that the browser window cannot be resized? This isn't a popup window, just the standard window. Thanks in advance, Baskervillain. Hello all I'm writing a mash up that has drag-able objects the problem is when I drag the object too fast my browser is selecting the text behind the object. So the screen behind the object keeps flashing blue. Is there a way to disable selection for a text block or change the color of what I select. Hey, I have a script at present which pre-loads 6 images and displays them on screen. I want a user to be able to select a checkbox next to the images so they can select which ones they want to use. On clicking continue the images selected are displayed on the next screen. Please can you help with coding for this as I am not getting very far. Thanks Hi, how can I put in a drop down menu that slides down or across from a regular text link in html? Then, when selecting one of the options, I would like it to automatically take the visitor to the page option selected? I don't want a drop down menu and then hit 'Go' type mechanism, just a slide and click type thing. i.e when the link is clicked on it would reveal a drop down list that says.. Hotel Car Rental Airport Car Park Insurance and would then link directly to the appropriate page. Thanks! Hey im making a gaming gear review site and i want to add a Selection guide to help people choose the right gear for them. Link below is something what i am thinking about but using drop down lists instead. http://www2.razerzone.com/MouseGuide/configurator/ i know how to make a drop down lists but i don't know how to link the information together also how would i produce the final result. Any help would be appreciated. Hello, I am semi new to HTML and was wondering if there is an easy way to adjust a price.. once a user has selected something from a selection box.. so say they pick an item for 10$ the price field then increases 10$.. same for if they downgrade price decreases. any ideas. |