jquery stops working after php page posted
I added some jquery to my php page to 1. do some simple validation before the page gets posted and 2. I have a button called Reset that clears some fields and submits the page. Both work fine, that is to say if I load the page and click the submit button and the appropriate field/s is not valued I get an error message. If I click the Reset button, the page does resubmit. If I click the submit button and all validation criteria is met, the page does the post back I get the correct results on the
en: View 'div' by clicking on a 'LI'. //pt: Exibir 'div" ao clicar em uma 'LI".
--- Translated by Google to english -- I have several elements "LI". Within each element, have a "div" with a class, I want that when you click on the element "LI" display only "div" of "LI" that was clicked. --- Original in portuguese -- Tenho vários elementos "LI". Dentro de cada elemento, tenho uma "div" com um class, quero que, quando clicar no elemento "LI" exiba somente a "div" da "LI" que foi clicada.
How to capture href event in a table row with multiple href's
I have a table structure which contains several href elements. One of the href elements calls a delete function and I'd like to pop up a dialog to ask the user if they're sure they want to do the delete. How do you capture the href click event and how do I identify which href was clicked when you have multiple href's in the table line. Thanks, Tom <tr> <td style="text-align:center; width:5%;"><a href=xxx.php?StaffEditID=<? echo $StaffID; ?> ><img src=pencil.gif border=0</a></td> <td style="text-align:center;
Understand Module Pattern described in Code Organization Tutorial
Considering the last code fragment (reported below) about module pattern published in the Code Organization section of the Learning Center, I'm trying to understand some aspect of the module in the example: the variable declarations ($items, $container...) are separated by ";" while the function declarations (createContainer, buildUrl, showItem, ....) are separated by ","...why? Is there a bracket problem? why the name of the first three variables ($items, $container and $currentItem) starts with
Display (span) div id's when scrolling
im trying to display a div id when scrolling, when a div is 100px under the top id like it's id to be displayed. All divs have id's such as '1' '3' '5'. All divs do have the class 'post'. Second Question all divs have odd numbers which id like to display in 'pagnering-odd' can I make it so if 1 is displayed in 'pagnering-odd' then 2 is displayed in pagnering-even. best $(window).scroll(function() { $('.post').each(function() { if( $("#container").offset().top > $(this).offset().top )
return array
This is not at all about jQuery, but it came across in one of my jQuery solutions O:-) When I want to return an array there can't be new line immediately after the word 'return' but whitespace is OK. Is this syntax error? Or something else? I don't understand it, because everywhere I can add new lines and nothing happens. I've prepared example here http://jsfiddle.net/3CyVE/
event.target.name
Hi, event.target.name works only for <input> tags?
Problem with different jQuery versions for multiple jQuery PlugIns
Hey! Introducktion: I am new to jQuery, and I don't really know much about JavaScript. But I am creating a Website, and I relly like the things you can do with jQuery. Motivation: For my Projekt I want a Slide Menu and a Scrollbar. I've found some Demos and wanted to embedd them. The Problem is, they don't use the same jQuery version (i guess). They work fine single but if I add <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> to my HTML-Code,
concept of class in jquery
I want to know that what is the concept of class in jquery. How to declare them and add properties and methods to our class. and after adding how to access them, how to instantiate a class in jquery
I can't download - I get this on my screen -
/*! jQuery v1.8.2 jquery.com | jquery.org/license */ (function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase() I am having problems with my website after I upgraded to Word Press 3.5 , I can not edit the text of my pages - - text & pictures etc - oddly a few of my pages I can edit. Anyways the Gurus at Word Press said I needed the latest version of Jquery I have been trying
More efficient toggle
Hi all, newb questio, I know, but as I'm not very familiar with JQuery yet, can someone tell me if there is a more efficient way of writing the following code? jQuery(document).ready(function($) { $('.toggler').click(function(){ $(this).parent().children().toggle(); //swaps the display:none between the two spans $(this).parent().parent().find('.toggled_content').slideToggle(); //swap the display of the main content with slide action }); }); <div class='toggle_parent'><div
Trying to access JASON object
Below is a somewhat complex JASON string. I am having problem accessing the data within the object. function tryThis(){ var test= { "term0" : { "PrincipalTranslations" : { "0" :{ "OriginalTerm" : { "term" : "grin", "POS" : "vi", "sense" : "smile", "usage" : ""}, "FirstTranslation" : {"term" : "faire un large sourire, arborer un large sourire, sourire de toutes ses dents", "POS" : "vi", "sense" : "en montrant les dents"}, "Note" : ""}, "1" :{ "OriginalTerm" : { "term" : "grin", "POS" : "n", "sense"
Internal server error jquery and ajax json
i have following code using jquery and json <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Params.aspx.cs" Inherits="JQueryAjax.Params" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <style type="text/css"> .loading { background-image: url('ajax-loader.gif'); background-repeat: no-repeat; } </style> <title></title> <script src="jquery.js" type="text/javascript"></script>
function($)
Hey I am a beginner in jquery and I have found these in many places function($){ // what is dollar sign doing here.? } 2.$.fn.myfunction = function{ //what is fn here and y not to use directly function myfunction(){}? } 3. $.myvariable={ init://some code, error://some code, title://some code //I have seen such thing in $.ajax() function..Is this a way of object
ajax 405 error
Hey, I am new to Jquery(/ajax) and I am trying to make a google suggestion website where the user will input the string and the site will fetch the suggested data.My ajaxComplete function is executing but i am getting the following errors. "NetworkError: 405 Method Not Allowed - http://www.google.com/complete/search?output=toolbar&q=america" this is my code. <script type="text/javascript" $(document).ready(function(){ $("#submit").click(function(){ var suggestion=$("#search").val(); $.ajax({ type:"GET",
How to know the row
I have an ASP.NET gridview and a bound field with an HTML link. And I wanna know how to find which row is clicked and extract its data out of it then send it to the asp.net c# code behind? Also, I would like to know which book can I buy or where can I learn more about how to code these stuff, like gridview and sending data between jquery and asp.net code behind? Thanks.
What tool can i use to test out my JQuery code?
Hello, i know this is going to sound funny, but what tool can i start using to test out my JQuery scripts or Javascript code in general please? Thanks! bk
Communication with a PCB via bluetooth
Hi, I'd like to make an android app that can communicate with a printed circuit via bluetooth. How can I do this?
Multiple getJSON methods - neither return
Was wondering if anyone has come across this problem (hopefully it is a problem and I haven't just overlooked something..) I have a javascript file that calls two different getJSON methods and appends the result(s) to the same list. The first getJSON method will work, and the code will jump to the function holding the second getJSON only if the second getJSON is commented out. When the second getJSON is uncommented, neither getJSON method works - as far as I can tell, it doesn't even fire off
How can I define dialog once and use it in Add and Edit methods?
Hi everybody, I have the following code in my Add button $("#sform").dialog({ autoOpen: false, show: "blind", resizable: true, width: 1200, height: 750 }); $("#sform").dialog("open"); And I also have very similar (although not entirely working) code in the Edit button (the difference being that in Edit I try to Load different content into the form). For now my question is - how can I create a variable holding the definition of that dialog and how will
Append text in textarea
Dear All Help me to resolve this I have two fields input and textarea i want to use this as follow if some text is entered in name (input) ... say 2/3 on blur I split this and i want to display 2/3 2 as superscipt divided sign or / sign and 3 as subscript as defined in JQUERY http://jsfiddle.net/5aeqa/4/ JQUEY $("#name").blur(function () { var name= $('#name').val(); var substr = name.split('/'); var mstring= "<sup>"+substr[0]+"</sup>"+"/<sub>"+substr[1]+"</sub>"; $('#container').append(mstring);
New to jqeury: question how to add an autofilter row to a page in an iframe?
Hi there, This might be better in the "using" forum, but this is my first turn at java scripting, with jquery in particular. I've the book "Jquery Novice To Ninja" and a general HTML/CSS/JS book as well (teaching myself to create better web pages at work). What I'm doing: I have a web page (not on a server, I call the .htm direct) and inside of this is an iframe. When I click on a menu items in my main web page, various different web pages come up in the iframe. These are ones I've created
.load() and character encoding problem
Hi, I load a php file like this: .load('dialog_modules.php', { 'p_module_id': module_id }, function() { $('#dialog .ui-button').button(); } ) .dialog('open'); But in the dialog the characters get odd. If I set in dialog_modules.php this header: <?php header('Content-Type: text/html; charset=windows-1252'); ?> It works for the html text but then data from the database look odd which looked good without the php header so setting this header is not good at all. I have set everything to utf-8.
Will JQuery Support the Chart, is any jQuery library for Charts
Hi Please me on this.
function (data) { response(data.d); }
$('#<%= txtSearch.ClientID %>').autocomplete({ source: function (request, response) { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "WebService.asmx/GetAutoCompleteData", data: "{'kwrds':'" + $("#txtSearch").val() + "'}", dataType: "json", success: function (data) { response(data.d);
How to select all combo boxes whose id starts with cmd?
How to select all combo boxes which id starts with 'cmd' ?
How to do this using jquery instead of CS flash???
Hi. I would like to know if it possible to do this using jquery to retrieve data from my database and presenting in my web page like the flash I attach. I'm getting problems using flash (beside being very slow) so I want to change it. The idea is to use each button in bottom (NOV, ABC, ...) to show different types of information and in movement. Anybody knows if there is something slightly similar to use it or adapt it. Here is the swf and html page (Flash CS5): https://dl.dropbox.com/u/66063007/FLASHJQUERY/todoinjquery.rar
jQuery, Java - Struts and Eclipse Integration
Hi I am new to jQuery. I am in need to develop web site using Struts, JSP, Servlets, AJAX and MySQL with eclipse juno IDE. I just google about jQuery and that brought me here. I need to create a good web page designs and then integrate them with above mentioned technologies and IDE. Do jQuery support such development or it is just an extended JavaScript? If so can anyone guide me for the same.
I need an explanation about a mechanism..
Hi, this code below shows those both alerts when the option selected in a select widget changes, but, thanks to the last change() it also throws "1" when the page is loaded. <select id="jander"> <option id="foo" value=1>1</option> <option id="bar" value=2>2</option> </select> $('#jander').change(function() { if ($('#jander').val() == 1) alert("1"); else alert("2"); }).change(); This works perfect for me, but..can someone explain the mechanism why the second change()
method "scrollIntoView()" bubbles up to other divs
Below is an shorten version of the problem code. <div id="data" contenteditable="true" style="overflow: auto; "> <p id"spanish">some words here</p> </div> $("p#spanish").get(currentLyric).scrollIntoView()<div "data"> has the attribute style="overflow: auto; " and is always visible, but it's content is not. This code does make the content of the <p> tag visible, but bubbles up to all other <div>s and cause causes the whole page to jump. Any suggestions? Thanks,
How to draw a wave graph using jquery and a slider to increase graph size
I am really new to jquery,I need to draw a graph which is wave shapped,the first half of wave only,when i slide the wave should expend the xaxis and yaxis,is tht possible.whether there are any plugins for tht? Thanks & Regards, Nithya
Form hide and show a part.
Okay I've been messing around with this for a while but I cant get it to work. What I want is to show a <tr> when a specific value of <select> <option> is selected. I got this code so far: <script> (document).ready(function(){ $(form select option[value='specified_range']).focus(){ $(".appel").show(); }else{ $(".appel").hide(); } ); </script> <select name="walk_mode" id="walk_mode"> <option value="freeroam">Lopen</option> <option value="stand">Stilstaan</option> <option value="specified_range">Beperkt
script not working in 1.8, but same working in 1.7
$('#a a') .css( {backgroundPosition: "-20px 35px"} ) .mouseover(function(){ $(this).stop().animate({backgroundPosition:"(-20px 94px)"}, {duration:500}) }) .mouseout(function(){ $(this).stop().animate({backgroundPosition:"(40px 35px)"}, {duration:200, complete:function(){ $(this).css({backgroundPosition: "-20px 35px"}) }}) }) Anyone please tell why? Thanks
How to grab css values from html code inside a string?
Hi, I am using Ajax and PHP to send back an array of divs generated. The divs css height value is auto. So, what I wan to do is grab the height value and then adjust the top value. How can I do this? ajax will return a jason to javascript. I know I can access them like an array. However, I can't figure out how to grab the css values? Also how can I get the height if the css height value is auto? Is there a way to figure out the height? I need to know the auto created height value the browser
Noob question - read from csv into nested list (I think)
Hi all I am trying to build a simple app to load csv data from my server into what I think is called a nested list. I initially want to display data from only one field, which will slide across into the full record when selected. I can read the csv with some php and ajax to output a table: http://www.glengilchrist.co.uk/csv/table.html What I am looking to do is to convert this into something That looks: Screen 1 Staphylococcus aureus (MSSA) Staphylococcus aureus (MRSA) Streptoccous pneuoniaeA
[New] Can you explain how and where to edit this code?
Looking to make a directory type site, and I've never worked with jquery before other basic languages yes. Example of the code: http://razorjack.net/quicksand/ What I want it to do is instead of the organizers "Applications" and "Utlities" i wanna change them to something else and add more. I also would like to add more and edit the things that go in each, and would like to make them clickable and change the icons. I am just not sure which parts of the code do which, and leads would be appreciated.
Does $.post() NOT convert json string to json if the response Content-Type is "application/json"?
I'm a long-time programmer with detailed knowledge of Javascript, but not a lot of practical experience with it. I'm going through "Pro JQuery". One of the first Ajax exercises in the book doesn't work correctly, because the author assumes that "$.post(url, data, func)" is going to automatically convert the response to a Javascript object, under the implicit assumption that the response's Content-Type is "application/json". It seems logical to me that it would, but that's not happening. It appears
cant access video "duration" property
Using the code below I am not able to access the "duration" video property . alert($("#videoScreen").attr("duration"));Im able to access all of the properties and methods of the video element. Please comment. Thanks
Problem with links in Internet Explorer 7
I'm using "couponpress script" but the link that copies the coupon and opens the URL does not work in IE7. What can I change to make it work? ZClip: http://www.steamdev.com/zclip/ Example: http://couponpress.premiumpresslimited.com/8-off-and-12-cashback-2/ Code Example: <strong class="" id="coupon_code_feat_45200">10AFF30PFTS</strong> <script language="javascript" type="text/javascript"> jQuery(document).ready(function(){ jQuery('#coupon_code_feat_45200').zclip({path:'/ZeroClipboard.swf', copy:jQuery('#coupon_code_feat_45200').text(),
Jquery Form Builder?
Hi, can anybody tell me about any form builder in jquery like http://www.jotform.me/.. waiting for your reply. thanks in advance
Next Page