HTML - Checkbox Database Search
I've tried a few different things and I honestly don't know how to get it to work. I'm using MS VWD Express in hopes it would take care of most of the work. I really hope someone can give me an example of what I'm looking to do.
Just to keep it simple I'll keep it to two columns. SQL Database Column 1 ID (int) primary key Column 2 Name (varchar) On my aspx page I would like to have checkboxes and to keep the example short let us just say three. Mike John Frank What I'm look for is if Mike and John are checked I will get a datagrid with results like the following: ID Name 2 Mike 4 Mike 9 Frank 10 Frank or if all three are checked I would get ID Name 1 John 2 Mike 3 John 4 Mike 5 John 6 John 7 John 8 John 9 Frank 10 Frank I just can't figure it out. Please help. Thanks. Similar Tutorialshello guys, can someone guide me on how to setup/create search in my website for content and pages not using any database, all i want is to search simple content in my limited number of pages ? is that possible using html ? if yes then please guide me how to accomplish it...thanks For example, this scenario: 1. My page contains the text "giraffes in corduroys" 2. somebody googles that text - either as a phrase or just the words 3. google points them to my page 4. the user clicks to go to my page... Is there any way to determine that it was the text "giraffes in corduroys" which brought them to my page? Would the crux be getting the previous URL in the browser history? Hi, I am wanting to impliment a feature where I can install a search box on my website that will search anothers content. Basically I have two sites, one has thousands of sound effects on it, the other is more of a portal site. On the portal site I want to add a search box that will link into the other sites database so that the user would navigate away from the portal site and be taken to the stabndard search results page of the main site based on thier queory. Is there any code that anyone knows of to do this? Thanks all! Hi...not sure if this is the proper place to post this or not. I'm trying to do two things...first: I'm trying to set up a search box in frame 1 that will search, scroll to and highlight text in frame 2. Is this possible? I've been searching around for days looking for answers, and have so far come up short. I managed to create a search box in frame 1 that reloads frame 2, but that's not really what I'm after. ---------------------------- Now for the second thing I'm looking to do (along the same lines): I want to click a link in frame 1 that scrolls to a target in frame 2 and highlights it. The target is a word in the middle of a paragraph. Any help would be appreciated. I'm pretty green, so treat me like a beginner. Thanks so much! Hi, I want to make a search box on my website. The thing is that I would like the search bar to be able to search on multiple search engines. For example I can type a movie in the search field and then I can select if I want to search for the movie either on google or on IMDb. I want it to look like this: http://subtext.no/kjartan/charlie/searchbox.png If anyone could help me get this kind of searchbox it would be great. Thanks in reaply. I'm trying to have my search box and search button aligned but I can't seem to get it working. Whenever I try to move one vertically, both of them end up moving and I'm all out of ideas. Here is the code: Code: <script src="http://supportforms.epnet.com/eit/scripts/ebscohostsearch.js" type="text/javascript"></script> <form action="" method="post" onsubmit="return ebscoHostSearchGo(this);"><input id="ebscohostwindow" name="ebscohostwindow" type="hidden" value="1" /> <input id="ebscohosturl" name="ebscohosturl" type="hidden" value="http://search.ebscohost.com/login.aspx?direct=true&site=ehost-live&scope=site&type=1&custid=S6281220&groupid=Main&profid=EDS&mode=bool&cli0=FR&clv0=Y&cli1=RV&clv1=Y&cli2=PT82&clv2=(PT+Academic+Journal+or+PT+Periodical+or+PT+Trade+Publication)%7e(PT+Book+or+PT+Almanac+or+PT+ebook+or+PT+audiobook)%7e(PT+Newspaper+or+PT+NEWSP+or+PT+Newswire+or+PT+WIRES)&lang=en&authtype=guest" /> <input id="ebscohostsearchsrc" name="ebscohostsearchsrc" type="hidden" value="url" /> <input id="ebscohostsearchmode" name="ebscohostsearchmode" type="hidden" value="+" /> <input id="ebscohostkeywords" name="ebscohostkeywords" type="hidden" value="" /> <div style="background-image: url('http://i.imgur.com/Wjilo.jpg'); background-repeat: no-repeat; width: 900px; height: 600px; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 9pt; color: #353535;"> <div style="padding-top: 249px; padding-left: 70px;"><span style="font-weight: bold;" ></span> <div> <input id="ebscohostsearchtext" name="ebscohostsearchtext" type="text" size="23" style="font-size: 16pt; padding-right: 340px; height: 50px;"> <button type="submit" style="border: 0; background: transparent;"><img src="http://i.imgur.com/nYPoa.png" width="145" hspace="25" alt="submit" /> </div> </div> </div> </form> I'm using IE8 to test Hi, I'm trying to add a google search box (in a table) to my web page, but for some reason it the input button links to the page I am currently on. The strange part is that I put the same exact code in another cell right next to the other google search box and that one works wonderfully while the first one still links to the current page. It is the same with any search engine (yahoo, bing, ask), the first search box links to the current page and the rest work great. Here is the code I use: Code: <form method="get" action="http://www.google.com/search"> <input style="width:140px" type="text" name="q" size="31" maxlength="255" value="" /><br /> <input type="submit" value="Google Search" /> </form> html than php in second post. I cant figre out the code for the checkboxes to get there value. HTML Code: <form name="form2" action="captcha3.php","http://www.mark-10.com/cgi-bin/mailto" method="POST" onsubmit="return ErrorCheck();"> <INPUT TYPE="hidden" NAME="RECIPIENT" VALUE="dm@mark-10.com"> <INPUT TYPE="hidden" NAME="subject" VALUE="Mark-10 Warranty Registration Form"> <INPUT TYPE="hidden" NAME="THANKURL" VALUE="http://www.mark-10.com/thankyou-warranty.html"> <input type="hidden" name="identicalfields" value="email,email2"> <tr> <td align="left" width="627" height="16" colspan="4"><font size="2">1. How did you first become aware of Mark-10 products?</font></td> </tr> <tr> <td align="left" width="627" height="16" colspan="4"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td><input type="checkbox" name="aware[]" value="Internet"><font size="2">Internet</font></td><td width="75%" colspan="3"> <input type="checkbox" name="aware[]" value="Magazine"><font size="2"> Magazine</font><input name="magazine" type="text" size="36"></td></tr> <tr><td><input type="checkbox" name="aware[]" value="Colleague"><font size="2"> Colleague</font></td> <td><input type="checkbox" name="aware[]" value="Exhibition"><font size="2"> Exhibition</font></td> <td><input type="checkbox" name="aware[]" value="Distributor"><font size="2"> Distributor</font></td> <td><input type="checkbox" name="aware[]" value="Mailing"><font size="2"> Mark-10 mailing</font></td> </tr> </table> </td> </tr> <tr> <td align="left" width="627" height="16" colspan="4"></td> </tr> <tr> <td align="left" width="627" height="16" colspan="4"><font size="2">2. Which search engine(s) do you most commonly use when searching for equipment? Check up to two choices.</font></td> </tr> <tr> <td align="left" width="627" height="16" colspan="4"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td width="25%"><input type="checkbox" name="Q2Google" value="Yes"><font size="2"> Google</font></td> <td width="25%"><input type="checkbox" name="Q2Yahoo" value="Yes"><font size="2"> Yahoo</font></td> <td width="25%"><input type="checkbox" name="Q2MSN" value="Yes"><font size="2"> MSN Search</font></td> <td width="25%"><input type="checkbox" name="Q2Ask" value="Yes"><font size="2"> Ask</font></td> </tr> <tr> <td width="25%"><input type="checkbox" name="Q2GS" value="Yes"><font size="2"> Globalspec</font></td> <td width="25%"><input type="checkbox" name="Q2TR" value="Yes"><font size="2"> Thomas Register</font></td> <td width="50%" colspan="2"> <input type="checkbox" name="Q2Other" value="Yes"><font size="2"> Other </font><input name="Q2OtherName" type="text" size="30"></td> </tr> </table> </td> </tr> <tr> <td align="left" width="627" height="16" colspan="4"></td> </tr> <tr> <td align="left" width="627" height="16" colspan="4"><font size="2">3. Which of the following best describes the primary reason for purchasing this Mark-10 product? Check all that apply.</font></td> </tr> <tr> <td align="left" width="627" height="16" colspan="4"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td width="25%"><input type="checkbox" name="Q3Size" value="Yes"><font size="2"> Size</font></td> <td width="25%"><input type="checkbox" name="Q3Price" value="Yes"><font size="2"> Price</font></td> <td width="25%"><input type="checkbox" name="Q3Reputation" value="Yes"><font size="2"> Brand reputation</font></td> <td width="25%"><input type="checkbox" name="Q3Warranty" value="Yes"><font size="2"> Warranty</font></td> </tr> <tr> <td width="25%"><input type="checkbox" name="Q3Features" value="Yes"><font size="2"> Features</font></td> <td width="50%" colspan="2"> <input type="checkbox" name="Q3Versatility" value="Yes"><font size="2"> Versatility / Modularity</font></td> <td width="25%"><input type="checkbox" name="Q3Recommendation" value="Yes"><font size="2"> Recommendation</font></td> </tr> </table> </td> </tr> <tr> <td align="left" width="627" height="16" colspan="4"></td> </tr> <tr> <td align="left" width="627" height="16" colspan="4"><font size="2">4. How would you rate the service you received from Mark-10 or your distributor?</font></td> </tr> <tr> <td align="left" width="627" height="16" colspan="4"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td width="25%"><input type="checkbox" name="Q4Poor" value="Yes"><font size="2"> Poor</font></td> <td width="25%"><input type="checkbox" name="Q4Satisfactory" value="Yes"><font size="2"> Satisfactory</font></td> <td width="25%"><input type="checkbox" name="Q4Good" value="Yes"><font size="2"> Good</font></td> <td width="25%"><input type="checkbox" name="Q4Outstanding" value="Yes"><font size="2"> Outstanding</font></td> </tr> </table> </td> </tr> <tr> <td align="right" width="627" height="16" colspan="4"></td> </tr> <tr> <td align="right" width="627" height="5" colspan="4"> <p align="left">5. Please suggest any improvements to existing Mark-10 products or new product ideas.</td> </tr> <tr> <td align="right" width="627" height="16" colspan="4"> <p align="left"> <textarea name="Q5Improvements" style="width:425px; height: 75px;" rows="1" cols="20"></textarea></td> </tr> <tr> <td height="16" colspan="4"></span>*Please Enter Code-><img src="captcha_image.php" alt="" />: </div> <input name="Security_Code1" type="text" id="Security_Code1" size="15"></td> </tr> <tr> <td align="right" width="627" height="16" colspan="4"> <p align="left"><input name="submit" type="submit" id="scratch_submit" onClick="MM_validateForm('Name','','R','Email','','RisEmail','Address1','','R','City','','R','State','','R','Zip','','R','Tel','','R','ModelNo','','R','SerialNo','','R','PurchDate','','R');return document.MM_returnValue" value="Submit"> <input type="reset" value="Clear" name="Reset"></td> </tr> </table> <table cellspacing="2" width=525 border=0 celpadding="3"> </table> </form></td> hi , Iam using checkbox in program in html. when i clicked the checkbox iam geeting required content , but i want to hide the content when i removed the selection on my checkbox.even if i remove the selection content is available , but i want to hide it. if there is any option to do that please sugest me. thanks regards jyothi. HTML Code: <input type="hidden" value="0" name="options[age]"/><input type="checkbox" value="1" name="options[age]"> <xsl:if test="match_result/form_definition/form_values/value[@name = 'options[age]'] = 1"> <xsl:attribute name="checked">checked</xsl:attribute> </xsl:if> </input> Age <input type="hidden" value="0" name="options[already_matched]"/><input type="checkbox" value="1" name="options[already_matched]"> <xsl:if test="match_result/form_definition/form_values/value[@name = 'options[already_matched]'] = 1"> <xsl:attribute name="checked">checked</xsl:attribute> </xsl:if> </input> Include already matched partners I have two checkbox in XLS, but the second is uncheck, while the first one is checked. what is going on? FYI: i did not write these codes How do you creat an unchecked checkbox in ZLS? Hi Guys, I've got 90 checkboxes in a table in a form on my index.html page. i.e: Code: <input type="checkbox" name="2e" id="2e"/> I would like one checkbox to be initially checked depending on the url used to get there e.g. Code: http://mysite.com/book/index?2e or http://mysite.com/book/index?2e=yes Any Ideas? Thanks, Leigh So, just have to say upfront that I don't really know HTML at all but my boss likes to throw me into things and lets me sink or swim. Basically, I need to update a database viewer that he wrote. The first (of sure to be many) problems are check boxes. Currently, when the user chooses a database and table from a drop down box then it shows the table with all the rows and columns showing. Note that the columns change based on the table selected. Now, I need the page to display a list of all the columns in that table as check boxes and when one clicks on a check box, it filters the table to show only the checked columns. I currently have the correct check boxes showing up based on the table but I am having trouble retrieving which columns have been checked for use in the actual filtering. Here's my current version of relevant code: HTML Code: <form name ="columnList"> Column: <c:forEach var="columnitem" items="${columns}"> <c:if test="${columnitem.name != this.document.columnList.name}"> <input type="checkbox" name="${columnitem.name}" id="${columnitem.name}" value="${columnitem.name}">${columnitem.name} </input> </c:if> </c:forEach> <th> <a href="onclick=javascript:setColumnsSelected('<c:out value='${columnitem.name}'/>')" </a> </th> </form> Code: function setColumnsSelected(column){ var colList = new Array(); if(this.document.getElementById(column).checked == true) colList.add(column); else colList.remove(column); } colList isn't used yet, but it will be. Can anyone help me out? Be gentle, I really have no clue what I'm doing. Hello, I am having troubles getting the below to work. Can someone help me out? Thanks in advanced. How do i get the below to work? Java if (document.orderform.terms.value== false) { alert("You must agree to our terms and conditions before an order can be processed") document.orderform.terms.focus() return false } HTML: <p>By clicking on the below you have read and agree to our terms and conditions</p> <input type="checkbox" name="terms" /><p>I Agree</p> I have a simple HTML page that I would like to have 2 checkboxes available for the user to click. Now where this gets a little different: I do not want to have this "form" to function as a normal form, as this webpage is generated and displayed from within a desktop application (as a template). I essentially just want the user to click a checkbox and then click the print button from within the desktop application and have the webpage print with the checkbox checked. I am running into a problem because the checkbox that the user checked clears out when the user clicks the print button. I am assuming this is because I do not have any sort of "submit" method being used for this form (as it is just essentially a display for the user to check off an option that should then be printed as displayed on the screen). Is this at all possible? I am restricted to using HTML, CSS and XSL to build these web templates that are displayed in the desktop application so asp, javascript etc is not an option. Thanks for any help. Hi there, Can anyone tell me the easiest way to make a form that only allows up to three checkboxes to be ticked? I've got a form with a question that asks 'which three of the following do you agree most with.' and there's about 10 checkboxes. How easy is it to limit the number to three? Many thanks! I have a page that has a checkbox. The checkbox is initially checked/unchecked depending on a value in a table. (Of course, the user has the ability to change this value once the page loads, this is just used for the initial value). The following code works, but does not validate using XHTML 1.0 STRICT: Code: <input type = 'checkbox' Name="chkComplete <?PHP print $chkComplete; ?> >Would you like to mark the item as completed? I know to validate to XHTML strict, I would need to code as either checked="checked" or unchecked="unchecked". How can I incorporate this into the PHP print or echo command so that the line will validate? Thanks. Hi all! I wanna know how to personalise a checkbox... replacing the check off/on with an image (off and on). Can't find the script anywhere There's one for the radio button, but not for the checkbox Thanx Ray Hi: I would like to have a checkbox select input where I have approx 24 items for the user to select from. However, I want the user to *priority-order* his selections and have him/her select only a max of 8 of the 24 items. Instead of a 'checkmark, I would like to see the digits '1' up to '8' in the check boxes, which would indicate his priority order of choices. If this is impossible, can you suggest an alternative. (I don't want a drop-down list, I would prefer a 6-row, 4-column table of checkbox inputs). btw, this will be used by service providers to tell us which services they can/will provide to our Senior's Park, and in what priority they rate their various capabilities (from tree-pruning thru painting, thru yard cleanup, thru plumbling, re-modelling, etc). Thanks, -Mel Smith My form includes two checkboxes: Code: Remember password? <input type="checkbox" name="rememberPassword" value="on" checked/> <b><i><font color="#35A02C"> (deselect if using a public computer)</font></i></b><br/> Automatic login? <input type="checkbox" name="autoLogin" value="on" checked/><br/> How can I make it so that if the user deselects the first checkbox, the second will be automatically deselected aswell? Thanks, James |