$.ajax jsonp api SCRIPT1004: Expected ; request.php
I am using Security Center's API http://static.tenable.com/prod_docs/SecurityCenter_4.8_API.pdf When using the URL in the browser I get a result; however, when trying to call it via jquery I get an error. SCRIPT10004: Expected ; request.php, line 1, character 8 which that line is {"type":"regular","request_id":"4666".....etc Here is the code: $.ajax({ url: 'https://ip/request.php?action=init&token=&module=system&input={}&request_id=4666', method: "GET", headers: { "Accept": "text/html, application/xhtml+xml,
Store update LINQ query and pass to json
I am trying to create an update linq query & I generate table using jQuery so after update how do I save changes to data in the table? [WebMethod] public static string updateselect_data(int ServiceID, string frequency, string Freq_Du, string Freq_Mil) { try { Track_Data track = new Track_Data(); DataTable dt = new DataTable(); var update = from p in track.Serv where p.ServiceID == ServiceID select p; foreach (var q_update in update) { q_update.frequency= frequency; q_update.Freq_Du= Freq_Du; q_update.Freq_Mil=
POST and GET ajax jquery
Hello, I am posting cart values in the database with ajax and would like to know if the GET function would work for update my cart. I have all the code in php working, just need to have a way to POST and then run my cartupdate.php Would the below code be the right way of doing this please? Thank you. <script> $("#form-items").submit(function(e) { $.ajax({ type: "POST", url: "resources/templates/frontend/cart.php", data: $("#form-item").serialize(), success:
Add charts to sliding window in dashboard template
Hi, I have a dashboard template which contains a couple of images. Instead of those images I want to put in a pie chart or a bar chart. The values in these charts are fetched from the DB. The values in the charts are changing values, they are not static. I have the charts ready in a .js file. But need the advice in calling the charts in UI.
Uncaught ReferenceError: preventDefault is not defined
Hello, I'm facing a strange issue but haven't been able to fix. I'm getting Uncaught ReferenceError: preventDefault is not defined error whenever I trigger the 'click' action. I found out that the issue is typically caused when jQuery isn't properly loaded. However, in my case, the jquery does load before my custom javaScript file. In fact, I'm able to execute it properly for another event that evokes the function just below the following snippet. That means, the file is actually being loaded fine
A regular expression turn to space tree view --ask for help
Dear All, We have been using Jquery for some time,Now we want to find a way to realize regular expression turn to a spacetree view for show up and edit we need some help! for example: a regular expression as : IF(SUMIF(G3:H16,>20,G3:H16),B3,SUM(1,{1,2,3})) turn to spacetree or call mind-mapping view as:
Information about iterate through children In JQuery
Hello everybody. I have an tag of type 'article' in my html page. I want to iterate though all its child and grandchild nodes, and give them an ID if they lack one. So I tried this code as a test: $(document).ready(function () { $("#ArticleToHighlightRFS").find("*").each(function (i) { alert (this.id); }); }) The idea is that 'find()' would get all descendant nodes that are not text nodes, and would list their ids. If they don't have ids, I suppose
Problem about extend the goBack() Button
Hello everyone! I created a custom "Back to previous page" button with the following function: function goBack() { window.history.go(-1); } Clicking on the button, brings you to the previous page. However if the page was a form, the values in the form fields aren't there any more. How can I extend the goBack() function, so that if I go back to a form, the form field values are still there? Thank You! Ads: FPT Telecom hân hạnh mang đến cho khách hàng dịch vụ internet fpt hà nội sử dụng công nghệ
Filtering HTML5 data-attribute elements via checkboxes using JQuery
In my listing wrapper each product has multiple data-attributes like data-baths="3", data-beds="4", data-halfbath="12", data-garages="2", data-stories="2", data-price="2", data-sqft="2567". I have checkboxes that has a category corresponding to the data-category="value" here value may be baths/ beds/ halfbath/ garages/ stories/ price/ sqft like <input type='checkbox' class='filter' data-filter='baths' value='1'> 1 Bathroom <input type='checkbox' class='filter' data-filter='beds' value='2'> 2 Bedrooms
.val(value) does not work on checkboxes if value is not an array
The documentation states that .val(value) should accept, and work with, String, Number, or Array. However, with checkboxes it doesn't work with String, but it does work with an Array of Strings. As a work-around, I am wrapping my String with [] (brackets), which appears to be working. Here is an example of what doesn't work:
$("#LabelEditModalForm-AdminUseOnly").val($data.data("adminuseonly"));
and this does work:
$("#LabelEditModalForm-AdminUseOnly").val([ $data.data("adminuseonly") ]);
Changing iframe url values with variable from text file
I am trying to read urls from a text file into a common video iFrame command using jquery and wordpress. Here is the example for the code as an example of what I am trying to do. I just want the video on refresh to change as does the line below which is what needs to change to play different videos with different stop and start points. http://aaaad.com/jquery-forum-post/ The video at the top of the above page is a static example iframe command I am trying to use. The randomized variable is displaying
Modal not clickable on tablet
I have a modal on my web site and it doesn't work on a tablet. When I double-click the modal it justs zooms in and doesn't display the modal. How do I make my modal work on a tablet?
JQuery 2.X support timeline?
I am doing some research for my job and I would like to know if there is a timeline to end support for JQuery 2.X? Thank you.
adding css to make divs equal
I have this ecommerce store and it displays each product in a box with equal heights using jQuery. I tried to apply the same code to another display of products and cannot get it to set the height on the divs. It is supposed to append the style min-height to the divs. I examined it in firebug. Do you see anything below that may be written a better way? var make_equal_height = function (element) { var $within = jQuery(element), selector = $within.attr('data-equal-height'),
Information about Change path in Jquery.
Hello everybody. I have a function that calls a particular file .pdf however need to be able to change this file access path, it is possible? <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script type="text/javascript"> $(function () { window.onload = function abrirPdf() { var iframe = $("#LoteSlips"); iframe.attr("src", '<%=arquivo%>_ERRO.pdf#zoom=200&page=<%=i%>');
How To Create this code for a ticket machine
Hello all member! I am researching a number of applications on JQuery. I am creating this code for a ticket machine. The dialog comes up for the user saying how much they want to pay. I want them to pay more than or equal to 60. Which works as I want it. However, how can I execute that piece of code again inside the while loop? because I want if they enter less than 60 the same dialog box appears again. public class TicketMachine2 { public int money(int getprice ) {
Hidding and showing divs based on radial button choice
Hello, Quick question please. If I have 2 radial buttons <div class="form-group"> <div class="radio"> <label for="stock"> <input type="radio" id="stock_disabled" name="stock" value="stock_disabled" checked><b>Disable</b> Stock Feature for this product <br> <input type="radio" id="stock_enabled" name="stock" value="stock_enabled"><b>Enable</b> Stock Feature for this product </label> </div> </div> and an input field which I want to hide when the
What's wrong with this ajax call?
CODE: <script> function ckID(taid, callback) { return $.ajax({ url: 'myscriptfile.cfm?taid='+taid, /* data : { // Sorry I missed the colon ! id: id }, */ success: callback }); } ckID('',function(rtn) { console.log(rtn); if (rtn > 0) { // record already exists // alert document.getElementById('custNoDupe').innerHTML = "<font color='red'>This ID already exists in the database</font>"; // reset current input to nothing document.getElementById('taid').value = ""; } }); </script> </head> <body>
Uncaught TypeError: $(...).gridviewScroll is not a function
Hi there, I'm new to the forum and am in quite a bind. Been stuck on this for a few days and have been searching for a solution. I'll spare you the sob story. What I am trying is create a table that can scroll where the first column can be frozen so that it always remains in place. I am doing this with a Gridview. I found this demo: http://gridviewscroll.aspcity.idv.tw/Demo.aspx Which is exactly what I'm looking for (Freeze Column, just the first one) and went to Github to bring in the necessary
fetch data from table to text box
I am creating a table through jQuery and in this table I concatenate 3 columns in 1 column: Before concatenate: if (re.length > 0) { $("#services_schdulue").append $('#services_schdulue thead').append("<tr><th>Service ID</th><th>Service Type</th><th>frequency</th><th>Freq_Duration</th><th>Freq_Mileage</th></tr>"); for (var i = 0; i < re.length; i++) { if (re[i] !== null) { $('#services_schdulue tbody').append('<tr><td>' + re[i][0] + '</td><td>' + re[i][1] + '</td><td>' + re[i][2] + '</td><td>' +
Find children with text
Sometimes my helpers make nodes like this: <div class="col-md-2 col-md-offset-1"> <span class="control-label required">First name</span> <input type='text' class="form-control" value="" > </div> And sometimes they make nodes like this: <div class="col-md-2 col-md-offset-1"> <span class="control-label required">Date of birth</span> <div class="input-group date"> <input type='text' class="form-control class_date_input" placeholder="mm/dd/yyyy"
scripts.js:201 Uncaught TypeError: jQuery(...).vide is not a function & scripts.js:580 Uncaught TypeError: jQuery(...).unveil is not a function
scripts.js:201 Uncaught TypeError: jQuery(...).vide is not a function (anonymous function) @ scripts.js:201 j @ jquery.min.js:2 fireWith @ jquery.min.js:2 ready @ jquery.min.js:2 I @ jquery.min.js:2 scripts.js:580 Uncaught TypeError: jQuery(...).unveil is not a function (anonymous function) @ scripts.js:580 dispatch @ jquery.min.js:3 r.handle @ jquery.min.js:3
Removing class from element and disabling CSS statements for class
The problem seems to be simple. Assume we have a definition like <p class="aaaclass bbbclass">........</p> Now I want to remove in all elements <p ...> on the web page which have an assigned class "aaaclass" exactly this class so that afterwards the code look like: <p class="bbbclass">........</p> How does that work? Next question: How do I have to modify your suggested jQuery statement if I want to remove BOTH or ALL classes (see above) so that afterwards the code looks like: <p>........</p> And
Dual Scrolling - How to scroll to an element on a page AFTER the page goes to another element when loading.
I'm using CodeIgniter, if it makes any difference, to create a page with a calendar list of events. The calendar list consists of a title, and two tables: the first table shows fixed table headings for a second table that contains rows that can scrolled when there are more rows than will fit into the fixed length of the second table. Each of the rows in the second table has an id, which brings that row into view when the URL of the page ends with a hash and the row's id. Amazingly, this all works
Javascript Image-Show Not Continually Looping
I am trying to make a fading image-show for one of my webpages. To this point of time I have the show working to a point: the array of images cycles through once, however, after the first interval, the loop breaks: after the last image runs its course, the show cycles to a broken image; now, while I was checking what could be causing this occurance, I checked the activity of this element, in my Firefox Inspect Element tool, and there, it shows that there is activity in relation to the show's
check to see if function has been run?
Hi Folks, I've built a script that checks to see if a form input has a value, and if not, write an error with the field's label name in it. If they go back and fill in the field, it removes the error. It works great, but there's one issue; every time the user focuses out of the field, it writes the error again. I need to make it so that it only writes the error once. Using .one doesn't seem to work. Here's the html: <label for="name">Name</label> <input id="name" type="text" required> <label for="email">Email</label>
hasClass not working for some reason...
Hi, I've been pulling my hair out trying to figure out what is wrong with my code here: // Add attributes to external links if($('a').hasClass('notexternal')) { // do nothing } else { $("a[href*='http://']:not([href*='"+location.hostname+"']), a[href*='https://']:not([href*='"+location.hostname+"'])").attr('title','External link').attr('rel', 'external'); } Basically, I'm trying to make any links without the class 'notexternal' and that has an external domain have: 1. A title attribute of 'External
Question about get The first class img src
Hi everyone, First post here, I have 2 html docs the first one has a div with class "Img-container" and The second html has a div with class "Img-copy", how can i do to get The first class img src and get it on The second class when: I click a next Button on The first html that links to The second OR when The second html loads? Thank's a lot!
Problem about setting up a function in Script
Hello everybody. I came across this script: <script> $( "<div/>", { "class": "test", text: "Click me!", click: function() { $(this).toggleClass( "test" ); } }) .appendTo( "body" ); </script> Is the script above, setting up a function for the newly added "Click me!", in that it is supposed to disappear from the page it is on, when someone clicks on it? if not, what should be expected from this script; I "tried this code out"; and "Click me!" is unfunctional. Thank's a lot!
check an element if exists and add class to its previous element and to it with jquery
I have a vertical menu code, and i want to add collapsable sub menus, here is structure of my Menu's HTML code: <div class="menu"> <ul> <li><a>1</a></li> <li><a>2</a></li> <li><a>3</a> <ul> <li><a>sub1</a></li> </ul> </li> </ul> </div> so as you can see here, many of the li tags of .menu > ul are there but only some would have sub menus in them. i tried to create jquery which could add treeview class to the li tag which contains the sub menu's ul tags and treeview-sub to the
NEED HELP | event.currentTarget.closest() or something similar (.parent ?)
Hello Guys, I'm totally new to this forum and I appreciate to have the ability to discuss on jQuery and to get answers to my questions. I don't know that much jQuery and I need to modify some code written by someone that knows a bit more about it. My code involves a bit of PHP, that calls jQuery plugin functions. My problem follows... Code on the client page : <div> <?php foreach ($joueurs as $joueur) { echo '<form roler="form" id="form'.$joueur['id'].'"> <table class="table"> <tr>
Use jQuery to parse & display image from database –
Hello All; Need some help with this one. The topic headline itself explains the scenario. I have some image files in DB for every shop/restro of my application; images stored as raw bytes. Now using a web API I am fetching them. Any shop may have several pics associated with it. The image files are being fetched in the format like the huge lengthy: /9j/4AAQSkZJRgABAQEASABIAAD/4ROwRXhpZgAATU0AKgAAAAgADgEOAAIAAAAgAAAAtgEPAAIAAAAgAAAA1gEQAAIAAAAgAAAA9gESAAMAAAABAAEAAAEaAAUAAAABAAABFgEbAAUAAAABAAABHgEoAAMAAAABAAIAAAExAAIAAAAgAAAABAAAC2gAAA
Using var in text?
Hi Folks, I'm trying to build a script that will easily check to see if a form input has a value, and if not, write an error with the field's label name in it. I know I'm on the right track, but I can't figure out how to use the label name in conjunction with other text. Here's the html: <label for="name">Name</label> <input id="name" type="text" required> <label for="email">Email</label> <input id="email" type="email" required> and the js: $('input[required]').focusout(function() { var labelvalue
give each element style from html5 data object
Hi there, I have a problem right here, let me give you the HTML first: <div class="section_checkboxes group_checkboxes"> <div class="col_checkboxes span_1_of_2"> <img src="images/interactive-test/fibro-mann-front.png"> <ul class="man_checkboxes"> <li><label><input type="checkbox" data-top="-100" data-left="-59" name="front" value="1"> Kiefer links</label></li> <li><label><input type="checkbox" data-top="-100" data-left="-5" name="front" value="1"> Kiefer rechts</label></li> </ul> </div> </div> Now
name file
Hi there, I need retrieve the name file witht extension value = row.find('a').html(); value is : "<img src="http://localhost/Domus/uploadFile/server/php../../../../images/immobili/tmp_kernel/thumbnail/58.jpg">" I try with String.prototype.filename = function (extension) { var s = this.replace(/\\/g, '/'); s = s.substring(s.lastIndexOf('/') + 1); return extension ? s.replace(/[?#].+$/, '') : s.split('.')[0]; }; nomeCopertina = value.filename();but nomeCopertina
Jquery .fadein affects containers before
I have a mysterious problem: <div class="ttbl0" id="msg0">Messages</div> $(data).hide().fadeIn(1000).insertAfter("#msg0"); data in this case are: <div class="kld0"> <div class="mbx24"> <div class="wlls-t"> <div class="row1">test1</div> <div class="row2">test2</div> <div class="row3">test3</div> </div> </div> </div> It works fine and inserts data after msg0 container with fadeIn effect. The problem is that after data finishes fading in, the container msg0 do the same - it disappears and appears again
Javascript Charecters
In Javascript, what does a colon denote? for example: current = (current != slides.length - 1) ? current + 1 : 0;
Insert HTML5 video tag when clicking the button using jQuert
I would like to make it like below. #1 The video file like .mp4 doesn't download when the page is loading. #2 The download start when clicking the button like "Start Movie" #3 Auto play using "<video></video> tag" in the page after downloading. *no downloading video file for users don't want to watch. *no page transition for usability. I'm confused how... Thanks for your help or advice.
Fire event on pag refresh
Hello, I have this code: <script> $(document).ready(function(){ $('#country_choice').on('change', function() { if ( this.value == '138') { $("#town_dropdown").show(); $("#town_input").hide(); } else { $("#town_input").show(); $("#town_dropdown").hide(); } }); }); </script> It works very well when you select the dropdown menu with the id "country_choice" but my problem comes when I submit my form and there is an error, I
Autocomplete textbox with multiple data from database in CodeIgniter using Jquery
I want some help from anyone to do this Autocomplete textbox. Right now the data is coming from the database well but I want to restrict displaying the duplicate data. CODE: $(function() { function split( val ) { return val.split( /,\s*/ ); } function extractLast( term ) { return split( term ).pop(); } function log( message ) { $( "<input name='skill'>" ).text( message ).prependTo( "#log" ); $( "#log" ).scrollTop( 0 ); } $( "#birds" ).bind( "keydown", function( event ) { if ( event.keyCode ===
Next Page