Jump to content

Search the Community

Showing results for tags 'jquery'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome
    • Announcements & News
    • New Arrivals
  • Web Development
    • Programming
    • Database Development
    • Server Administration
    • Hosting & Domains
    • Frameworks
  • Web Design
    • HTML & CSS
    • Graphics & Multimedia
  • Desktop Discussion
    • Linux Development
    • Windows Development
    • Mac/Apple Development
    • Hardware Discussion
  • Marketing & Business
    • Advertising, Marketing, Monetization & Social Media
    • Search Engine Optimization & Traffic Building
    • Buy, Sell or Trade
  • Prodjex Web Development Applications, Tools and Plugins
    • IP.Board Applications and Plugins
    • Web Tools
  • The Developer Dump
    • General Chat

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 15 results

  1. This example explains how you can trigger events based on user input of a drop down using jQuery. Here's the entire page, I have 2 drop downs. On the page load the first drop down is shown, while the second drop down is hidden. Once the user selects any option from the first drop down the change event is triggered and the second option is shown. <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content="jQuery Select Drop Down On Change Event"> <meta name="author" content="Projex"> <title>jQuery Select Drop Down On Change Event | Prodjex Web Development and Consulting</title> <link href="../css/bootstrap.min.css" rel="stylesheet"> <link href="../css/signin.css" rel="stylesheet"> <style> body{background-color: grey;} p{color: #fff;} #additionalOptions{display:none;} </style> </head> <body class="text-center"> <div class="container"> <div class="col-md-12"> <img src="https://forums.prodjex.com/uploads/monthly_2017_12/5a49485fa77dd_logobig.png.0c19c7fc9cc393df1ad69f5ec30877c1.png"><br><br> <p>Select an option from the drop down menu.</p> <div class="form-group"> <select class="form-control" name="options" id="options" placeholder="Options"> <option value="">Select an option...</option> <option value="1">Option 1</option> <option value="2">Option 2</option> <option value="3">Option 3</option> <option value="4">Option 4</option> <option value="5">Option 5</option> </select> </div> <div class="form-group"> <select class="form-control" name="additionalOptions" id="additionalOptions" placeholder="Additional Options"> <option value="">Select an option...</option> <option value="1">Option 1</option> <option value="2">Option 2</option> <option value="3">Option 3</option> <option value="4">Option 4</option> <option value="5">Option 5</option> </select> </div> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> <script> $( "#options" ).change(function() { $("#additionalOptions").show(); }); </script> </body> </html> In the jQuery code you'll see that it's selecting the first drop down and listening for the change function. When it fires it then shows the second dropdown. <script> $( "#options" ).change(function() { $("#additionalOptions").show(); }); </script> View the demo here. View the Prodjex Web Development blog post on JQuery Select Drop Down On Change Event.
  2. Sometimes you have some input fields you want to show to the end user but not allow them to edit. For example a profile page where they can update their name, phone number, change their password, but you may want to restrict them from modifying their email address. Whatever the case may be here's a simple jQuery example of how to disable a text input field on page load. <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content="Example of how to disable an input field on page load using jQuery"> <meta name="author" content="Projex"> <title>jQuery Disable Input on Page Load | Prodjex Web Development and Consulting</title> <link href="../css/bootstrap.min.css" rel="stylesheet"> <link href="../css/signin.css" rel="stylesheet"> <style> body{background-color: grey;} p{color: #fff;} </style> </head> <body class="text-center"> <div class="container"> <div class="col-md-12"> <img src="https://forums.prodjex.com/uploads/monthly_2017_12/5a49485fa77dd_logobig.png.0c19c7fc9cc393df1ad69f5ec30877c1.png"><br><br> <div class="form-group"> <input class="form-control" type="text" name="fname" placeholder="First Name"/> </div> <div class="form-group"> <input class="form-control" type="text" name="lname" placeholder="Last Name"/> </div> <div class="form-group"> <input class="form-control" type="text" id="exampleID" name="email" placeholder="Email Address"/> </div> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> <script> $("#exampleID").prop("disabled",true); </script> </body> </html> Notice at the bottom of the code <script> $("#exampleID").prop("disabled",true); </script> This sets the property of "disabled" on the input field that has the ID "exampleID". You can check out the demo here. View the Prodjex Web Development blog post on how to Disable Input Field on Page Load Using jQuery.
  3. I have the following. Depending on which dot in the nav I click on I want it to show as selected. I tried writing my own jQuery to show/hide the different images I'm running into some issues with multiples showing up at the same time. I'm guessing there is a better method. <div class="dot-nav"> <a href="#" class="scroll-link" data-id="home" id="home-btn"> <img src="images/nav-s.png" id="btn-home-s" style="margin-bottom:10px;"/> <img src="images/nav-ns.png" id="btn-home-ns" style="margin-bottom:10px;display:none;"/> </a><br> <a href="#" class="scroll-link" data-id="about" id="about-btn"> <img src="images/nav-ns.png" id="btn-about-ns" style="margin-bottom:10px;"/> <img src="images/nav-s.png" id="btn-about-s" style="margin-bottom:10px;display:none;"/> </a><br> <a href="#" class="scroll-link" data-id="power" id="power-btn"> <img src="images/nav-ns.png" id="btn-power-ns" style="margin-bottom:10px;"/> <img src="images/nav-s.png" id="btn-power-s" style="margin-bottom:10px;display:none;"/> </a><br> </div> $( "#home-btn" ).click(function() { $( "#btn-home-ns" ).hide(0); $( "#btn-about-s" ).hide(0); $( "#btn-power-s" ).hide(0); $( "#btn-home-s" ).show(0); $( "#btn-about-ns" ).show(0); $( "#btn-power-ns" ).show(0); }); $( "#about-btn" ).click(function() { $( "#btn-home-s" ).hide(0); $( "#btn-about-ns" ).hide(0); $( "#btn-power-s" ).hide(0); $( "#btn-home-ns" ).show(0); $( "#btn-about-s" ).show(0); $( "#btn-power-ns" ).show(0); }); $( "#power-btn" ).click(function() { $( "#btn-home-s" ).hide(0); $( "#btn-about-s" ).hide(0) $( "#btn-power-ns" ).hide(0); $( "#btn-home-ns" ).show(0);; $( "#btn-about-ns" ).show(0); $( "#btn-power-s" ).show(0); }); http://jsfiddle.net/2ov8tw68/1/
  4. I have a staic navigation bar. Right now "Home" is active. How can I adjust it so when I click "About" or "Team etc...then those nav options would become active? I know how to do it by checking the URL with PHP, but since these are not actual URL's but just jumping down to a div I'm not sure how to do it or best practice.
  5. I'm using the following bootstrap method for tabs. <!-- Nav tabs --> <ul class="nav nav-tabs" role="tablist"> <li class="active"><a href="#home" role="tab" data-toggle="tab">Home</a></li> <li><a href="#profile" role="tab" data-toggle="tab">Profile</a></li> <li><a href="#messages" role="tab" data-toggle="tab">Messages</a></li> <li><a href="#settings" role="tab" data-toggle="tab">Settings</a></li> </ul> <!-- Tab panes --> <div class="tab-content"> <div class="tab-pane active" id="home">...</div> <div class="tab-pane" id="profile">...</div> <div class="tab-pane" id="messages">...</div> <div class="tab-pane" id="settings">...</div> </div> My question is how can I link to a tab so when you go to that link the page opens in that tab? http://domain.com/index.php#profile for example does not open into the profile tab.
  6. I have a form that is a list of checkboxes. I need the value to change to a 1 if the box is checked and 0 if it is not checked. Here is my current form. If there is a better way to this I'm open to changing it. <h4 class="text-center">Here you can choose how you would like to be notified about showing activities.</h4> <form role="form" method="post" action="submit.php" style="margin-left:50px;"> <h3>Email</h3> <div class="checkbox"> <label> <input type="checkbox" value="<?php echo $notprefs['email_my_showings'];?>" name="email_my_showings" <?php if($notprefs['email_my_showings'] == 1) {echo 'checked';}?>> Email confirmations of showings I schedule. </label> </div> <div class="checkbox"> <label> <input type="checkbox" value="<?php echo $notprefs['email_other_showings'];?>" name="email_other_showings" <?php if($notprefs['email_other_showings'] == 1) {echo 'checked';}?>> Email me when someone schedules a showing on one of my listings </label> </div> <div class="checkbox"> <label> <input type="checkbox" value="<?php echo $notprefs['email_leave_feedback'];?>" name="email_leave_feedback" <?php if($notprefs['email_leave_feedback'] == 1) {echo 'checked';}?>> Email reminders to leave feedback. </label> </div> <div class="checkbox"> <label> <input type="checkbox" value="<?php echo $notprefs['email_received_feedback'];?>" name="email_received_feedback" <?php if($notprefs['email_received_feedback'] == 1) {echo 'checked';}?>> Email reminders for received feedback. </label> </div> <h3>Text Message</h3> <h6>Coming Soon</h6> <input type="hidden" name="submittype" value="7"/> <input type="hidden" name="userid" value="<?php echo $userid;?>"/> <button type="submit" class="btn btn-default">Submit</button> </form>
  7. I have a YouTube video on my website that before played shows the preview image that's very pixelated. I want to put a high resolution image on my website that on click will then play the youtube video, is there a way to do this?
  8. Looking for a little help with my first AJAX call I've tried. It keeps telling me the function "mark complete" is not defined but I see it as though it is. My jQuery at top of page: <!--Task jQuery/Ajax Call--> <script> $(document).ready(function markcomplete(taskid,projectid) { $.ajax({ url : 'scripts/submit.php?taskid='+taskid+'&projectid'+projectid+'submittype=7', // give complete url here type : 'post'; }); }); </script> My html/php: echo '<li class="open"> <img onClick="markcomplete('.$projectid.','.$tasks['id'].')" src="images/ico-redx.png" style="margin-left:8px;margin-right:20px;"/>'. $tasks['task_name'].' </li>';
  9. I have the following jquery/ajax: <!--Task jQuery/Ajax Call--> <script> function markcomplete(taskid,projectid) { $.ajax({ url : 'submit.php', // give complete url here type : 'post', data : { taskid : taskid, projectid : projectid, submittype : 7}, success: function (data) { // returns from server on success console.log(data); $('#task'+taskid).addClass('closed').removeClass('open'); }, failure: function (error) { // returns here on error console.log(data); } }); } function marknotcomplete(taskid,projectid) { $.ajax({ url : 'submit.php', // give complete url here type : 'post', data : { taskid : taskid, projectid : projectid, submittype : 8}, success: function (data) { // returns from server on success console.log(data); $('#task'+taskid).addClass('open').removeClass('closed'); }, failure: function (error) { // returns here on error console.log(data); } }); } </script> It works with the php/html: <li id="task'.$tasks['id'].'" class="open" onClick="markcomplete('.$tasks['id'].','.$projectid.')"> <span style="margin-left:40px;"/>'. $tasks['task_name'].'</span> </li> and <li id="task'.$tasks['id'].'" class="closed" onClick="marknotcomplete('.$tasks['id'].','.$projectid.')"> <span style="margin-left:40px;"/>'. $tasks['task_name'].'</span> </li> How on success of the ajax can I just change the onClick event function from marknotcomplete to markcomplete and vise versa?
  10. So I'm extremely new to jquery/javascript. I know other languages, but for some reason I just cannot seem to wrap my head around javascript. It's finally starting to get easier so I used it a bunch on one of my new pages. Turns out the hidden divs I was hiding would show for a split second during the page load. When you have a bunch on one page this looks bad. Figured out I needed them hidden by default, not after the page loaded. My fix was to use css to not display the div until clicked. To do this add the following css to the div: display: none;
  11. I have a form for a shipping address and a separate one for Billing address. If the user clicks "Ship to Billing Address" then I want it to take the filled out shipping address and populate the boxes in Billing address. Here is my shipping address form: <div class="col-1"> <h3>Billing Address</h3> <p class="form-row form-row-wide address-field update_totals_on_change validate-required" id="billing_country_field"> <label for="billing_country" class="">Country <abbr class="required" title="required">*</abbr></label> <select name="billing_country" id="billing_country" class="country_to_state country_select"> <option value="">Select a country…</option><option value="AX">Åland Islands</option><option value="AF">Afghanistan</option><option value="AL">Albania</option><option value="DZ">Algeria</option><option value="AD">Andorra</option><option value="AO">Angola</option><option value="AI">Anguilla</option><option value="AQ">Antarctica</option><option value="AG">Antigua and Barbuda</option><option value="AR">Argentina</option><option value="AM">Armenia</option><option value="AW">Aruba</option><option value="AU">Australia</option><option value="AT">Austria</option><option value="AZ">Azerbaijan</option><option value="BS">Bahamas</option><option value="BH">Bahrain</option><option value="BD">Bangladesh</option><option value="BB">Barbados</option><option value="BY">Belarus</option><option value="PW">Belau</option><option value="BE">Belgium</option><option value="BZ">Belize</option><option value="BJ">Benin</option><option value="BM">Bermuda</option><option value="BT">Bhutan</option><option value="BO">Bolivia</option><option value="BQ">Bonaire, Saint Eustatius and Saba</option><option value="BA">Bosnia and Herzegovina</option><option value="BW">Botswana</option><option value="BV">Bouvet Island</option><option value="BR">Brazil</option><option value="IO">British Indian Ocean Territory</option><option value="VG">British Virgin Islands</option><option value="BN">Brunei</option><option value="BG">Bulgaria</option><option value="BF">Burkina Faso</option><option value="BI">Burundi</option><option value="KH">Cambodia</option><option value="CM">Cameroon</option><option value="CA">Canada</option><option value="CV">Cape Verde</option><option value="KY">Cayman Islands</option><option value="CF">Central African Republic</option><option value="TD">Chad</option><option value="CL">Chile</option><option value="CN">China</option><option value="CX">Christmas Island</option><option value="CC">Cocos (Keeling) Islands</option><option value="CO">Colombia</option><option value="KM">Comoros</option><option value="CG">Congo (Brazzaville)</option><option value="CD">Congo (Kinshasa)</option><option value="CK">Cook Islands</option><option value="CR">Costa Rica</option><option value="HR">Croatia</option><option value="CU">Cuba</option><option value="CW">CuraÇao</option><option value="CY">Cyprus</option><option value="CZ">Czech Republic</option><option value="DK">Denmark</option><option value="DJ">Djibouti</option><option value="DM">Dominica</option><option value="DO">Dominican Republic</option><option value="EC">Ecuador</option><option value="EG">Egypt</option><option value="SV">El Salvador</option><option value="GQ">Equatorial Guinea</option><option value="ER">Eritrea</option><option value="EE">Estonia</option><option value="ET">Ethiopia</option><option value="FK">Falkland Islands</option><option value="FO">Faroe Islands</option><option value="FJ">Fiji</option><option value="FI">Finland</option><option value="FR">France</option><option value="GF">French Guiana</option><option value="PF">French Polynesia</option><option value="TF">French Southern Territories</option><option value="GA">Gabon</option><option value="GM">Gambia</option><option value="GE">Georgia</option><option value="DE">Germany</option><option value="GH">Ghana</option><option value="GI">Gibraltar</option><option value="GR">Greece</option><option value="GL">Greenland</option><option value="GD">Grenada</option><option value="GP">Guadeloupe</option><option value="GT">Guatemala</option><option value="GG">Guernsey</option><option value="GN">Guinea</option><option value="GW">Guinea-Bissau</option><option value="GY">Guyana</option><option value="HT">Haiti</option><option value="HM">Heard Island and McDonald Islands</option><option value="HN">Honduras</option><option value="HK">Hong Kong</option><option value="HU">Hungary</option><option value="IS">Iceland</option><option value="IN">India</option><option value="ID">Indonesia</option><option value="IR">Iran</option><option value="IQ">Iraq</option><option value="IM">Isle of Man</option><option value="IL">Israel</option><option value="IT">Italy</option><option value="CI">Ivory Coast</option><option value="JM">Jamaica</option><option value="JP">Japan</option><option value="JE">Jersey</option><option value="JO">Jordan</option><option value="KZ">Kazakhstan</option><option value="KE">Kenya</option><option value="KI">Kiribati</option><option value="KW">Kuwait</option><option value="KG">Kyrgyzstan</option><option value="LA">Laos</option><option value="LV">Latvia</option><option value="LB">Lebanon</option><option value="LS">Lesotho</option><option value="LR">Liberia</option><option value="LY">Libya</option><option value="LI">Liechtenstein</option><option value="LT">Lithuania</option><option value="LU">Luxembourg</option><option value="MO">Macao S.A.R., China</option><option value="MK">Macedonia</option><option value="MG">Madagascar</option><option value="MW">Malawi</option><option value="MY">Malaysia</option><option value="MV">Maldives</option><option value="ML">Mali</option><option value="MT">Malta</option><option value="MH">Marshall Islands</option><option value="MQ">Martinique</option><option value="MR">Mauritania</option><option value="MU">Mauritius</option><option value="YT">Mayotte</option><option value="MX">Mexico</option><option value="FM">Micronesia</option><option value="MD">Moldova</option><option value="MC">Monaco</option><option value="MN">Mongolia</option><option value="ME">Montenegro</option><option value="MS">Montserrat</option><option value="MA">Morocco</option><option value="MZ">Mozambique</option><option value="MM">Myanmar</option><option value="NA">Namibia</option><option value="NR">Nauru</option><option value="NP">Nepal</option><option value="NL">Netherlands</option><option value="AN">Netherlands Antilles</option><option value="NC">New Caledonia</option><option value="NZ">New Zealand</option><option value="NI">Nicaragua</option><option value="NE">Niger</option><option value="NG">Nigeria</option><option value="NU">Niue</option><option value="NF">Norfolk Island</option><option value="KP">North Korea</option><option value="NO">Norway</option><option value="OM">Oman</option><option value="PK">Pakistan</option><option value="PS">Palestinian Territory</option><option value="PA">Panama</option><option value="PG">Papua New Guinea</option><option value="PY">Paraguay</option><option value="PE">Peru</option><option value="PH">Philippines</option><option value="PN">Pitcairn</option><option value="PL">Poland</option><option value="PT">Portugal</option><option value="QA">Qatar</option><option value="IE">Republic of Ireland</option><option value="RE">Reunion</option><option value="RO">Romania</option><option value="RU">Russia</option><option value="RW">Rwanda</option><option value="ST">São Tomé and Príncipe</option><option value="BL">Saint Barthélemy</option><option value="SH">Saint Helena</option><option value="KN">Saint Kitts and Nevis</option><option value="LC">Saint Lucia</option><option value="SX">Saint Martin (Dutch part)</option><option value="MF">Saint Martin (French part)</option><option value="PM">Saint Pierre and Miquelon</option><option value="VC">Saint Vincent and the Grenadines</option><option value="SM">San Marino</option><option value="SA">Saudi Arabia</option><option value="SN">Senegal</option><option value="RS">Serbia</option><option value="SC">Seychelles</option><option value="SL">Sierra Leone</option><option value="SG">Singapore</option><option value="SK">Slovakia</option><option value="SI">Slovenia</option><option value="SB">Solomon Islands</option><option value="SO">Somalia</option><option value="ZA">South Africa</option><option value="GS">South Georgia/Sandwich Islands</option><option value="KR">South Korea</option><option value="SS">South Sudan</option><option value="ES">Spain</option><option value="LK">Sri Lanka</option><option value="SD">Sudan</option><option value="SR">Suriname</option><option value="SJ">Svalbard and Jan Mayen</option><option value="SZ">Swaziland</option><option value="SE">Sweden</option><option value="CH">Switzerland</option><option value="SY">Syria</option><option value="TW">Taiwan</option><option value="TJ">Tajikistan</option><option value="TZ">Tanzania</option><option value="TH">Thailand</option><option value="TL">Timor-Leste</option><option value="TG">Togo</option><option value="TK">Tokelau</option><option value="TO">Tonga</option><option value="TT">Trinidad and Tobago</option><option value="TN">Tunisia</option><option value="TR">Turkey</option><option value="TM">Turkmenistan</option><option value="TC">Turks and Caicos Islands</option><option value="TV">Tuvalu</option><option value="UG">Uganda</option><option value="UA">Ukraine</option><option value="AE">United Arab Emirates</option><option value="GB">United Kingdom</option><option value="US" selected="selected">United States</option><option value="UY">Uruguay</option><option value="UZ">Uzbekistan</option><option value="VU">Vanuatu</option><option value="VA">Vatican</option><option value="VE">Venezuela</option><option value="VN">Vietnam</option><option value="WF">Wallis and Futuna</option><option value="EH">Western Sahara</option><option value="WS">Western Samoa</option><option value="YE">Yemen</option><option value="ZM">Zambia</option><option value="ZW">Zimbabwe</option></select><noscript><input type="submit" name="woocommerce_checkout_update_totals" value="Update country" /></noscript></p> <p class="form-row form-row-first validate-required" id="billing_first_name_field"><label for="billing_first_name" class="">First Name <abbr class="required" title="required">*</abbr></label><input type="text" class="input-text" name="billing_first_name" id="billing_first_name" placeholder="" value=""> </p> <p class="form-row form-row-last validate-required" id="billing_last_name_field"><label for="billing_last_name" class="">Last Name <abbr class="required" title="required">*</abbr></label><input type="text" class="input-text" name="billing_last_name" id="billing_last_name" placeholder="" value=""> </p><div class="clear"></div> <p class="form-row form-row-wide" id="billing_company_field"><label for="billing_company" class="">Company Name</label><input type="text" class="input-text" name="billing_company" id="billing_company" placeholder="" value=""> </p> <p class="form-row form-row-wide address-field validate-required" id="billing_address_1_field"><label for="billing_address_1" class="">Address <abbr class="required" title="required">*</abbr></label><input type="text" class="input-text" name="billing_address_1" id="billing_address_1" placeholder="Street address" value="" autocomplete="no"> </p> <p class="form-row form-row-wide address-field" id="billing_address_2_field"><input type="text" class="input-text" name="billing_address_2" id="billing_address_2" placeholder="Apartment, suite, unit etc. (optional)" value="" autocomplete="no"> </p> <p class="form-row form-row-wide address-field validate-required" id="billing_city_field"><label for="billing_city" class="">Town / City <abbr class="required" title="required">*</abbr></label><input type="text" class="input-text" name="billing_city" id="billing_city" placeholder="Town / City" value="" autocomplete="no"> </p> <p class="form-row form-row-first address-field validate-required" id="billing_state_field"><label for="billing_state" class="">State <abbr class="required" title="required">*</abbr></label><select name="billing_state" id="billing_state" class="state_select" autocomplete="no" placeholder="State / County"> <option value="">Select a state…</option><option value="AL">Alabama</option><option value="AK">Alaska</option><option value="AZ">Arizona</option><option value="AR">Arkansas</option><option value="CA">California</option><option value="CO">Colorado</option><option value="CT">Connecticut</option><option value="DE">Delaware</option><option value="DC">District Of Columbia</option><option value="FL">Florida</option><option value="GA">Georgia</option><option value="HI">Hawaii</option><option value="ID">Idaho</option><option value="IL">Illinois</option><option value="IN">Indiana</option><option value="IA">Iowa</option><option value="KS">Kansas</option><option value="KY">Kentucky</option><option value="LA">Louisiana</option><option value="ME">Maine</option><option value="MD">Maryland</option><option value="MA">Massachusetts</option><option value="MI">Michigan</option><option value="MN">Minnesota</option><option value="MS">Mississippi</option><option value="MO">Missouri</option><option value="MT">Montana</option><option value="NE">Nebraska</option><option value="NV">Nevada</option><option value="NH">New Hampshire</option><option value="NJ">New Jersey</option><option value="NM">New Mexico</option><option value="NY">New York</option><option value="NC">North Carolina</option><option value="ND">North Dakota</option><option value="OH">Ohio</option><option value="OK">Oklahoma</option><option value="OR">Oregon</option><option value="PA">Pennsylvania</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option><option value="SD">South Dakota</option><option value="TN">Tennessee</option><option value="TX">Texas</option><option value="UT">Utah</option><option value="VT">Vermont</option><option value="VA">Virginia</option><option value="WA">Washington</option><option value="WV">West Virginia</option><option value="WI">Wisconsin</option><option value="WY">Wyoming</option><option value="AA">Armed Forces (AA)</option><option value="AE">Armed Forces (AE)</option><option value="AP">Armed Forces (AP)</option><option value="AS">American Samoa</option><option value="GU">Guam</option><option value="MP">Northern Mariana Islands</option><option value="PR">Puerto Rico</option><option value="UM">US Minor Outlying Islands</option><option value="VI">US Virgin Islands</option></select></p> <p class="form-row form-row-last address-field validate-required" id="billing_postcode_field"><label for="billing_postcode" class="">Zip <abbr class="required" title="required">*</abbr></label><input type="text" class="input-text" name="billing_postcode" id="billing_postcode" placeholder="Postcode / Zip" value="12345" autocomplete="no"> </p><div class="clear"></div> <p class="form-row form-row-first validate-required validate-email" id="billing_email_field"><label for="billing_email" class="">Email Address <abbr class="required" title="required">*</abbr></label><input type="text" class="input-text" name="billing_email" id="billing_email" placeholder="" value=""> </p> <p class="form-row form-row-last validate-required" id="billing_phone_field"><label for="billing_phone" class="">Phone <abbr class="required" title="required">*</abbr></label><input type="text" class="input-text" name="billing_phone" id="billing_phone" placeholder="" value=""> </p><div class="clear"></div> <p class="form-row form-row-wide"> <input class="input-checkbox" id="createaccount" type="checkbox" name="createaccount" value="1"> <label for="createaccount" class="checkbox">Create an account?</label> </p> <div class="create-account"> <p>Create an account by entering the information below. If you are a returning customer please login at the top of the page.</p> <p class="form-row " id="account_username_field"><label for="account_username" class="">Account username</label><input type="text" class="input-text" name="account_username" id="account_username" placeholder="Username" value=""> </p> <p class="form-row form-row-first" id="account_password_field"><label for="account_password" class="">Account password</label><input type="password" class="input-text" name="account_password" id="account_password" placeholder="Password" value=""> </p> <p class="form-row form-row-last" id="account_password-2_field"><label for="account_password-2" class="hidden">Confirm password</label><input type="password" class="input-text" name="account_password-2" id="account_password-2" placeholder="Confirm password" value=""> </p> <div class="clear"></div> </div> </div> Here is the checkbox and bill to form: <div class="col-2"> <p class="form-row" id="shiptobilling"> <input id="shiptobilling-checkbox" class="input-checkbox" type="checkbox" name="shiptobilling" value="1"> <label for="shiptobilling-checkbox" class="checkbox">Ship to billing address?</label> </p> <h3>Shipping Address</h3> <div class="shipping_address"> <p class="form-row form-row-wide address-field update_totals_on_change validate-required" id="shipping_country_field"> <label for="shipping_country" class="">Country <abbr class="required" title="required">*</abbr></label> <select name="shipping_country" id="shipping_country" class="country_to_state country_select"> <option value="">Select a country…</option><option value="AX">Åland Islands</option><option value="AF">Afghanistan</option><option value="AL">Albania</option><option value="DZ">Algeria</option><option value="AD">Andorra</option><option value="AO">Angola</option><option value="AI">Anguilla</option><option value="AQ">Antarctica</option><option value="AG">Antigua and Barbuda</option><option value="AR">Argentina</option><option value="AM">Armenia</option><option value="AW">Aruba</option><option value="AU">Australia</option><option value="AT">Austria</option><option value="AZ">Azerbaijan</option><option value="BS">Bahamas</option><option value="BH">Bahrain</option><option value="BD">Bangladesh</option><option value="BB">Barbados</option><option value="BY">Belarus</option><option value="PW">Belau</option><option value="BE">Belgium</option><option value="BZ">Belize</option><option value="BJ">Benin</option><option value="BM">Bermuda</option><option value="BT">Bhutan</option><option value="BO">Bolivia</option><option value="BQ">Bonaire, Saint Eustatius and Saba</option><option value="BA">Bosnia and Herzegovina</option><option value="BW">Botswana</option><option value="BV">Bouvet Island</option><option value="BR">Brazil</option><option value="IO">British Indian Ocean Territory</option><option value="VG">British Virgin Islands</option><option value="BN">Brunei</option><option value="BG">Bulgaria</option><option value="BF">Burkina Faso</option><option value="BI">Burundi</option><option value="KH">Cambodia</option><option value="CM">Cameroon</option><option value="CA">Canada</option><option value="CV">Cape Verde</option><option value="KY">Cayman Islands</option><option value="CF">Central African Republic</option><option value="TD">Chad</option><option value="CL">Chile</option><option value="CN">China</option><option value="CX">Christmas Island</option><option value="CC">Cocos (Keeling) Islands</option><option value="CO">Colombia</option><option value="KM">Comoros</option><option value="CG">Congo (Brazzaville)</option><option value="CD">Congo (Kinshasa)</option><option value="CK">Cook Islands</option><option value="CR">Costa Rica</option><option value="HR">Croatia</option><option value="CU">Cuba</option><option value="CW">CuraÇao</option><option value="CY">Cyprus</option><option value="CZ">Czech Republic</option><option value="DK">Denmark</option><option value="DJ">Djibouti</option><option value="DM">Dominica</option><option value="DO">Dominican Republic</option><option value="EC">Ecuador</option><option value="EG">Egypt</option><option value="SV">El Salvador</option><option value="GQ">Equatorial Guinea</option><option value="ER">Eritrea</option><option value="EE">Estonia</option><option value="ET">Ethiopia</option><option value="FK">Falkland Islands</option><option value="FO">Faroe Islands</option><option value="FJ">Fiji</option><option value="FI">Finland</option><option value="FR">France</option><option value="GF">French Guiana</option><option value="PF">French Polynesia</option><option value="TF">French Southern Territories</option><option value="GA">Gabon</option><option value="GM">Gambia</option><option value="GE">Georgia</option><option value="DE">Germany</option><option value="GH">Ghana</option><option value="GI">Gibraltar</option><option value="GR">Greece</option><option value="GL">Greenland</option><option value="GD">Grenada</option><option value="GP">Guadeloupe</option><option value="GT">Guatemala</option><option value="GG">Guernsey</option><option value="GN">Guinea</option><option value="GW">Guinea-Bissau</option><option value="GY">Guyana</option><option value="HT">Haiti</option><option value="HM">Heard Island and McDonald Islands</option><option value="HN">Honduras</option><option value="HK">Hong Kong</option><option value="HU">Hungary</option><option value="IS">Iceland</option><option value="IN">India</option><option value="ID">Indonesia</option><option value="IR">Iran</option><option value="IQ">Iraq</option><option value="IM">Isle of Man</option><option value="IL">Israel</option><option value="IT">Italy</option><option value="CI">Ivory Coast</option><option value="JM">Jamaica</option><option value="JP">Japan</option><option value="JE">Jersey</option><option value="JO">Jordan</option><option value="KZ">Kazakhstan</option><option value="KE">Kenya</option><option value="KI">Kiribati</option><option value="KW">Kuwait</option><option value="KG">Kyrgyzstan</option><option value="LA">Laos</option><option value="LV">Latvia</option><option value="LB">Lebanon</option><option value="LS">Lesotho</option><option value="LR">Liberia</option><option value="LY">Libya</option><option value="LI">Liechtenstein</option><option value="LT">Lithuania</option><option value="LU">Luxembourg</option><option value="MO">Macao S.A.R., China</option><option value="MK">Macedonia</option><option value="MG">Madagascar</option><option value="MW">Malawi</option><option value="MY">Malaysia</option><option value="MV">Maldives</option><option value="ML">Mali</option><option value="MT">Malta</option><option value="MH">Marshall Islands</option><option value="MQ">Martinique</option><option value="MR">Mauritania</option><option value="MU">Mauritius</option><option value="YT">Mayotte</option><option value="MX">Mexico</option><option value="FM">Micronesia</option><option value="MD">Moldova</option><option value="MC">Monaco</option><option value="MN">Mongolia</option><option value="ME">Montenegro</option><option value="MS">Montserrat</option><option value="MA">Morocco</option><option value="MZ">Mozambique</option><option value="MM">Myanmar</option><option value="NA">Namibia</option><option value="NR">Nauru</option><option value="NP">Nepal</option><option value="NL">Netherlands</option><option value="AN">Netherlands Antilles</option><option value="NC">New Caledonia</option><option value="NZ">New Zealand</option><option value="NI">Nicaragua</option><option value="NE">Niger</option><option value="NG">Nigeria</option><option value="NU">Niue</option><option value="NF">Norfolk Island</option><option value="KP">North Korea</option><option value="NO">Norway</option><option value="OM">Oman</option><option value="PK">Pakistan</option><option value="PS">Palestinian Territory</option><option value="PA">Panama</option><option value="PG">Papua New Guinea</option><option value="PY">Paraguay</option><option value="PE">Peru</option><option value="PH">Philippines</option><option value="PN">Pitcairn</option><option value="PL">Poland</option><option value="PT">Portugal</option><option value="QA">Qatar</option><option value="IE">Republic of Ireland</option><option value="RE">Reunion</option><option value="RO">Romania</option><option value="RU">Russia</option><option value="RW">Rwanda</option><option value="ST">São Tomé and Príncipe</option><option value="BL">Saint Barthélemy</option><option value="SH">Saint Helena</option><option value="KN">Saint Kitts and Nevis</option><option value="LC">Saint Lucia</option><option value="SX">Saint Martin (Dutch part)</option><option value="MF">Saint Martin (French part)</option><option value="PM">Saint Pierre and Miquelon</option><option value="VC">Saint Vincent and the Grenadines</option><option value="SM">San Marino</option><option value="SA">Saudi Arabia</option><option value="SN">Senegal</option><option value="RS">Serbia</option><option value="SC">Seychelles</option><option value="SL">Sierra Leone</option><option value="SG">Singapore</option><option value="SK">Slovakia</option><option value="SI">Slovenia</option><option value="SB">Solomon Islands</option><option value="SO">Somalia</option><option value="ZA">South Africa</option><option value="GS">South Georgia/Sandwich Islands</option><option value="KR">South Korea</option><option value="SS">South Sudan</option><option value="ES">Spain</option><option value="LK">Sri Lanka</option><option value="SD">Sudan</option><option value="SR">Suriname</option><option value="SJ">Svalbard and Jan Mayen</option><option value="SZ">Swaziland</option><option value="SE">Sweden</option><option value="CH">Switzerland</option><option value="SY">Syria</option><option value="TW">Taiwan</option><option value="TJ">Tajikistan</option><option value="TZ">Tanzania</option><option value="TH">Thailand</option><option value="TL">Timor-Leste</option><option value="TG">Togo</option><option value="TK">Tokelau</option><option value="TO">Tonga</option><option value="TT">Trinidad and Tobago</option><option value="TN">Tunisia</option><option value="TR">Turkey</option><option value="TM">Turkmenistan</option><option value="TC">Turks and Caicos Islands</option><option value="TV">Tuvalu</option><option value="UG">Uganda</option><option value="UA">Ukraine</option><option value="AE">United Arab Emirates</option><option value="GB">United Kingdom</option><option value="US" selected="selected">United States</option><option value="UY">Uruguay</option><option value="UZ">Uzbekistan</option><option value="VU">Vanuatu</option><option value="VA">Vatican</option><option value="VE">Venezuela</option><option value="VN">Vietnam</option><option value="WF">Wallis and Futuna</option><option value="EH">Western Sahara</option><option value="WS">Western Samoa</option><option value="YE">Yemen</option><option value="ZM">Zambia</option><option value="ZW">Zimbabwe</option></select><noscript><input type="submit" name="woocommerce_checkout_update_totals" value="Update country" /></noscript></p> <p class="form-row form-row-first validate-required" id="shipping_first_name_field"><label for="shipping_first_name" class="">First Name <abbr class="required" title="required">*</abbr></label><input type="text" class="input-text" name="shipping_first_name" id="shipping_first_name" placeholder="" value=""> </p> <p class="form-row form-row-last validate-required" id="shipping_last_name_field"><label for="shipping_last_name" class="">Last Name <abbr class="required" title="required">*</abbr></label><input type="text" class="input-text" name="shipping_last_name" id="shipping_last_name" placeholder="" value=""> </p><div class="clear"></div> <p class="form-row form-row-wide" id="shipping_company_field"><label for="shipping_company" class="">Company Name</label><input type="text" class="input-text" name="shipping_company" id="shipping_company" placeholder="" value=""> </p> <p class="form-row form-row-wide address-field validate-required" id="shipping_address_1_field"><label for="shipping_address_1" class="">Address <abbr class="required" title="required">*</abbr></label><input type="text" class="input-text" name="shipping_address_1" id="shipping_address_1" placeholder="Street address" value="" autocomplete="no"> </p> <p class="form-row form-row-wide address-field" id="shipping_address_2_field"><input type="text" class="input-text" name="shipping_address_2" id="shipping_address_2" placeholder="Apartment, suite, unit etc. (optional)" value="" autocomplete="no"> </p> <p class="form-row form-row-wide address-field validate-required" id="shipping_city_field"><label for="shipping_city" class="">Town / City <abbr class="required" title="required">*</abbr></label><input type="text" class="input-text" name="shipping_city" id="shipping_city" placeholder="Town / City" value="" autocomplete="no"> </p> <p class="form-row form-row-first address-field validate-required" id="shipping_state_field"><label for="shipping_state" class="">State <abbr class="required" title="required">*</abbr></label><select name="shipping_state" id="shipping_state" class="state_select" autocomplete="no" placeholder="State / County"> <option value="">Select a state…</option><option value="AL">Alabama</option><option value="AK">Alaska</option><option value="AZ">Arizona</option><option value="AR">Arkansas</option><option value="CA">California</option><option value="CO">Colorado</option><option value="CT">Connecticut</option><option value="DE">Delaware</option><option value="DC">District Of Columbia</option><option value="FL">Florida</option><option value="GA">Georgia</option><option value="HI">Hawaii</option><option value="ID">Idaho</option><option value="IL">Illinois</option><option value="IN">Indiana</option><option value="IA">Iowa</option><option value="KS">Kansas</option><option value="KY">Kentucky</option><option value="LA">Louisiana</option><option value="ME">Maine</option><option value="MD">Maryland</option><option value="MA">Massachusetts</option><option value="MI">Michigan</option><option value="MN">Minnesota</option><option value="MS">Mississippi</option><option value="MO">Missouri</option><option value="MT">Montana</option><option value="NE">Nebraska</option><option value="NV">Nevada</option><option value="NH">New Hampshire</option><option value="NJ">New Jersey</option><option value="NM">New Mexico</option><option value="NY">New York</option><option value="NC">North Carolina</option><option value="ND">North Dakota</option><option value="OH">Ohio</option><option value="OK">Oklahoma</option><option value="OR">Oregon</option><option value="PA">Pennsylvania</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option><option value="SD">South Dakota</option><option value="TN">Tennessee</option><option value="TX">Texas</option><option value="UT">Utah</option><option value="VT">Vermont</option><option value="VA">Virginia</option><option value="WA">Washington</option><option value="WV">West Virginia</option><option value="WI">Wisconsin</option><option value="WY">Wyoming</option><option value="AA">Armed Forces (AA)</option><option value="AE">Armed Forces (AE)</option><option value="AP">Armed Forces (AP)</option><option value="AS">American Samoa</option><option value="GU">Guam</option><option value="MP">Northern Mariana Islands</option><option value="PR">Puerto Rico</option><option value="UM">US Minor Outlying Islands</option><option value="VI">US Virgin Islands</option></select></p> <p class="form-row form-row-last address-field validate-required" id="shipping_postcode_field"><label for="shipping_postcode" class="">Zip <abbr class="required" title="required">*</abbr></label><input type="text" class="input-text" name="shipping_postcode" id="shipping_postcode" placeholder="Postcode / Zip" value="12345" autocomplete="no"> </p><div class="clear"></div> </div> <p class="form-row notes" id="order_comments_field"><label for="order_comments" class="">Order Notes</label><textarea name="order_comments" class="input-text" id="order_comments" placeholder="Notes about your order, e.g. special notes for delivery." cols="5" rows="2"></textarea> </p> </div>
  12. I'm trying to check a rule that if false an alert box pops up on submit and gives a message. The user can then only select ok and fix the issue and the submit does not happen. The condition that needs to be met is if $totalqty > $qty then pop up the alert box with message they need to fix before they can submit. I've tried this: if($totalqty > $qty) { echo '<form method="post" action="#" onsubmit="return confirm('You\'ve selected too many items please remove some before continuing.');">'; } else { echo '<form method="post" action="#">'; } The above allows the user to hit ok or cancel, I don't want them to be able to continue until they fix the issue. So is there a way for the alert box to just have an OK button and it not submit?
  13. I want to print the contents of a div. I'd like to know the best way to be able to click a button called print that will pop up a new window with the contents of a div on the current page to be printed.
  14. I'm not sure what to call what I'm trying to do so hard to run a Google search on it. I have a spot where I want to assign team members to a project. There is an input box where I can type their names. As I start typing their name I would like it to query the users table and show possible results, then I can click their name and they are added, then I can start typing another persons name and add multiple people.
  15. I have a jQuery date picker that passes the date format dd-mm-yyyy to my page that inserts data into the database. My table tructure requires a date format of yyyy-mm-dd. Is there an easy way to change the date format in the jQuery Datepicker?
×
×
  • Create New...