Help needed - Updating div.innerHTML from textbox contents onKeyUp
Hi all, I'm new to jQuery and was wondering if anyone could help me on this problem i have??? I want to update the inner HTML of a div from the contents of a textbox once the user has typed in a letter. I have done it in javascript but want to convert it to jQuery. Here is what I have done. <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
Ajax POST request
Hi @all, I've got a "little" problem that kept me busy for the last hours and i still was not able to solve ... First the situation. I've got two different servers. Let's call it x (a browsergame) and y (my site which is a tool for this browsergame). Now I want to transfer some data (equipment of the character) from the browsergame (server x) to my tool site (server y). This is done via a Javascript script that is run in the url field of the browser. The first Idea. Was to take all the inventory
$.append not working?
I'm not sure why I'm having this problem. I have a div, and when you click a link it loads new content into it. So.. 1) you click the link 2) I'm using $.getScript to load any extra js for that page 3) once that's loaded it loads the page into the div 4) in the js file that was just added I have "$(document).ready(function(){" so when the page has loaded it will $.append a few things inside the div What's weird is it only seems to work half of the time. I've also put something simple like alert('')
Parent & jQuery
Hi, All. There is a jQuery-code: $(".slider").click(function() { alert( $(this).parent("table.question > tr > td > input").attr("name") ); }); and DOM HTML-code: <table border="1" width=50% > <tr> <td> <table border="0" width=100%> <tr> <td colspan=21 align=center><input name="001001" type="hidden" value="1001" />1. Не везет, так не везет...</td> </td> <tr> <td> <div class="slider-container" style="width:500px; margin:auto; vertical-align:top;"> <div id="slider_1" class="slider"></div> <div class="scale"></div>
Detecting Handlers of a jQuery “Live” Event
Using: $('#foo').data('events').click We are able to access an iterative object of click handlers added to the element '#foo' but only when they were added with .bind() Is there a way to get the handlers for an event added with .live()? Is there any other way to know if an element has a click handler assigned?
.hide(function(){ $(this).focus?
I would like to hide a form element by default and then show it when the area of it is clicked or gains focus. I tried this but I'm clearly missing something upstairs: $(function(){ $('.detailsRow select').hide(function(){ $(this).parent('li')focus(function(){ $(this).find('select').show() }); }); }); This is the html: <ul class="detailsRow"> <li class="col1"> <select name="service" style="width: 170px;" type="text" id="service"
problem with asynchronous HTTP GET requests
Hey to all! This is my first post here! I have used this forum a lot of times for some problems that I had with jQuery. Now it's time to make my first question :)) here it is: I use the ajax library to make some asynchronous HTTP GET requests. What I want to do is to make asynchronous requests with different inputs and to integrate the results into the HTML whenever they'll come. Here is my code: var params=new Array(); params[0]=2; params[1]="type_3"; $.get('http://localhost/my_page_1.php', params,
Send Form and Redirection
i have this code , the form using jquery works fine , but i want if the response of ajax when send form it´s yes redirect and no works , i put here the code i hope some help about this , thanks for all <script> $(document).ready(function(){ $('#button').click(function() { $.ajax({ type: "POST", url: "result.php", data:$("#form1").serialize(), success: function(respuesta) { /// Don´t Work when call other page in php the response it´s yes /// switch
jQuery two scripts-conflict! Please help!
Hello everyone.. I am no jquery master;) I will say I am a total newbie. And there comes the problem. Website works fine ( test website-not alive yet : " http://www.martaspendowska.com/test/ " , if : ONE: <title>Marta Spendowska / Art + Design </title> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/easySlider1.7.js"></script> <script type="text/javascript" src="js/slider.js"></script> <script type="text/javascript">
Hide Multiple Divs
Hi there, I made this small piece of code, and i think i made it in a very drawn out way. I am sure there is a lot quicker way to do it. I want all divs to be cleared that are in a certain div. So when one link is clicked, the visable div is replaced with the new one (depending on the link) here is the code i have done... $(document).ready(function(){ $(".untitled1link").click(function(){ $('.untitled1, .untitled2, .untitled3, .untitled4, .untitled5_1, .untitled5_2, .untitled5_3, .wall, .lightswitch,
Lookingo for suggestions on cleaner code
I recently wrote some code to handle a situation on a site, and I'm pretty sure it's not the prettiest jQuery code. I'm posting a description and my code here (it's not too long) in the hopes that someone can review it and give me some suggestions on how I might make it neater and more efficient. Here's the situation: This screen shot shows the starting point, and this one shows the resulting HTML. What I need to accomplish from a display standpoint is this. The two new icons added switch between
Best method for creating a video panel
I'm working on a design where the page has a large video panel. Below the video panel will be a selection of thumbnails of available videos to play. The way it should work is the user clicks on a thumbnail and it will load the video in the panel without refreshing or going to a different page. I had a look at partial page update techniques but wasn't able to find anything relating to loading embedded YouTube links - would a partial page update be an ideal way of accomplishing this task?
Can .change handle immediate text changes?
Ok, I am really confused. Everywhere I search, I keep bumping into $(this).change method. I would like an event to fire every time text changes inside <input type="text" /> element. Meaning a user types in a letter, and the even fires immediately. Is .change the wrong thing? Because it seems to fire every time the focus is lost, or gained and the text has been changed. Is there anything that can run as soon as any letter is added/removed from input text? Thank you.
AJAX doesn't work on Chrome Dev ( 5.0.375.53) ?
<!DOCTYPE HTML> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>M</title> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("jquery", "1.4.2"); </script> </head> <body> <div id="main"></div> <script> $(document).ready(function() { $.ajax({ type: "GET", url: "l.html", success: function(data){ alert(data);
.slice not working as expected
Hi all, I'm trying to get the 6th to the 11th checked checkboxes in a list of 12 by using slice, and it doesn't seem to work. gThroughK = ($('[name="'+obj.name+'"]:checkbox').slice(6, 11).is(":checked").length > 0)Each time they click it should update, but I keep getting "false" no matter what. What would be better is if I can use CSS selectors in an expression, like gThroughK = ($('[name="'+obj.name+'"]:checkbox:(gt(6) && !(eq(11))):checked').length > 0)Any thoughts? TIA, Eggers
Superfish Menu Help
Hey guys, I've created a superfish menu with a nav-bar style. The only problem is that it is not stretching to my site's width of 800px. Here is a link to the site: http://130.86.248.161/joomla/ I believe it may work for some browsers, but i know it doesn't for firefox and safari. Some browsers has the slideshow that is set to the module position under the navigation as being aligned with the navigation. So im hoping if i figure out the width problem it will also fix the slideshow position problem.
How to place a variable value within a selector? (Dynamic ID values)
Hello all. I have the following that works just fine. If the div ID includes the string "targetDiv" then alert. $("div[id*='targetDiv']").click(function(){ alert("found the div"); }); Now I would like to make the string for which it searches dynamic. I tried this var idTarget = "targetDiv"; $("div[id*=idTarget]").click(function(){ alert("found the div"); }); I am replacing the hardcoded string value of "targetDiv" with the variable of idTarget whose value is "targetDiv"
Datepicker using dialog method - on the iPhone
Hello there, I am trying to implement a version of the datepicker. However, I would like the calendar to open in a modal dialog box rather than sliding open next to the text box. This is the closest example I've been able to find, but there are a few issues - I would like the user to click on the text box to change the input, and obviously the small input box in the corner of the calendar is a problem... http://www.java2s.com/Code/JavaScript/jQuery/Displayadialogtoholdthedatepicker.htm Anyone have
Help with changing a char color
I want to use a timed function (with setInterval()) in order to change the color off the chars in a word. I use jQuery fadeOut() and fadeIn() effects. In Firefox this works good, but in IE 6 don´t... the last char didn´t appear !! Can anyone give me a help ? Functional link : http://destaque-cia.com.br/daimaru/colore.html The code is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="pt-br">
how to use the ajaxStart -- tried a few but still failed
Hi all, First I have to say I am new to JQ. I have search the forum and googled but all the solution that I found so far has failed. And unfortunately the JQ website on this is quite limited for me. The goal is: I have a few pages that consists of several ajax call in each page. I am trying to make a generic solution such that when the ajax event is being called, the user will be notified by the 'loading' image in the somewhere on the screen (cause the loading time quite long due to the data).
Question about inserting a tablerow
I do an ajax call to the server and now I want to update a table by adding a new row (which, conveniently, is json data returned by the ajax call.) Here is my success function from the call to $.post(): function(json) { if (json) { d = new Date(); d.setTime(json.date*1000); dateString = d.format('d mmm, yyyy'); //this is kinda ugly, how can I make it better
List checked items in a resultset
I want to list out all the items that are checked in a resultset. I current have this to display the checked items. $(function() { $('input[type="checkbox"]').bind('click',function() { if($(this).is(':checked')) { $('#mydiv').append(' '+$(this).val()); } }); How can i modify the code to remove the items from the list when it is unchecked? Thanks
What is the best way to handle onchange event on a div
Hi I would like to monitor the innerhtml change of a div, what is the best way to accomplish this since it does not have an onchange event. Thanks in advance Armand
Using Ajax to create a Plot graphic with a flot selection
Hi all, My first post to ask you if someone had ever met my problem. Here under the context : 1/ You have your main page index.php calling this function : <script src="js/jquery-1.4.2.min.js" type="text/javascript"></script> <script src="js/jquery.flot.min.js" type="text/javascript"></script> <script src="js/jquery.flot.stack.min.js" type="text/javascript"></script> <script src="js/jquery.flot.selection.js" type="text/javascript"></script> <script src="js/jquery.dataTables.min.js" type="text/javascript"></script>
Very simple JSON not working with Google json API
I'm using the below code to load a json feed from google which looks like this: // [ { "id": "14323395" ,"t" : "RBS" ,"e" : "LON" ,"l" : "43.68" ,"l_cur" : "GBX43.68" ,"ltt":"8:41AM BST" ,"lt" : "May 21, 8:41AM BST" ,"c" : "-1.14" ,"cp" : "-2.54" ,"ccol" : "chr" } ] Now this doesn't work because of the // and the square brackets [ ] - if I remove these it works great, but obviously can't change this. Any ideas how to get this working in jQuery? <script type="text/javascript"> $(document).ready(function()
Display tooltip for List Field Header in MOSS 2007
Hi, I have a requirement as below, I need to show a tooltip for a list "field(column) header" and not list items level. Since, the field description can be seen only by users with edit permissions, i need to show the description of the field as tooltip for all read-only users of the list, when user hovers the mouse on list field header. Could you please check and help me on the same? Thank you.
Check if all radio buttons are checked
Hi there, I have a form with x questions (the questions come from a database, so the number of questions is variable). Each question needs to be answered with a number form 1 to 10, I do this using radio buttons. The name if those radio buttons is "name" followed by the id of the question in the database. Because the name is variable and the number of questions is variable, how can I check if all the questions are answered i.e. one radio button must be checked for every group of radio buttons. I
Question about .delegate
Hello all, here is my Testcode: <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <table id="idTable" border="1"> <tbody> <tr> <td>foo</td> <td>bar</td> </tr> <tr> <td>foo</td> <td>bar</td> </tr> </tbody> </table> <script language="javascript" type="text/javascript"> $('#idTable').delegate('tbody > tr > td:nth-child(1)', 'mouseup', function(event) { alert('clicked td'); return false; } ); $('#idTable').delegate('tbody > tr', 'click', function(event) { alert('clicked
$.ajax work around
$.ajax({ type: "POST", url: "index.php?mc=projects&sc=add", data: {domain:domain, ownerid:ownerid, supervisorid:supervisorid, startDate:startDate, pname:domain}, dataType:"html", cache: false, success: alerts an error if domain has already a duplicate else returns true; });
Accordion changing specific DIVs or paragraphs
Hello everybody, I was wondering if it is possible to make the Accordion toggle specific DIVs. Right now it is just changing the PARAGRAPH which follows up the H3 right? Unfortunately I would like to place the H3 below the DIV which should be changed. Is there any way to do so? Greets and Thanks Ralf
HI Friends
From morning im trying this Please help me out I have a <input name="Selected_0" value="" /> Note: the HTML control don't have the runat="server" not a server side and i have <asp:TextBox ID="txtgetvalue" runat="server"></asp:TextBox> Note: this is a server side now the situation is i have 1-80 number of selection im passing the value to the input through the javascript but at the same time i need to pass the value to the server control i.e, <asp:TextBox ID="txtgetvalue" runat="server"></asp:TextBox>
Problem with script in Internet Explorer 8
hi, i have a problem with my tiny jquery script that interacts with jw media player. on initial load of my page it adds functionality after player has been embedded. i add this functionality with this code: jQuery('document').ready(function() { // find the embedded player ... // add javascript functionality to the external player control setTimeout( function() { jQuery('#playlist li').click(function() { player.sendEvent('ITEM', Number(jQuery(this).attr('id'))); });
Defining dynamic selector with variable
How can I dynamically specify a class value to use in a selector? For instance, I have a number, and I need to identify an element that ends with that number. In this case, there are four divs that have class values of my_id_0 my_id_1 my_id_2 my_id_3 I have a 0 (obtained previously in the code) stored in the value tabId, so I want to get the values of the class attribute for <div id="my_id_0">. How do I create my selector? I tried $("div# parent_element_id #my_id_" + tabId).attr("class"); but
Delete row table if checkbox not selected
Hi, First of all sorry for my bad english. My problem is that I have a table with a column of checkboxes. When I click on a button I want to delete the rows with a checkbox unselected. My script is that: $("#btnChecked").click(function() { if($("input.GarClaCheckBox[type=checkbox]").not(":checked")) { $("div.GarClasDiv tr.Clausola").toggle(); } }); });Can you help me? Thanks...!
How to listen for a window.location change?
Hey guys, I'm developing a website which includes sort of deep linking functionality. I've got some content in the url after the "#" symbol which changes and I want to listen for this change, so that I know when the BACK browser button has been pressed. Does someone have the answer ? Cheers :)
Problem with $.getJSON()
Hello everyone ... I'm new to jQuery and want to load JSON data from my server. I bought a video from Video2Brain to learn jQuery and tested some of the code delivered with this DVD. One of the codes was a tweet-reader for Twitter and I want to develop a small serverbased application for me and my friends with simlar function to learn how it works. But it doesn't work??? I uploaded some JSON-Files to my server and none of them could be used. The last file was one from the Video2Brain DVD -> http://www.frankniggemann.de/ajax.json
open jquery popup window
i m a developer of asp.net.. i have 2 form, default1.aspx and default2.aspx. i want to open default2 as jQuery popup window from default1 on click of linkbutton. in default2 there are two textboxes and 2 buttons that is OK and Cancel as and when i click the OK button the values in those two texboxes sholud be fetched and i want to use them in my original page(Default1) from where i opened apopup window is there any way..... thankx,
Revert/Reset method on elements?
Hi, I am modifying an image button as the page is used, by removing its onclick attribute, changing its title attribute, etc. Depending on further user actions, I would sometimes need to re-set that button and reinstate all those changed attributes back to how they were when the page was first loaded. Having modified an element using jQuery, is there a way to reset/revert it back to its original state? Thanks in advance. Paul.
jQuery and checkboxes
Hello, I'm making a jQuery script that will use the $.post() function to fetch another php file when a check-box is clicked. That other php file will perform a query to update my MySQL database and when the query is done it will send back another check-box. The problem is that when the query is done and the 'new' check-box is shown, well that check-box doesn't respond. I have this now as code: jQuery code: var checked = "y", depot = $('span#depot').text(), date = $('span#date').text(),
Running jquery once everything is loaded
I have a page which integrates certain third-party scripts. I need to simulate a click on a certain element once these elements have been loaded. Regular $(function(){}) doesn't work because it fires faster then these scripts load it seems. I was able to achieve success by deferring the click event using setTimeout(). However, I was wondering if there's a more elegant way of either firing up once the page is fully parsed or once a certain element carried by those third-party scripts got loaded
Next Page