Jump to content

Search the Community

Showing results for tags 'javascript'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








  1. The code provided for 'Javascript Automatic Image Slideshow' code is weak and not optimal. It is bit confusing and does n't reflect the best of W3schools. Please check the link attached here(http://www.w3schools.com/w3css/w3css_slideshow.asp) I suggest an edit. Please compare the current code shown in w3schools(1) and my edited code(2): 1. ------------------------------------------------------------------------------------------------------------------------------------------------------------------ <script> var myIndex = 0; carousel(); function carousel() { var i;
  2. Hello everyone. I am new to this forum. I have build my first parallax website based on Petr Tichy's very good tutorial. I recommend it (https://ihatetomatoes.net). Here is my new site. The idea was to get an attractive intro for this new project using altered-perspective images in full width. http://www.ticket2utopia.com/Alpha/zHome.php I struggle a bit especially that I want to control the ratio of the images in a certain way. They must always be full page but depending on the width of the browser window, I apply a certain correction to the height. As the whole project is about
  3. Hi, I need your help please, I have created a button element in the HTML file, to which assigned the "click" event with a jquery code in a java script file. The problem is that.. when the page is loaded for first time and I open the login form when I press the login button my form close suddenly and it shows "?#" at the end of the URL, I don't know why happens this and I appreciate your help. thanks a lot.
  4. Hello, I'm trying to make a spinner that spins randomly on click (see example below). I've been messing around with this for hours, but I just cannot make this work like I want it to. This is my code, but it is unfinished and buggy: var myArray = ['360', '330', '300', '270', '240', '210', '180', '150', '120', '90', '60', '30']; var Spinner1 = sym.$('Spinner1'); // spinner 1 = wheel.jpg Spinner1.click(function(){ // randomize the degree of spin. var mySpin = myArray[Math.floor(Math.random() * myArray.length)]; sym.getSymbol('Spinner1').play(); Spinner1.css({ '-webkit-
  5. I'm using the W3Schools Slideshow example here: http://www.w3schools.com/howto/howto_js_slideshow.asp I have links on a different page, and I'd like each of those links to open the slideshow page on a specific slide. Is there a simple way to do this without rewriting much of the existing HTML/JavaScript/CSS?
  6. I was wondering if there is a way to detect when a certain image is in a certain area on a page. I'm making a little game where you move a character around (which is an image), and when any part of the character is over a certain 100x200px area, it activates a function. Is this possible with JavaScript? If not, can I do it with another language that works with JavaScript and html? I'd prefer JavaScript. Thanks!
  7. Is it possible to update a prefix URL dynamically using Javascript? Looking to implement it in SharePoint 2013 Webpart.
  8. What is the use of 'window' object? I really didn't understood anything about the window object.
  9. Hello, i'm trying to create file upload box which is activated by both, file drag & drop and onclick. Currently drag & drop works fine for me, but i have no idea how to implement the feature for the click with automatically uploading the image when file area is changed. Heres my code so far <script> $(function() { var dropzone = document.getElementById('upload_area'); var upload = function(files) { var formData = new FormData(), xhr = new XMLHttpRequest(), x; for (x = 0; x < files.length; x++) { formData.append('file[]', files[x]); } xhr.onl
  10. Hi all, I would like to understand how JS/jQuery can interact with PHP to upload a status and a picture from the HTML5 canvas to Twitter. I set up a similar thing for FB and it works. I don't get how to do it for Twitter and I haven't found much about it. Could you explain to me how it works? I currently have this JS/jQuery code as a starting point: var formData = new FormData(), mimetype = canvas.toDataURL().substring(canvas.toDataURL().lastIndexOf(":") + 1, canvas.toDataURL().lastIndexOf(";")), blob = dataURItoBlob(canvas.toDataURL().split(',')[1], mimetype); formData.app
  11. Hi, I don't understand how to pass the value of profileImgX and profileImgY to the spot indicated below: function drawProfileImg() { profileImg = new Image(); profileImg.onload = function() { profileImg.x = canvas.width - distanceFromRightSide - ((profileImg.width - 183) / 2); profileImg.y = canvas.height - distanceFromBottomSide - ((profileImg.height - 242) / 2); profileImgAnimation(); } } function profileImgAnimation() { setInterval(function() { // I would like to pass the value of profileImgX and profileImgY here context.drawImage(profileIm
  12. Hi everyone, I am trying to find source or tutorial how to create the random. I will like to learn how to create the random in poker card, but i need to make sure it must show the display that card is used. For example, I click on back of card to draw card, then show number or royal on card, then click it, moved to left-top or right-top to keep tracking those random poker card...do you have any idea? those card can't be repeated. Thank you so much
  13. Hello & Thanks , A javascript Tutorial for BenghaziGame : I just wanted to let you know that I have written a javascript tutorial for my BenghaziGame , and to thank all you folks on this Forum who have helped me to convert this game to javascript . Benghazi Game is a shoot 'em up political satire browser game . But instead of bullets , we throw cowpies at politicians when we see them lying . How do we know when they are lying ? When their noses turn into long carrot noses , they are lying . The Tutorial game begins here : http://liesandcowpies.com/javascript/BenghaziGame.00-
  14. Hi, I having problems when I execute (from a JS file) an onclick function by the class that is into an append of another JS file. My code is this: JS File1: var user_tmpl = $('<div />') .addClass('user') .append('<strong/>').find('strong').addClass('titulo').html(item.titulo) .append('<a href="#buscamedioModal" role="button" class="btn btn-danger deletebuscamedio" data-toggle="modal" id=' + item.gid + ' data-name=' + item.titulo + '>Eliminar</a>') .parent(); JS File2 (call): // Configuraciones Generales var boton_eliminar
  15. Hello I'm trying to add a drag and drop event to my js/jquery code in which after my shape is rendered to the canvas I need to move the shape around by selecting it then dragging it into position. I'm not sure if I need to use jquery or just plain old javascript. I've been tinkering around with it but its not working for me. Can somebody give me a hint please? function drawCircle(){ var canvas = document.getElementById("myCanvas"); var ctx = canvas.getContext("2d"); ctx.beginPath(); ctx.arc(100, 75, 25, 0, 2 * Math.PI); ctx.stroke(); } function clearArea() { var c
  16. Hi I'm looking for a way to put content from one site (an entire page including images and server side scripts) in a frame from another site. I would like to find a solution my idea is javascript(not sure), do you have any hints/suggestions?
  17. I've just created a really simple online editor for HTML, Javasacript and CSS in "w3schools tryit" style. I call it WePro. The title stands for Web Programming, so, it doesn't mean I'm a pro developer. Feedback are welcome as this is one of my lesson in learning web programming. Please visit: WePro Hit "Run" to execute. The Code area is draggable and you can toggle it by clicking the "WePro title above the page. Is this any good?
  18. I made an ajax call in my project, the call return a json object, i can see the json object in my console but when ever i call the w3DisplayDate() I get this error in my console " w3data.js:30 Uncaught TypeError: Cannot read property 'insertBefore' of null ". Is this a bug or am I doing something wrong, someone please help.
  19. Hi all I would like to know whether it is possible or not to build a secure inlog script. The script I have as example is mainly in php. I read a couple of tuts online and watched some youtube video's and discovered that both javascript and php are used. I dont know much about encryption but more and more questions are rising ..... Is it true that it is possible to add javascript encryption wen you want a user to login ? My own idea is that this looks quite insecure as anybody can see the encryption code. I have more questions but first i would like to know this i
  20. if(trigger.getAttribute("onmouseover")) { document.addEventListener("mouseover", function(event) { if(event.target !== elem && event.target !== elem.parentNode) { if(elem.style.opacity == 1) fadeOut(x); } }, false) } The code above is not working properly as it is supposed to. I have a trigger element which is event.currentTarget. When the user hovers over the trigger item the elem is display. What I am looking for is that when the user hover over anything else on the page except the trigger and the elem items the elem should fade out. The code works fine when I use onmouseenter ev
  21. I am trying to stop a mousewheel event from occurring when mousewheeling on a tooltip. Why something like this doesn't work (it only works on the first of the tooltips)... document.body.onwheel = function(e) { e = e || window.event; var target = e.target || e.srcElement; for (var i = 0; i < document.querySelectorAll('.searchPageSections').length; i++) { if (document.querySelectorAll('.tooltip')[i].contains(target)) { return false } // perform some stuff } }; But this does? document.body.onwheel = function(e) { e = e || window.event; var target =
  22. Hi, I need a tutorial (in .pdf) on how to make a login page for a web app and secure password database using MS Access. Do you have any reference? Thanks!
  23. UPDATE: Please skip to Post #11 (where I've re-started the post with, "UPDATE: Restarting question/post here...") Is it (reasonably) possible to autoscroll a text (txt) blob during the playback of a video on a page, and if so then how? What I'm wanting to accomplish is very similar to what SoundHound does with audio files and lyrics; while the audio file plays the synchronized lyrics scroll by in a frame. For example, I have a video 10 minutes long that I will play on a web page. I have a txt file with short lines of data.I can manipulate the txt file however needed to make this
  24. Good Day to All. I have a website to display my artwork and poetry. In the poetry section there is the main page with links to other pages and also an anthology which lists my poems by title, the titles are linked to a page to view the poems in their entirety. When you click the link to any poem, that page also displays the anthology so that you can easily navigate to the next poem that interests you without having to return to the main poetry page. The problem I find myself with is that when I want to add a new poem to the anthology I need to edit every page that contains that list. Not so
  25. Hello & Thanks , I am making my way thru game tutorial - http://www.w3schools.com/games/tryit.asp?filename=trygame_controllers_keys and I would like to know , what is the purpose of a 'name :' label ( canvas : , start : , clear : ) ? var myGameArea = { canvas : document.createElement("canvas"), start : function() { this.canvas.width = 480; this.canvas.height = 270; this.context = this.canvas.getContext("2d"); document.body.insertBefore(this.canvas, document.body.childNodes[0]); this.interval = setInterval(updateGameArea, 20);
  • Create New...