autocomplete with params
Hello! I have a script that works with autocomplete. But I need to add another parameter to myurl when selecting from the dropdown menu. Can anyone help? <from> <select name="country" id="country" class="btn-country-select"> <option value="0"></option> <option value="1" >Austria</option> <option value="2" >Zambia</option> </select> <input type="text" name="searchStr" id="searchStr"> </form> $().ready(function() { $("#searchStr").autocomplete("myurl", { width: 218, matchContains: true,
Jquery post issue.
Hi; This should work! onkeyup I want it to load that page in the div but it doesn't What did I miss? Its here function reload_deals() { $.post('<?php echo base_url("home");?>', { search: document.search_form.category_search.value},function(output){$('#deals_box').html(output).show();}); } Thanks
How do load an external page into iframe and create overlap on top of certain element of that external page?
I'd like to load an external page into my iframe, once page is loaded, I'd like to to search certain element on that page and create a overlay on top of that element. Would it be possible? thanks,
event object prevent default and different browsers
Hi, I am quite new to javascript/jquery, however I have been programming in C for quite some time. I am having problems with the events. Everything works as I would like it to in Chrome, however in Firefox I get errors around this. StackOverflow etc seem to have similar questions but without difinitive answers. Let me explain. I have a page that is to run a jquery function: <script>setupFileExplorer();</script>That in turn, calls a function showOptions which, when the user clicks on *something* it
how to have my guid saved for the dialog?
Hi, I am using the following code to populate date in my page. <table align="center" cellpadding="5" cellspacing="0" style="width:100%;"> <?php $mysql_command = "CALL sp_populate_my_companies(:param_member_guid)"; $mysql_query = $mysql_connection->prepare($mysql_command); $mysql_query->bindParam(':param_member_guid', $_SESSION["xoompage_member_guid"], PDO::PARAM_STR); $mysql_query->execute(); while($mysql_row = $mysql_query->fetch()) { ?>
ie expected identifier, string or number again
I have this ajax code $(document).ready(function(){ var ajax_load = "<img src='load.gif' alt='loading...' />"; var loadUrl = "courses_content.php?id="; $("#courses_titles").children('span').click(function(){ $("#courses_title").html($(this).html()); $("#courses_path").html($("#courses_path").html()+'/'+$(this).html()); $("#courses_titles").html(ajax_load).load(loadUrl+$(this).attr('id')); }); }); that returns a a content from the requested page and another ajax
Taking text problem
<a href="index.html">Home<span>Our Company</span></a> This is my code I like to take text into <a></a> tag but not like to take text into <span></span> tag. That means I like to take "Home" only not "Our Company". by .text() function how can I do this ?
using $.post
I have a response function to my first post. Within my response function I have another $.post. I am not getting into my second response function. The php file runs fine when I run it from a temporary HTML file with a form in it. I don't understand what is wrong. I have a lot of code. I am not sure how much I can up load here. I need some Ideas.
Create a title tracks while scrolling
if($('h1').offset().top<='45'){ $(this).addClass('active'); } I have no idea why it does not work but I want to create a title tracks like the iPhone's phone book I work with iscroll4 I tried to build this code But is not present Sorry for the English (translation)
Mouse selection
Hello, I need to choose only one word ('big'). Not the entire value. <input id="choise" type="text" value = "I have a big dog" /> <p></p> <script type="text/javascript"> $(':input').select(function () { $('p').text(this.value); }) </script>
Jquery load popup on page load
I have some JQuery where im trying to load up a popup on page load <head> <link href="/scripts/colorbox.css" rel="stylesheet" type="text/css" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="/scripts/jquery.colorbox.js" type="text/javascript"></script> <script> function pageLoad() { //execute code $(".group1").colorbox({ rel: 'group1' }); } </script> </head> <p><a class="group1" href="/images/pop/img.jpg"
Unable to stop href link using preventDefault
Hello, I have href's in a list menu that have valid links in them. But I cant stop the href when it gets clicked. Im wanting to edit certain fields first to see if they are not blank, but I cant get the href from sending me to the link. I am rebuilding the links if the user selects options from a dropdown. $("#cssmenu a").on("click", function(e) { e.preventDefault(); e.stopPropagation(); ... ... ... If everything passes Im then sending
"TypeError: 'addEventListener' called on an object that does not implement interface EventTarget."
Hi guys! I'm new to the forums and have come across a very bizarre error, the one in the subject line: "TypeError: 'addEventListener' called on an object that does not implement interface EventTarget." A stack trace shows that the object in question is a [button] element, so I'm really confused. A Google search for the error message doesn't show anything useful. Can anyone provide some insight as to what's going on? I'm providing some screenshots of the error and stack trace. Thank you! Jennifer
Getting the value of a H1 from another page
I was looking at a method of taking an H1 from another page $.get('001.html', function(html){ $('#target').text($('h1',html).text()); }); This is from another site and replaces an item with the ID of "target" on the current page. What I would like to be able to do is include this in a Loop and assign the H1 values to an array, but I cannot seem to be able to do it. Any able to advise? TC
how to change font using animate?????
Hi in this Link you can find cartbox icon font on a circle, if you rollover then cartbox size gone big and changes it's color http://www.templatemonster.com/demo/47888.html I have tried $(".cartbox-three").mouseover(function(){ // $(this).css('color','#036'); <<< this works but only change color instantly not smoothly $(this).animate({font:'40', color:'#36'}); <<< this dosen't work });
JS warnings at load time
jq v1.10.2 firefox v26.0 When jQuery is loaded when the page opens, several JS warnings occur. The warnings do not affect the operation of JQ but they are a distraction when trying to debug JS scripts. There are no such warnings for v1.4.2, and only the syntax error warning (sheesh!) for 1.8.3. The trend seems to be: more warnings in later versions. Is this to be expected? That is, will these warnings continue to happen in future versions? Timestamp: 01/13/2014 10:00:57 PM Warning: SyntaxError: Using
html5 WebSockets
Saw rarely information about this feature on the internet, either missing or non-working. I think it is best to implement into the already great jQuery.
Accepting title from previous page
I need to get the Title value from a link on a previous page. Can anyone help? Thanks
Source map syntax error on jQuery upgrade - Unexpected Token : / Missing ; before statement / Expected ';'
I've just upgraded my C#.NET (MVC / WebAPI / Entity Framework) solution to use jQuery 2.0.3, and I'm getting a syntax error (viewable in the developer tools console) on the source map file in every browser. In Chrome 31.0.1650.63 m, I get "Uncaught SyntaxError: Unexpected token : ". In Firefox 26.0, I get " SyntaxError: missing ; before statement". In all cases, the error occurs in file jquery-2.0.3.min.map. In IE, I get "SCRIPT1004: Expected ';' jquery-2.0.3.min.map, line 1 character 11".
how to return a individual rows using ajax
Hi, I am using jquery ajax with PHP and I would like to return individual rows instead of html. here is my code: $('#btnShowDetails').click(function(){ $.ajax({ url : "get_company_details.php", data : 'id=ed23e767-539f-11e3-aef0-74de2b9a31a4', type : "post", success : function(data) { $('#lblCompanyName').text(company name from data result); $('#lblCompanyWebsite').text(company website from data result); } }); }); and
How to keep one button always active?
I have a jsfiddle @ http://jsfiddle.net/89N9s/1/ When you hover over a button, it slides and the width increases and an arrow becomes visible. How can i keep a button always active? So that the last hovered item always remains active. Please help.
datepicker edit does not make button show
I have a form with a textfield and a datepicker. If a textfield is editted then a "save" button appears: I make the button appear like this: $('.rowsaver').on('keyup',function() { $('.btnvanish').show(); }); $('.rowsaver').on('keypess',function() { $('.btnvanish').hide(); }); I also use a datepicker i have a field with class 'rowsaver' and 'datepicker': And this is the datepicker code: $(function() { $( ".datepicker" ).datepicker({ dateFormat: "yy-mm-dd" }); $( ".selector" ).datepicker({
troubles selecting options in dropdown to hide using :not selector
I am trying to use the "not" selector to hide certain options in a dropdown box. Evidently I'm not getting it. Can someone please tell me what my misunderstanding is here. I would very much appreciate the help as I'm kind of stuck. I'm trying not to have to use the .each with arrays here because that gets complicated for me. thanks -dave jsfiddle: http://jsfiddle.net/vhabhsrosed/fGj3J/ <script> $(document).ready(function(){ //$("option:contains('CommitteeAction')").not().hide(); //$("option:not(option:not('CommitteeAction')").hide()
Help, Slider Loads too Many Images
Example of a page with issue: www.goldara.com/product-category/jewelry/ The above page is extremely slow because the size of the page is too big. Mostly becuase of the number of elements that the page is loading. It's making 365 requests which is very excessive. The vast majority of these requests are images. It looks like it's loading the images from all 18 pages at once, which is why this takes so long to load. I was told by a developer who couldn't fix the issue, that redesigning the loops that
Deferred: stop the next "done"
It would be possible to "stop" the next "done" in the following code using only the deferred object? Thanks. var defer = new $.Deferred(); var prom = defer.promise(); defer.resolve(); prom.done(function () { // I want to stop the second done defer.reject(); }); prom.done(function () { console.log('I do not wont this to be executed'); });
jquery - auto show form values
Hi all, When I have a form, which consist of more select-options ... how can I auto show their values ... so when I choose for example one option .. it immediately appear thanks
Reportable bug or not? IE9 error on interacting with hidden elements if document.domain is set
Hello. I have a case where an element is hidden on page load by CSS using 'display: none'. I want to make it visible some time later in response to an event, but in IE9 the jQuery methods show() and toggleSlide() trigger an error when they are called: 'SCRIPT5: Access is denied.' This error only occurs when the document.domain value has been set in the page, even if it it simply being set to the value it should have by default. It looks like 'css_defaultDisplay' is involved: in trying to calculate
Need to post some additional fields to my php file
I'm using the code below to send the selected option to a php file, and let the php file return something, that will be displayed in the div: details. So far no problem, but I wan't to post some additional information to my php file, namely two hidden input fields. I haven't got a clue how I can add these two input fields to the data being sended, so I appreciate any help. My coding: <select style="margin-top:5px;" id="report"> <option value="">Select Category:</option> <option value="spam">Spam</option>
Parsing through an XML doucment
Hey Guys I have been reading online on ways to parse through an XML document with jQuery, and came up with examples to parse through it using ajax. If that is the case, then when would I be needing to use $.parseXML?? As an example lets say i want to get the text of the element <name> and display it as an alert.. Do I use the regular selector $(name) and then use the $.parseXML or do I put the XML as a separate file and parse it with ajax? Just a little bit confused over there. Thanks! <BusinessCard>
How can i change the object value???
html <div class="playlist"> <ul> <li class="playing">Sample 1</li> <li class="">Sample 2</li> </ul> </div> Jquery audiO($playlist.find('li:first-child')); function audiO(datas){ $classStatus = datas.attr('class'), } The result that i want is every time the user click i want the $classStatus to be change i try to use $classStatus.val('1'); but the result is the object dont have method of val... help me thanks...
same $.ajax call is ASYNC in Chrome but SYNC in IE
Hi All, I have a dumb simple ajax call to a nonexistent url with an error callback: $.ajax("non-nonexistent-url", { error: function () { alert("FOO"); } }); alert("BAR"); When I run it in Chrome, I get "BAR" then "FOO" alerts, which is the behavior I expect - ajax call is asynchronous. In IE, however, I get "FOO" then "BAR", which looks like synchronous call, but why? It should be async by default, right? I hoped it's guaranteed that $.ajax returns before any callbacks are executed... Thanks!
What are the underlying reasons to have provide jQuery with Node.js?
There is a node module jquery that can be run using npm install jquery that can work in node.js environment. JQUERY is a javascript libraries and it makes writing JavaScript easy and works well. node.js is a platform for developing server side JavaScript. What are the main usage scenario for jQuery with node.js? What are the underlying reasons to provide such support? I just want to understand the typical usages for this Thank you in advance for any insights.
release or close xml file after reading contents
It seems that when I read an xml file with a function in ajax() that the xml file is not released after the read. I need to be able to let a server-side script delete the xml file when my read script is executed so a new xml file can be generated. How do I make this happen? Thanks
Editing this parallax scrolling template -> removing some part of the index page -> ?
I'm going to use the below parallax scrolling template as a static page on my website. It's a page (=index.html) divided to some section (by js). The title and menu are shown over all sections. Now, I want to make hide the title and menu on the last section, it's because of a forum is embedded in the last section. how to edit the template for it? Demo: http://www.onextrapixel.com/examples/apple-iphone5s-website-one-page-scroll/ => How to remove those `three buttons (Demo1, Demo2, Demo3)` and `Title`
definitive answer on file deletion using jquery
There is a lot of conflicting information about whether or not you can delete a file from a server directory using javascript/jquery. It makes sense to me that there would be some security issues with this if it were accross domains, but other wise I am no sure. I looked through the API and I don't see anything in .ajax that would lead me to believe you can delete a file, but can you give me a definitive answer on this?
working with json data
I am using youtube url to get json and data and save it ina varaible to use it later . here is my code var myObject; $.getJSON("https://gdata.youtube.com/feeds/api/videos/SPtEUAFm6Yk?v=2&alt=json", function( data ) { myObject=data; console.log(myObject.entry.content.src); }); console.log(myObject.entry.content.src);inside the callback function I can iterate the myObject and get all the properties but outside the function it sayas undefined. Please advice once we
Using jQuery with XML
Hey Guys. I am really new to jQuery. I am trying to use XML with jQuery and need help understanding couple of things . In the code example below I have the following questions Why is there a var before XML but not on added on the second line before XML doc Why is there a "$" next to XML and title is the XML being passed to an jQuery obect on this line... $xml = $( xmlDoc ) If so what is the purpose of this ? Any help would be really appreciated <!doctype html> <html lang="en"> <head> <meta charset="utf-8">
get a value from autocomplete
Hi, I am using the following jquery and PHP to populate an autocomplete. I will add a btnShowDetails and I woudl like to let the btnShowDetails read the value of the autocomplete (which is the company_guid? How can I do this please. jquey for autocomplete: $("input#txtCompanyName").autocomplete ( { source : function (request, callback) { var data = { term : request.term }; $.ajax ( {
How to save and restore all page events using jQuery?
Hello. I'm manipulating page html: $('body').html(changed_html); And I need save and restore all page events. I can save them something like var selector = '*'; var s = []; var e; $(selector).addBack().each(function() { e = $._data(this, 'events'); if (!e) return; // console.log(e); console.log(this.tagName); // console.log(this.id); $.each(e, function (i, ev) { console.log(i); $.each(ev, function (j, h) { console.log(h.handler); }); }); }); But what is the best way to restore them? Thanks in advance.
Trying to use a callback with .ajax call to assign value to a variable
I'm trying to use a .ajax call, to assign the value from an xml document, to a variable in javascript. I can't quite figure out how to use a callback, I know this topic is well discussed on forums, but I haven't been able to find an example out there that does what I am trying to do. The example below makes a call to Google Maps, and gets a string "Central Standard Time" back. I can use .ajax calls to move the text to a div. But I can't figure out how to assign this to a variable, my_zone, and
Next Page