JavaScript - jQuery - Ajax

Topics related to client-side programming language.
Post questions and answers about JavaScript, Ajax, or jQuery codes and scripts.

  1. » JanMolendijk
    Dear Admin i Hope you understand my Question
    I would like to use your SimpleModal Windows script
    But into my notice-script the code where i wanna...
    Last post » JanMolendijk
    Dear Admin i just found they answer
    I have to put '. $row .' to the basic-modal, button & win_cnt...

    All things are working corectly now....


  2. » Marius
    Hello,
    How can I create a JavaScript DOM object out of string with HTML content?
    For example, i have this string which i get with ajax from...
    Last post » Admin
    Hello,
    You can use DOMParser() to create a #document from a string:
    var str ='abc 123<div id= test >coursesweb.net</div><span class=...


  3. » Marius
    Hello
    I have a JavaScript code that automatically adds some value in an input field.
    How can I detect when the value was added in input?
    If I use...
    Last post » Admin
    Hello,
    For input fields it is better to use the 'input' event.
    To emit and detect an event when some data is added automatically in input field,...


  4. » Alecos
    I see an error in firefox when visit my page that contains your script. We are talking about the ajax script that allows the rating... try to install...
    Last post » Admin
    Hello,
    I checked your page with Web developer in firefox, but i didn't see the error you specified, only an warning (from jquery.min.js):...


  5. » Marius
    Hello
    Anyone know how to directly display in HTML an image with dynamic SRC, from external URL address, using JavaScript?
    To have in html something...
    Last post » Admin
    Hello
    Try this code:
    <div id= dimg >Here add image</div>
    <script>
    var dimg = document.getElementById('dimg');

    //receives the JPG...


  6. » Marius
    I have a jquery ajax function that is called every second, with setTimeout().
    I want an alert to pop up whenever a new message is received.
    Here's...
    Last post » Admin
    Try something like this, store the previous response into a variable, and alert the message if response changed:
    var msg_res =''; //store the...


  7. » mlucicom
    Hello! I have a form that insert results to database.
    Many users press this button several times until the confirmation message appears.
    How can i...
    Last post » Admin
    You can use onclick with: this.style.display='none' , or: this.style.visibility='hidden' ; will automatically hide the button, so, it will not be...


  8. » mlucicom
    Hello! I have this jquery script that get all checkboxes from a div and check all at button click:
    <script>
    $( #check'.$id22.'...
    Last post » Admin
    Hy,
    To much code and i cannot test it because i not have the necessary database.
    Study better the example I have gave above, that it works.
    - If...


  9. » mlucicom
    Hello! On page:
    mluci.com/d/admin-index.php

    - i tried to add database details from sql select into a div with javascript.
    I have this php with...
    Last post » Admin
    Hello,
    I think I told you in other topic, The resulted sting in javascript must be on a single line, or each new line escaped with \ .
    Example:...


  10. » MarPlo
    Hello,
    How can I check if a Div is in viewport and detect when it exits viewport.
    Has anyone a code example or JS script that works in all...
    Last post » Admin
    Try the JavaScript script and example from this page:

    - It can be used to check if a html element is in viewport, and to get its size and...


  11. » MarPlo
    Hello,
    How can I get the position top, left of a html element in page, for example a Div or an image?
    Also, how to get the size of a specified Div:...
    Last post » Admin
    This function, getBoxPS(), can be used to get the position and size (in pixels) of html elements in page.
    It returns an object with four properties:...


  12. » JanMolendijk
    I have this textarea
    <textarea name= details rows= 5 cols= 50 class= form-control ></textarea>
    Now i have a page with all smilies &...
    Last post » JanMolendijk
    Admin you thought off everything great work
    i added it & is working thanks


  13. » mlucicom
    hello! I have this page: elitservice.dk/contact-01.php
    When i press submit button i get an alert() with parsererror .
    i test php code and work...
    Last post » Admin
    Maybe from functions.js , or ask the one who made the js scrips used in that page.


  14. » Marius
    How can I redirect the user from one page to another using jQuery?
    I saw both window.location = url; and window.location.href = url; How are they...
    Last post » Root13
    I think, it's better to use replace()


  15. » mluci12
    How can i get image who is choose on: autobelgia.ro/home.html
    At SELECT VEHICLE TYPE section?
    Last post » Admin
    I not know. You can post what code you have tried and what is not working in that code.


  16. » mluci12
    Hello,
    How can i get the value of this select live (mluci.com/d) a prefix number, and add in next input?
    Last post » Admin
    Hi
    See if this example helps you. The <select> element must have an id .
    <select name= countryCode id= countryCode >
    <option...


  17. » dmgatwork
    I am looking for a JavaScript that will capture the browser name and version that is understandable. I want to determine if my viewers have older IE...
    Last post » Admin
    From what I know, you cannot get the user's ip with javascript unless you use ajax with a server side script or some kind of external service.


  18. » mluci12
    Hello!I want to make an webview in Javascript.I know that this is posibile but i dont know how can i do this.Please help me!
    Last post » Admin
    Hi,
    I not have experience with webview. From what I found on internet, it is an Android's class that allows you to display web pages as a part of...


  19. » WestJA
    Hi All, I'm new to the forum.

    my question is:
    can all html be done in javascript?

    the question has to do with parenting/siblings.
    Last post » Admin
    Hi WestJA,
    Welcome to this forum.
    You can set and add in the page the html code with javascript, you can build all the html code with javascript;...


  20. » Marius
    Hello
    I use the following jQuery code to include a css file in html page, but it doesn't work.
    var fcss ='address/file.css';...
    Last post » Admin
    Hello
    To include a css file in html document, use the <link> tag (not <style>).
    You can use this javascript code:
    var fcss...


  21. » Marius
    Hello
    I want to make a calendar, but I don't know how to calculate the number of days in month, in any year.
    How can I get the number of days in...
    Last post » Admin
    Hello
    You can use the daysInMonth() function from this example (month is 1 based):
    //Returns the number of days in a given month (1 - 12) and year...


  22. » mowgli
    Hello,
    I use the Fotorama script for a slideshow images. How can I put caption in some photo? How it is possible using this script?
    Thanks in...
    Last post » Admin
    Hi,
    I'm not the person who made the Fotorama script, and because I not use it, I not know very well about its customization.
    If you want to know...


  23. » mowgli
    How to make a Fotorama different list of images for mobile and for desktop?
    For instance: desktop image 1, 2, 3 ... (1400x800) px. Mobile: 1a, 2a,3a...
    Last post » Admin
    I'm glad it works. I think it is not a problem that the slideshow starts from zero when the page rereshes, and anyway, the visitors not play with the...


  24. » Marius
    Hello
    How can I shuffle /randomize an array in JavaScript? Is there a JavaScript function like shuffle() in PHP?
    Last post » Admin
    Hi
    You can use this function:
    // receive an array and return it with the items shuffled /randomized
    function shuffle(ar){
    for(var j, x, i =...


  25. » crop
    Hi,
    i read this :

    and i tried to copy it, i made simplified version here:
    clinde.de/dump/crop.html

    - check.php is present, but you can't see...
    Last post » MarPlo
    I replaced the onblur event with onchange . Now, when ALL the input fields are validated, the submit button is enabled and the form is Automatically...