sending php array through jquery
I have the following code, and would like to send it to a page for validation. data: "submit=1&elements=$_POST['elements']" Is this the right way to send a php array? I also have this defined before the .ajax: var $_POST = <?php echo json_encode($_POST); ?>;
jQuery active link hide
How can I make a link when active to hide it self? Press a link > Menu Opens > Link pressed hides it self
onclick check session value either it is empty or not
when hit 'Go' button then it will be check that either session is in set or not. if session is empty or unset then a div (loginWin) will be shown. i am very confused please help me. thanks in advance. Html Code: <? session_start(); ?> <input type="button" value="Go" onclick=" userValidate()" /> <div id="loginWin" style="display:none"> <iframe style=" position:absolute; top:200px; left:300px;" id="framSrc" width="500px" height="400px"></iframe> </div> <script> function login(){ $("#framSrc").css("src","login.php");
Using code on specific pages
I'm trying to set up my external js file to use page routes, so certain functions will only execute and be called on page which they are routed to. I have the route working when I need the code to work on only one page for example: route.add('example.aspx', function () { // code to execute on example.aspx }); But I would like to have some blocks of code accessible on multiple pages. for example: route.add('page-one.aspx', 'page-two.aspx', function() { // code to execute on page-one.aspx
jquery.com does not work
Hi! Why jquery.com does not work? I cant load this site. All peoples in my LAN cant load too. 46.172.66.94 my IP. I asked my internet provider, They told I must write ticket in support jquery. Thanks!
Check a checkbox
Hello, I am very new to jQuery. I check and test some examples from a jQuery book. In one example there is a list with a checkbox and a label. If you click on the checkbox the item is removed. My question is: The item is also removed if you click on the text (label) not only on the checkbox. Is it possible to make the click event more "exact"? I want that the user have to click on the checkbox, to remove the item, not also the label. Is this possible, and how? <li id="my-1386340707583"> <label> <input type="checkbox">
.ajaxSuccess, .ajaxError
Using .click, when I click the button it calls a wrapper function I have in an external js file which does a $.ajax call. If the PUT request was successful, I want to display a message in my current document. My code looks like: $("input[value='update']").click(function(event) { ...... callMyWS("PUT", url, bodyData) // wrappe has call to $.ajax $(document).ajaxSuccess(function() { alert("http request successful!"); }); $(document).ajaxError(funtion() { alert("http request unsuccessful!");
changing span id html
I am trying to change the html of a span. Here is my code: $("'#"+spanName+"'").html('<img src="images/image.jpg" width="20" height="20" />'); It does not modify the html though.
Jquery Conflict
Hi All, Jquery code conflict with another library. I am try to add jquery thumbail scroller is conflict with Dropdown Meu, Tab Menu. Two link is given below for yours reference. 1) DROPDOWN &TAB is WORKING JQUERY THUMBNAIL SCROLLER IS NOT WORKING WEB LINK 2) Jquery Thumbail Scroller is working STOP working DROP Down Menu & TAB WELINK Please HELP
jquery class selector getElementsByClassName
Hi all, I know that jquery is the library of javascript. In jquery, I had the script using the class selector ( $(.class123) ) which is work well in IE8. In the official website, it mention that it would support for IE6+. But when I use getElementsByClassName in IE8 which is not work. I checked that IE8 is javascript 1.3 and do NOT support getElementsByClassName. Here is the question ? 1. Do jquery use the javascript native command, such as getElementByID or getElementsByClassName behind ? 2.
jquery.find ... and ... Array index ... not working together ..... Object #<HTMLFormElement> has no method 'find
hi i do something wrong but i have no clue what what's wrong with it.. // it get 3x .formResponsive $objc = jQuery(".formResponsive"); $objc.each(function(i){ // 0 ist just for testing if(i == 0){ jQuery(this).find('input[type="checkbox"]').change(function(event) { cal(i); }); }); function cal(intr) { \\ something goes wrong with intr.. i get the error : \\Uncaught TypeError: Object #<HTMLFormElement> has no method 'find' \\ even if
Uni Assignment Using jQuery plugins / scripts issue?
Hi All, Be gentle with me, total newbie here but hoping to find somebody who can help me make sense of a few issues that I'm having. For an upcoming Uni assignment we have had to make our own designed website and whilst it's not anywhere near the best, let's not get in to the thoughts about this aspect... I'm no professional lol! However, I've added a couple of scripts to enable me to do a few nice things for this assignment but for some reason, the two pages that I've added these scripts on, it's
Attach event handler to jquery object
Hi guys, Just started using jquery :) I want to create an html element wrapped in a jquery object like so... var s = $("<select id='resType'>" + "<option value='Yes'>Yes</option>" + "<option value='No'>No</option>" + "<option value='NA'>N/A</option>" + "</select>"); And then attach an event handler for when the selected index is changed, like so... s.change(function () { alert("!"); }); This code doesn't work (in chrome and IE
undefine variable in ajax
i am posting hCenter div's html in result.php page. i tried it val() also but error is head not defined. function headerT() { valhead = ""; valhead = $("#hCenter").html(); alert(valhead); $.ajax( { url: 'result.php', type: 'post', data: "head="+valhead }) .done ( function (msg) { }); } result.php echo $_POST['head']; please help me
change text color
Hi, if the field I have class="required", the text inside the box is red, how can change it to black? <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="/js/jquery.validate.min.js"></script> <script type="text/javascript" src="/js/additional-methods.js"></script> <cfinput type="text" name="name" id="name" value="#variables.fname#" class="required"> thanks
Using Ajax Call in Calendar
Hi Guys, I have the following code, to get a list of data from a web service call and put them into a calendar. I tried debugging it and the data returns fine ... but it's the rendering part which I am not sure how to get it working. So what I am trying to do is loop through this data and put them into a string list and then put that list into the calendar call. Can anyone see what's wrong with this? $.get('/WebServices/HttpHandler.ashx?action=GETMATCHES&year=2014', function (results) {
Progress bar in installing game process
I try to upload fale(game.swf) from another webserver to my webserver, and that is not problem. Problem is create progress bar to track copying files process, or more precisely, the calculation and display the value in percentage, of file that i currently copied from other webserver to my webserver (alredy have full size of file variable) This is what i do for now. ----------------------------------------------- after clik on install buton (div element) jq.js file $(".button").click(function ()
Looking at href values of children
Hello! I am trying to apply a specific class to an ID if the href values of any of the children are equal to the current URL, in this case a list of links in a menu. Here is a part of the relevant HTML and the jquery code I am trying. Any help will be greatly appreciated!! <!-- notice the ID on the li - "aboutsection" --> <ul id="mainnav" class="nav navbar-nav"> <!-- About --> <li class="dropdown jsb-fw" id="aboutsection"><a href="#" data-hover="dropdown"
Accessing a variable inside an event handler
I often encounter a problem where I generate a value in an anonymous function and outside of it I have a listener for an event, say .click. In hte .click handler I want to access that generated value. So far I have been using that value as an attribute value and accessing it via selectors, but there's got to be a better way to do this, no?
jQuery access text file from multifile zip
Hello, I am new to jQuery and I am searching a way to load a text-file into a string, where the text-file is stored on the server in a multifile ZIP with a directory struture inside.(Reason: Lots of textfiles with less space on the server and easy maintainance) Also a fileexist-check would be great and Password support of the Zip. Is this possible or must I pepare serverside-unzip for example with PHP first? Regards Hans-Peter
Jquery. Change element id
Helo, I try to change element id and then do something with it. This script changes id, but click not works with it, I dont understand why. Thanks for help. $('#some').hover( function(){ $(this).attr('id', 'new'); } ); $('#new').click( function(){ $(this).fadeTo('slow' , 0.2); } );
jquery setinterval
Hi i'm new to this post and i'm currently studying jquery. I have a jquery book and have been following it's examples to the T. but i've come across a problem when it talks about setinterval. The my coded example simply just doesn't work. I typed it word for word, letter for letter and it simply doesn't work. I've tried it in chrome and explorer, been trying to figure out a solution for some time now please help. Thanks. Here is the js code: $(function(){ var $green = $('#green'); greenLeft = $green.offset().right;
Dropdown filled using $.ajax call
I have a dropdown whose options get filled dynamically: var dropdownMenu = "<select id=\"NRdropdown_" + i + "\" onClick=\"populateDropDown(" + i + ")\"><option>Existing Blocks</option>" populateDropdown(dropdownNum): 1. Makes the ajax request 2. Parses the json response for the option values into an html string called optionsHtml 3. Replaces the inner html of the select element with the option values via: var dropdownSelector = "#NRdropdown_" + dropdownNum; $(dropdownSelector).html(optionsHtml)
jquery slide show
I have a jquery slide show that pick it's images like below, <script type="text/javascript"> //some code // slides: [ // Slideshow Images {image: 'kazvan-1.jpg', title: 'Image Credit: Maria Kazvan', thumb: 'kazvan-1.jpg', url: 'maria-kazvan/' }, { image: 'kazvan-2.jpg', title: 'Image Credit: Maria Kazvan', thumb: '/kazvan-2.jpg', url: '/maria-kazvan/' } // some
code running before fadeIn() & fadeOut() complete
Simple newbie question as I start learning jQuery. I am experimenting with a simple "marquee" that fades in and fades out each element of a string array. To make it perpetually looping I follow the array traversal with a setInterval( ) to repeat the marquee function. 1) the loop executes only once even though setInterval( ) is called (verified in Firebug debugger) 2) the "third string" is displayed all three times through the loop 3) other code inside or outside the loop (as in the 'alert( )' example
Scrolling Selection not registering
Hi Guys, I've got a selection list made up of divs, that I had problems with getting to show, so I used overflow-y:auto to get it to scroll. You can see the selection items, by clicking the Search.. input box. BUT, now when scrolling beyond the first 4 items showing, when you click, it doesn't register the selection. Can someone help me figure out what needs to be done to allow selection throughout the entire list. Demo: http://www.partiproductions.com/searchertest2/index.html Thanks, Bill
link doesn't work from placed html (scope?)
Clicking button1 works. Button2, which is placed by clicking a div doesn't work. Is this a scope-problem? Is there a workaround for this? thanks, Albert $(function() { $(".OK_button1").click(function() { alert("OK_button1 clicked"); }); $(".OK_button2").click(function() { alert("OK_button1 clicked"); }); $("#clickdiv").click(function() { $("#clickdiv").html("<form><input type='submit' value='OK_button2' class='OK_button2'/></form>") }); }); <form> <input type="submit" value="OK_button1" class="OK_button1"/>
Do something after scrolling certain distance from any point on the page
Hi all, I have a fixed position navigation which opens from the side of my page. I want it to close when the user scrolls 300px in either direction from whatever position they are on the page. i.e. they could be at the top of the page or somewhere in the middle. So if the nav is open and the user scrolls 300px (in either direction) a class is removed from the nav. I've tried using the WayPoints plugin and scrollTop but these seem to reference elements which are at certain points of the page so it
return from each
Hello please help to solve the problem. I have this type of constructions. That geting id from the link clicked. (front & back values). Construction bottom getting wear types (tshirt, etc). $('.side a').each(function() { $(this).on("click", function() { var sside = $(this).attr('id'); }); }); // I need sside here. How to return it? $('.wtypes a').each(function() { $(this).on("click", function() { var stype = $(this).attr('id'); return stype; }); }); // I need stype here. How to return it? I need
$(this + "option:selected").attr("rel") option selected is not working in IE
The code below works perfect in Firefox, not in IE8 :( any fix is appreciated! <script language="javascript" type="text/javascript"> $(document).ready(function(){ //var imgpath = 'images/sandles/'; $("select.swatchesList").bind('change', function(event){ var img = $(this + "option:selected").attr("rel"); $('#HeroImage').attr('src' , img); });
Putting PHP and JQUERY/ajax together in a web project
This is a question for PHP programmers who have added JQuery to their projects, I think a lot out of there. I read quite a few books on both PHP and JQUERY but still have my own doubts on how to properly "assemble" a web project using PHP + JQUERY. I am quite a noob specially on JScript and this means a whole new world to me, and I love the separation of style and behaviour proposed by the non obtrusive model. So I have basically PHP pages (could be html but PHP gives me more possibilities like "picking
Where can i download this file jquery.ui.menubar.js?
Where can i download this file jquery.ui.menubar.js?
how to do this?
Hello, how can I do this slideshow please?? any ideas? thank you :??? example of what I want to do http://www.mamaye.org/ Houston Web Design
Trying to submit a post via $.post when page loads
Greetings to everyone. My very first post to these forums. And my sincere thanks in advance for anyone who can help me solve this since I am "days new" to jquery. I am trying to come up with a single sign-on solution for my web site. Thus far I have a php document that verifies the user name and password that gets submitted to it, then passes those credentials to my forum software via the vendors own provided auth method, but the last step eludes me. I am trying to pass the same credentials to
Executing script inside a dynamically loaded div
Hello all, I'm extracting a div from some large HTML that contains normal HTML and scripts. If I use e.g. $div.replaceWith($newDiv); ...the scripts don't get executed. Same with html($newDiv.html()) How can I get the scripts to execute? Thanks in advance and kind regards
Not sure what I am missing here
I have been developing in php for about a year now, and i just started working with javascript and jquery. I believe were my problem lies is the variable scope, but i am not too sure whats wrong var x = 'test'; $(document).ready(function(){ var func = function(){ return { trigger: function() { x = 'yay'; }, display: function() { return x; } }; }; var result = new func(); $('#click').click(function(){ result.trigger();
Onclick open page and dynamically select filter option
Hi, I'm a novice. i would like to know how to put a jquery on my site so that when you click on a link it opens another page and selects an item from the unselected links of a ul filter list. Hope that's not too much to ask? Thanks I have this so far but does not seem to work: var s = $("#idF1SelName").val("France"); $("a.track[rel='s']").trigger("click");
matching images
hi, i am trying to match images. this one works fine only with same images but i want to match unidentical images based on their id or src below is the working code for similar images jsfiddle.net/GquLr/ now when u click two images which are similar it wil hide or vanish. now i need to design for non identical images.lets say for example Match 1 : UK,London Match 2: USA,Washington now for match 1, 2 both are different images and i want it to happen the same as before with different images as well.
how to make jquery autocomplete in drop down
Hi, I have a form having one html drop down (firstname,lastname and full name). I am trying for jquery autocomplete. demo is here So when i select the firstname then the autocomplete will only work for firstname. Suppose full name is "john kerry" and if from the drop down firstname is selected then when you type jo in the search field then it should show john and similarly if lastname is selected and if ke is typed then it should show kerry. Please tell me how to do ? if there are any alternate way
How to get hidden field array values
I have multiple hidden fields of the form <input type="hidden" class="mail-contacts" name="to[]" value="abc1"> <input type="hidden" class="mail-contacts" name="to[]" value="abc2"> <input type="hidden" class="mail-contacts" name="to[]" value="abc3"> Number of hidden fields can be different for different cases. How can i get the values of these hidden fields ? As this is an array so can't get it with document.getElementById('') I need to get the values of these hidden fields and then pass it as query
Next Page