JQuery append will not add <form name='form1' id='form1' action='my.php' method='post'> dynamically
hi, In my program I want to add a form and list box dynamically. The select and options tags are appended without problem and the list box is created. However, when I try to append the <form> tag it does not happen. Here is the code: <body> <div class=.results> <script type="text/javascript" > function showData(data) { $("div.results").append('<p><b>Choose a Database Table</b></p>'); // $("div.results").append("<form name='tblform' id='tblform' action='' method='post'>"
I want to be able to post all the information of the selected list link onto the page
This is the format of the json file i am using { "year": 2013, "title": "Rush", "info": { "directors": ["Ron Howard"], "release_date": "2013-09-02T00:00:00Z", "rating": 8.3, "genres": [ "Action", "Biography", "Drama", "Sport" ], "image": "https://ia.media-imdb.com/images/M/MV5BMTQyMDE0MTY0OV5BMl5BanBnXkFtZTcwMjI2OTI0OQ@@._V1_SX400_.jpg",
reveal submenu when key is hit with JQuery
I'm attempting to make my menu accessible. I would like so that when a user tabs to menu items they are highlighted. (I have this part working). I'm told that it shouldn't reveal the dropdown until a user hits enter or down key. This is an abbreviated version of the nav code: <nav id="main-menu-con" class="mmenucon"> <div class="menu-menu-1-container"> <ul id="menu-menu-1" class="main-menu-items"> <li id="menu-item-51" class="menu-item menu-item-type-custom
How can I search a url and append?
Hi there, I'm really stuck and would be very grateful if someone could please help me. I have the following code: <a href="downloads/file/trf.pdf">TRF.pdf</a> <a href="downloads/documents/file/trf.pdf">XYZ.pdf</a> I need some code that can search through all a-links on a page and check for any of them that contain 'downloads/file' and then add a small icon after the 'trf.pdf' or any other pdf file that happens to be on that a-link. Any other link that doesn't have /downloads/file in its path should
input empty check
Hi I have a code where empty check doesn't work properly, it looks only email works, please help me, thank you, frank <!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
need Jquery plugin or code for video thumbnail
i need a jquery plugin that creates thumbnail on the server when a video uploads. and in video gallery instead of showing of video it displays poster or thumbnail Please Help
Event not firing on Dynamically Created Button.
First of all, Thank you for taking some time to help me! Basically I added an event for buttons with class DeleteNumber like this: <script> $( document ).ready(function() { $('.DeleteNumber').on('click', function(){ console.log('Tadaaa!'); }); )}; </script> and it works fine if I add a regular button like this: <button class="DeleteNumber btn btn-success">click me!</button> Now, I did create a button using the following code: var newBtn = $('<button>').addClass('DeleteNumber btn btn-success');
declaring any attribute in span vs using data-*
hi, i noticed that span can have any custom attribute like xyz <span id="p" xyz="24"></span> now i can use data-xyz also. so my question is which one i should? q2) in first case should i prefer lower case becasue i noticed it takes any thing. yours sincerley
loaded div content not showing or not possible to load into textarea
Hello, i loaded an div id into an <ol> but this is not showing (although it is loading in dreamweaver) So my idea was to load this into an textarea but i did not manage to do. So can someone please help my how to make this content visible? <html> <head> <title>testpage</title> <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> </head> <body> <ol id="flugwetter"></ol> <script> $( "#flugwetter" ).load( "https://www.flugwetter.de/fw/berichte/uebersicht/gaforgeb/get_fw.htm?gebnr=1&
how to append my click result in ajax success?
i made simple like code that can any user inside the chat room can make like for public message <?php // Set the header to accept JSON // Insert your database connection here (should probably use mysqli) $host = "localhost"; // or IP or whatever $db_user = "root"; $db_pass = "xx"; $db_name = "x"; mysql_connect($servername, $db_user, $db_pass) or mysql_error(); mysql_select_db($db_name) or db_name(); // Grab user id from post data if (isset($_POST['likeid'])){ // Write
Change tab name on page
Hello, I have searched for some examples and was not able to find any real examples of what I am trying to do. I work for a company that purchased a piece of software that has incorrect names for tabs that open in the software, (not the browser tabs up top) it is web based software. It makes no sense to me, but that is the way it has to be until they patch it. We was told more than a year away. On each page of my workspace I have an input#textfield I want to take the information from this textfield
id number selector problem
hi, i have a problem using attribute start with selector on my jquery-ui dialog form, i have multiple id's with number as an differentiator id="dialog-form-1" id="dialog-form-20"then i used this selector $("[id^='dialog-form']") but why selector not working when the id number is a multiple of 10?
Compatibility with jQuery 1.11.1 or later?
Hi, Is jQuery mobile 1.4.5 compatible with jQuery 1.11.1 or later (even 3.x.x) ? Apparently using jQuery 1.10.2 generates security warnings such as SNYK-npm:jquery:20150627 and more. Thanks in advance and regards
Datepicker Disable Day From Array Question
Hi there, I am trying to disable certain days based on a user's selection in another form. I understand you need to use beforeShowDay and for example date.getDay() !== [0] But how do I achieve this when more than one day can be selected from checkboxes? I have passed the values to an array, but seem to be having trouble disaplying this array in the beforeShowDay function: HTML <form> <div class="field"> <input class="input" id="disableDate" value="Date
php ajax post call for registration
hi all How to get all error responses like password dismatch or password not more than 6 chars. or email is invalid. // process the form $('#employer').click(function(e) { // get the form data // there are many ways to get this data using jQuery (you can use the class or id also) //Personal account var image = $("#avatar").val(); var first_name = $('#first_name').val(); var last_name = $('#last_name').val(); var email = $('#email').val();
From One Form To Another
Hi there, I am new to all this so please bear with me! I am hoping it is something obvious missing in the code. I am using 2 jquery date pickers in one page, and hoping so that when a date is selected in the first, it disables that selected date in the second calendar. Here's what I have: HTML: <form onSubmit="return UpdateDeliveryOptions()"> <input class="input" id="disableDate" value="Date to disable"> <input type="submit" class="button is-medium is-primary" value="Save"> </form> <div
Returning Data From Function
Hi there, I am trying to return the value of a 'data-value' attribute from a list of checkboxes: HTML: <div id="disableDays"> <div class="field"> <input type="checkbox" id="Sunday" class="is-checkradio" name="Sunday" data-value="0"> <label for="Sunday" class="label">Sunday</label> </div> </div> JQUERY dayValue = $('#disableDays input:checked').each(function() {
From console to browser
Hi In my browser I make a request var ourRequest = new XMLHttpRequest(); ourRequest.open('GET','https://............../bedparams'); ourRequest.onload = function(){ console.log(ourRequest.responseText);}; ourRequest.send(); The response comes int my console back as {"Items": [{"datestamp": "2019- {"Items":[ { "datestamp":"2019-12-10T15:00:03Z", "humidity":"45.0", "deviceid":"moisture1-2", "temperature":"19.799999237060547", "voltage":"3.1"}]} How do I get this into my browser please. Thanks
Inserting Accordion code into a Jekyll page does not work . .
People, In isolation as a stand-alone index.html this page https://jqueryui.com/accordion/ is working fine, However if I insert that code without these lines: <!doctype html> <html lang="en"> <head> </head> <body> </body> </html> into an existing Jekyll page that starts with: <!-- Section --> <section id="phr" class="container content-section text-center"> the accordion text shows up fine but the accordion doesn't work - I presume the parent Jekyll css / js is over-riding the accordion stuff? Any
Having trouble determining which core files are required to use a jQueryMobile baseline installation.
Hello, I am having trouble determining what are the core files needed to use jQueryMobile? The unzipped package contains the list below, however i cannot seem to find any documentation stating that in order to use the core features of jQueryMobile all you need to include are the following files: <list of core files here> https://jquerymobile.com/resources/download/jquery.mobile-1.4.5.zip Do i also need to include the css files? and the .svg image files? Thanks for your help. Mark jquery.mobile-1.4.5\demos
Need to add one column while inserting a row from another table
Hi friends, I am just adding one row from table1 to table2 using jquery. While copying need to add two columns dynamically and then insert into table 2. How to do that please help me . i have shared my piece of code here in jquery $(".addSubject").click(function() { var html = $(this).closest("tr").clone().find('td:last').remove().end().prop('outerHTML'); //$('addSubject').append(`<tr>${$(this).closest('tr').html()}</tr>`); //$(this).remove(); $(".scenario").append(html); });Here
Submitting a form: trapped submit event triggers itself
I have the following JavaScript code in a page: var flagProceedWithSubmit; function WarnDate() { flagProceedWithSubmit = true; $("#popUpDialog").dialog({ modal: true, dialogClass: "no-close", buttons: [{ text: "Sim", click: function () { alert("yes"); $(this).dialog("close"); // $("form").attr("action",
How to hide html header when corresponding td body is empty
I want to hide an html header th when the body td item is null. Below is portion of my code <table class="table table-striped" id="report">
<thead>
<tr>
<th id="hide">ID</th> ---> Hide this
<th id="admins">Admin Name</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
How to pass browser info to hidden fields
How can I identify the browser type and OS and pass that information to hidden fields that will pass into our system when the form on the page is submitted? I found some info from over a year ago, but there seems to be a lot of different opinions about the best way to do this.
Help With Using JS for Accordian CSS in Moodle
Hello, Im new here and would appreciate some help. If im in the wrong forum please let me know. We are a private non profit using Moodle for developing an online training portal for foster and adoptive parents. We found a javascript code that is currently working and is pulling from the jquery website. We need help to be able to download the code and host it on our server because we cannot pull from external sources according to our working guidelines. Here are the code files we are using: https://code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css
Hover not working after ajax function
I've got a filter on the website that uses ajax to pull through the specific post category. Before I choose a filter, the hover feature works fine and no issues. However once the ajax function has run, the hover no longer works despite every reason it should. I've googled and tried a number of ways to no success. Two of the options I've found so far which work fine before the ajax are; jQuery(document).on('mouseenter','.cont_panel__img', function(e){ jQuery(this).toggleClass('active'); jQuery(this).siblings().toggleClass('inactive');
jQuery UI: datepicker makes an error when inserting date
I have the following HTML: ... <tr id="tableRow"> <input id="p_Date" name="p.Date" data-key="0" type="text" /> </tr> <tr id="tableRow"> <input id="p_Date" name="p.Date" data-key="1" type="text" /> </tr> ... As you see the date elements have the same id and name... Now I run the following jQuery when the page is ready ($(document).ready) : $("#tableRow #p_Data").each(function (index, item) { $(item).datepicker({ dateFormat: "yy-mm-dd" });
Getting “Object not defined” even when it's loaded before the current script
I have two JS files. One defines a const object called WebRequest and the other uses the WebRequest object. The file with WebRequest are loaded before the file that uses the object, but I get: ReferenceError: WebRequest is not defined Html: <script crossorigin="anonymous" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" src="https://code.jquery.com/jquery-3.4.1.js" type="application/JAVASCRIPT"></script> <script src="/SCRIPT/WebRequest.js" type="application/JAVASCRIPT"></script> <script
Ask for changes before close form
Hi, I'm making a form using jquery and PHP. I'm looking for a way to 'ask users to save changes before closing it' in case he/she forget it. I will appreciate any insight. B. Rs. Amaury
Using external source files and getting started.
Hi, I'm new to using jquery, just a couple of basic starter questions. I found a great example of a rangeslider - I notice the script src points to the code.jquery.com external source locations. Do I need to rely on code.jquery.com being available 100% of the time to use this? Here's the source locations in question: <link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css"> <script src="https://code.jquery.com/jquery-1.11.3.min.js"></script> <script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
Input drag and drop help
I'm trying to use drag and drop to drag an input field to another input field. The UI looks successful when I do this as I can see the dragged text but when I drop it, I don't see anything in the console where I have a line of code to verify the dropped text. I'm not sure what I am missing? $("input").droppable({ drop: function(event, ui) { console.log(ui.draggable.text()); } }); $("input").draggable();
phone mask
Hi, I'm struggling to add a "phone mask" in a html form using jquery-ui plugin like: (999) 999-9999 I will appreciate any feedback. Best Regards.
jquery validation custom rule input greather than
Hi Everyone I would like to check if my value in my input is greater than or equal my stock.I check it with my custom rule jquery validator. I had a problem with my code when I enter a value in all my inputs they check, if I decide to change my first input, he no longer wants to check it. He only checks my last input but not the others. This my jsfiddle I think my problems come from my loop, but I'm not sure! Thank you so much for your help. <form id="form_Ajout" name="formulaire"> <table id="TableSelect">
How to validate that at least one of two unrelated checkboxes is checked
I have a form with two unrelated checkboxes. How can I validate so that at least one of the checkboxes is checked? I have the HTML5 'required' for both checkboxes, but I think when I click submit, it sees those first and does nothing else. So I tried this after removing 'required', but it's not seeing the second checkbox. if($("#unsubscribe input[type=checkbox]").prop('checked') == false){ $('#checkboxAlert').show(); evt.preventDefault(); } <form id="unsubscribe"> <input type="checkbox" id="group0001"
The error "JSON.parse: unexpected character at line 1 column 1 of the JSON data " keep coming up and I don't know how to solve it. Below is my json codes
function load(page) { $.ajax({ type : 'GET', url : page, success : function(data) { try { $('#content').html(data); } catch (err) { alert(err); } } }); } function push(page) { $.ajax({ beforeSend : function() { $('.help-blok').remove(); }, type : 'GET', url : page, success : function(data) { try { console.log('Data has been pushed..'); var res = jQuery.parseJSON(data); if (res.result) { $.each(res, function(key, value) { if (key == 'reload') { load(value); alert('Data saved..'); } }); } else if (res.result
IE11 ignoring script
I have the following submitHandler that's being ignored by IE only... IE11 in my case. The form data is passing through to our database, but the modal doesn't hide and the window/tab to the downloads page doesn't open. Any ideas? submitHandler: function(form) { HTMLFormElement.prototype.submit.call(form); $('#modalForm').modal('hide'); window.open("http://www.foo.com/downloads"); }
Submit a Form from Button Button Click
Hi, I have below form: <form id="FormFounder" name="FormFounder"> <input id="uuid" name="uuid" type="hidden" value=""> <label for="FullName" style="color: red;">الاسم الثلاثي :</label><br /> <input id="TextFullname" name="TextFullname" type="text" name="FullName" style="width: 100%; font-family: 'Cairo', sans-serif;"><br /><br /> <label for="FullName" style="color: red;">تاريخ الميلاد :</label><br /> <input type="date" name="fname" style="width: 100%;"><br /><br /> <label
jQuery stops the page from loading
Hi, Please see this link: https://www.angelsemirates.com/ when you enter: 7841973xxxxxxxx where xxxxxxxx is 8 any numbers the page will stop loading the rest of the page after the FounderEmiratesID I have more fields to show as you can see below: <!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <html dir="rtl" lang="ar"> <head> <meta charset="UTF-8">
Menu: unable to select menu item using keyboard
I can move around in the menu, but trying to invoke a menu item using ENTER or SPACE does not work. Here is a fiddle that demonstrates it. https://jsfiddle.net/Basildane/2gmoztkL/ You can click on the link with a mouse and get the alert, but if you use the keyboard nothing happens.
POST to a PHP page using jQuery
Hi I am using below code to get the card number if exists: <script> $(document).ready(function() { $("#ButtonContinue").click(function() { if(!$("#EmiratesID").val()) { alert('Please enter Emirates ID Number!'); return; } alert('Thank you'); $.ajax({ method: "POST", url: "https://www.angelsemirates.com/get_founder_details.php", data: { emiratesid: $("#EmiratesID").val() }, dataType: "json"
Next Page