Jump to content

Search the Community

Showing results for tags 'multiple'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

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


Languages

Found 9 results

  1. Hi there, Sorry but my JS-Knowledge is very bad. I tried to implement multiple slideshows wthin one website. I used this tutorial. But I'm not able to create more than two slideshows without bugs. I tried to adjust the JS code but wasn't successful. At least I have to implement 4 slideshows. My Code: <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> * {box-sizing: border-box} body {font-family: Verdana, sans-serif; margin:0} .mySlides1, .mySlides2 {display: none} img {vertical-align: middle;} /* Slideshow container */ .slideshow-container { max-width: 1000px; position: relative; margin: auto; } /* Next & previous buttons */ .prev, .next { cursor: pointer; position: absolute; top: 50%; width: auto; padding: 16px; margin-top: -22px; color: white; font-weight: bold; font-size: 18px; transition: 0.6s ease; border-radius: 0 3px 3px 0; user-select: none; } /* Position the "next button" to the right */ .next { right: 0; border-radius: 3px 0 0 3px; } /* On hover, add a grey background color */ .prev:hover, .next:hover { background-color: #f1f1f1; color: black; } </style> </head> <body> <h2 style="text-align:center">Multiple Slideshows</h2> <div class="slideshow-container"> <div class="mySlides1"> <img src="images/gallery/fulls/06.jpg" style="width:100%"> </div> <div class="mySlides1"> <img src="images/gallery/fulls/05.jpg" style="width:100%"> </div> <div class="mySlides1"> <img src="images/gallery/fulls/03.jpg" style="width:100%"> </div> <a class="prev" onclick="plusSlides(-1, 0)">&#10094;</a> <a class="next" onclick="plusSlides(1, 0)">&#10095;</a> </div> <div class="slideshow-container"> <div class="mySlides2"> <img src="images/gallery/fulls/03.jpg" style="width:100%"> </div> <div class="mySlides2"> <img src="images/gallery/fulls/02.jpg" style="width:100%"> </div> <div class="mySlides2"> <img src="images/gallery/fulls/01.jpg" style="width:100%"> </div> <a class="prev" onclick="plusSlides(-1, 1)">&#10094;</a> <a class="next" onclick="plusSlides(1, 1)">&#10095;</a> </div> <div class="slideshow-container"> <div class="mySlides3"> <img src="images/gallery/fulls/07.jpg" style="width:100%"> </div> <div class="mySlides2"> <img src="images/gallery/fulls/03.jpg" style="width:100%"> </div> <div class="mySlides2"> <img src="images/gallery/fulls/05.jpg" style="width:100%"> </div> <a class="prev" onclick="plusSlides(-1, 2)">&#10094;</a> <a class="next" onclick="plusSlides(1, 2)">&#10095;</a> </div> <script> var slideIndex = [1,1,1]; var slideId = ["mySlides1", "mySlides2", "mySlides3"] showSlides(1, 0); showSlides(1, 1); showSlides(1, 2); function plusSlides(n, no) { showSlides(slideIndex[no] += n, no); } function showSlides(n, no) { var i; var x = document.getElementsByClassName(slideId[no]); if (n > x.length) {slideIndex[no] = 1} if (n < 1) {slideIndex[no] = x.length} for (i = 0; i < x.length; i++) { x[i].style.display = "none"; } x[slideIndex[no]-1].style.display = "block"; } </script> </body> </html> Standard code from https://www.w3schools.com/howto/howto_js_slideshow.asp (only JS): var slideIndex = [1,1]; /* Class the members of each slideshow group with different CSS classes */ var slideId = ["mySlides1", "mySlides2"] showSlides(1, 0); showSlides(1, 1); function plusSlides(n, no) { showSlides(slideIndex[no] += n, no); } function showSlides(n, no) { var i; var x = document.getElementsByClassName(slideId[no]); if (n > x.length) {slideIndex[no] = 1} if (n < 1) {slideIndex[no] = x.length} for (i = 0; i < x.length; i++) { x[i].style.display = "none"; } x[slideIndex[no]-1].style.display = "block"; } Thank you for any help
  2. Hi I want to bring this information to insert multiple records from select <?PHP error_reporting(0); include("connect.inc.php"); ?> <?php include "connect.inc.php"; if (isset($_POST['submit'])) { $province_id = $_POST['province_id'][$i]; $province_id = $_POST['travel_id'][$i]; $i = 0; foreach ( $_POST as $val) { mysql_query("INSERT INTO travel_list (province_id, travel_id) VALUES ('$province_id', '$travel_id')"); $i++; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="css/bootstrap.min.css" rel="stylesheet" media="screen"> <script src="js/bootstrap.min.js"></script> <title>Untitled Document</title> </head> <body> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> <script src="respond.js"></script> <form action="index.php" method="post"> <!--ส่งค่า post ไปหน้าเดิม --> <table width="896" border="1"> <thead> <tr> <th width="239">จังหวัด</th> <th width="552">สถานที่ท่องเที่ยว</th> <th width="83"><input type="hidden" id="txtNum" value="1" size="2" /></th> </tr> <tr> <th width="239"> <select id="selProvince" name="province_id[]"> <!--Default จังหวััด--> <option value="">กรุณาเลือกจังหวัด</option> <?PHP $SelectPr="SELECT * FROM province"; $QueryPro=mysql_query($SelectPr); while($Pro=mysql_fetch_array($QueryPro)){ ?> <option value="<?=$Pro['province_id']?>"><?=$Pro['province_name']?></option> <?PHP } ?> </select> </th> <th width="552"><select name ="travel_id[]" id="selTravel"><option value="">กรุณาเลือกจังหวัด</option></select></th> <th width="83"><button type="button" id="btnP">เพิ่มรายการ</button></th> </tr> <tr><td colspan="3"><center>รายการที่เพิ่ม</center></td></tr> </thead> <tbody> </tbody> </table> <input name="submit" type="submit" value="add"> </form> <br><br><br> <!--ทอสอบ ค่าแสดงผล Muti Atrray--> </body> </html> I'm insert 1 record but I choose just one , but more data is imported into fifth data . Informationprovince_id, travel_id not insert into HELP ME HOT FIX CODE I choose just one , but more data is imported into fifth data .
  3. Hi there I'm looking for a way to strip multiple backslashes. I'm able to strip up to 7 backslashes. This is my code: $url = stripslashes($url); $url = stripslashes($url); $url = stripslashes($url); You read it well, I used it 3 times. I know the backslash is a delimiter so it is necessary to use it 3 times to strip one slash. But my goal is (like with other characters) to strip all. How is PHP handling this?
  4. I have this issue with a function where I want to execute 4 different actions inside an if statement. My code looks like this: function deltagare(){var myTextField1 = document.getElementById('namn');var myTextField2 = document.getElementById('epost'); if(myTextField1.value != "" && myTextField2.value != "")document.getElementById("deltagare-list").value+=myTextField1.value+" "+"("+myTextField2.value+")"+"\n",document.getElementById("deltagare-emaillist").value+=myTextField2.value+",",document.getElementById('namn').value="",document.getElementById('epost').value=""; elsealert("Skriv in både namn och epost!"); } In this way only the first action gets executed. How can I add the other ones properly?
  5. Hi all, I'd need to position two background-images in one element seperately.Is this possible in css3? E.g: I've got a div and two background images. Now I'd need to position them seperately. One images in the left, the other one in the right corner. Thanks! Raphael
  6. Hello, I am pretty new to JavaScript, but I am working on a project. Currently I have to find a way to determ if a postalcode is an correct postal code. (A dutch postal code) For that I will have to confirm if two correct letters are entered in the form.I think my explanation is really unclear, so I will try to make it more clear for everyone. The postal codes in The Netherlands look like this: 1234 AB. In one place, e.g. Amsterdam, they use the letters "AA, AB, AC, AD, AG, AH, AJ" etc. The script has to look for one of those letters with the correct combination (AA, AB, AC, AD, etc). If I enter a different combination (e.g BA), it should give me the alert "This postal code is incorrect". I have absolutely no idea how to do this, and googling didn't do much as I do not know the keywords I have to look for. Here is an example of my current, not working, script: var postalcodes = /(AA|AB|AC||AE||AH|AK|AL|AM|AN|AP|AR|AS|AT|AV|AW|AX|AZ|BA|BB|BC)/g;var a=document.forms["form"]["postcode"].value; if(a.match(postalcodes)) { alert("Correct!"); return false; // Just doing return false to test the code } I also tried "a.Search()", didn't work neither. Do you guys have any idea how I can do this?
  7. good day everyone! i have a question about Managing Hierarchical Data in MySQL of mike hillyer (http://mikehillyer.c...-data-in-mysql/) i already did what he taught in that website and this is the result of the query but i want to do is to show all categories in one column order by categories.. for example:category 1- category 1.1-- category 1.1.1-- category 1.1.2- category 1.2-- category 1.2.1...category 3category 4and so on thanks in advancemore power
  8. I was able to complete a live search with a T-SQL database similar to the design found here on W3Schools, though now I am running into some difficulties passing multiple arguments/parameters to the JavaScript search page. Basically, we thought it would be a good idea to let people search by just a first name or last name if they wanted, as well as searching by their affiliation. Here is an excerpt from the form that appears to be giving me the problems: <form><input type="text" name="name" id="nameID" size="40" maxlength="64" onKeyUp="showNames('nameID', 'typeID', 'firstLastID')"onblur="if (this.value == '') this.value = this.defaultValue" onFocus="if (this.value == this.defaultValue) this.value = ''"value="Enter a name or a part of a name here"> <br><select name="type" id="typeID" onChange="showNames('nameID', 'typeID', 'firstLastID')"><option value="All">Members & Staff</option><option value="Member">Member</option><option value="Staff">Staff</option></select> <br><select name="firstLast" id="firstLastID" onChange="showNames('nameID', 'typeID', 'firstLastID')"><option value="Both">First & Last Name</option><option value="First">First Name</option><option value="Last">Last Name</option></select></form> Right now the form is passing the literal names of nameID, typeID, and firstLastID when I echo the variables in a separate PHP file. I've tried single quotes (which gives the literal names), double quotes (does not work), and no quotation marks (does not work) around the arguments just to see if that was the culprit, but no luck there. Before using the ID's I had been using "this.value", though unfortunately I couldn't use that any longer once we added the additional arguments to showNames(). Finally, I tried removing all of the arguments from showNames() and collecting the data using "document.getElementByID('...').value" (where '...' is the ID) in the JavaScript function, but that didn't work either. Can anyone help me figure this out? Thank you!
  9. Hi. Wonder if anyone can help. I have a page (which hopefully when finished) will allow a administration user to go in and update the availability of products. I have done a query first to pull the records from the SQL database, and have then used a loop to display the records in a table: @{ Layout="~/Shared/accountArea.cshtml"; Page.Title="Update Product Availability | Sarnies For All"; if (WebSecurity.IsAuthenticated == false) { Response.Redirect("~/"); } var db = Database.Open("sarniesForAllCurrent"); var extractBread = "SELECT * FROM bread ORDER BY breadId"; if (IsPost) { var sql = "UPDATE [bread] SET available = @0 WHERE @1 = @2"; foreach(var row in db.Query(extractBread)) { } }} <h1>Update Products</h1><p>Here are all the details which we hold on our system about you. Should any of these details change please update them as necessary and click on the Update button below.</p><form method="post" action=""> <table> <tr> <th>ID</th> <th>Description</th> <th>Available</th> <th>Price</th> </tr> @foreach(var row in db.Query(extractBread)) { <tr> <td>@row.breadId</td> <td>@row.breadDescription</td> <td><input type="text" name="@row.breadId" id="@row.breadId" value="@row.available" /></td> <td align="right">£@row.price</td> </tr> } </table> <input type="submit" value="Update" /></form> I am now at a loss at how to then input any changed values back into the SQL database. I have already used the SQL update record for my "Update Profile" page as that is for one record in my user table - but am unsure of the process/code to use to update multiple records at once using the above loop method. Thanks. Kevin
×
×
  • Create New...