Assistance needed with listview and passing data when clicked to a new page.
I have a list of items that is dynamically pulled from a web service. It looks like this: What I want to happen, is I want the list item that is clicked, to somehow be declared as a variable....and the information for the clicked item, to be passed onto another page. I have no idea how to go about doing this, and was hoping someone here can point me in the right direction. So far I have been able to come up with this, but the variable 'someData' keeps coming back undefined. $('#dogs ul').click(function(e)
Add Row to Table that shows in POST
I know this has been asked before. There are all kinds of answers on the web and I can add a row to a table visually. Works great!! But when I query the POST the additions are not in the POST list. My HTML markup is very simple, the action file has only 1 command when we test: <?php print_r($_POST); ?> <form name="receiptForm" id="receiptForm" action="printrl.php" method="post"> <button type="submit" id="saveprodsalercptbut" name="saveprodsalercptbut"><b>Save Receipt</b></button> <table id="rcptRepeatSection"
Vertical Moving Lines Effect
Hi, Can anyone tell me if it is possible to create a jquery effect like this flash one with vertical moving lines. http://olearypr.ie/ I am guessing it is as there is more more complex effects than this created by jquery but I just cant seem to figure out how to do it. Any help would be greatly appreciated. C
validation input file
hi excuse is there a way to get the properties of a input file such as(error,name,size) i mean the properties of a file when is selected or is there a plugin which help to validate input file where i can specify the maximum size and the type of file (.doc,.jpg,) for instance, thank you
Reinitialize after an ajax call - is there something better than manually calling the reinits?
Hello Well I looked through some posts, it seems there is no better option than actually reinit everything by hand. Am I right with this? e.g. something like $(document).ready(...) does not exist for an ajax load? I ask because the last answer was like 3 years ago to this subject - just to make sure, because it will be a lot of effort and testing for me now to do it this way. the ajax calls are done through a completely different framework (java JSF), so I can not profit from any jquery specialities.
jQuery used on half the sites on the web
Congrats and Job Well Done to everyone involved in creating, maintaining, adding on to, and just plain using jQuery!! For all the details, check this out: http://w3techs.com/blog/entry/jquery_now_runs_on_every_second_website Dave
[jQuery] Validation Plugin - How to Validate input="file"
I'm trying to validate that someone has selected a file for upload before submitting a form. I set the required class on the input element, but it's not being validated. The regular text input is validated, however. <form:form id="pictureform" commandName="pictureCommand" action="${actionURL}" method="post" enctype="multipart/form-data" cssClass="update"> <div> <label for="title"> Title: </label> <form:input path="title" cssClass="required" /> </div>
Possible jQuery issue in IE
Hey everyone, Only in IE, I'm getting this error: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0) Timestamp: Thu, 3 Mar 2011 15:55:34 UTC Message: Invalid argument. Line: 16 Char: 63945 Code: 0 URI: https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js Not sure if that gives anyone enough knowledge about what could be the issue, but any insight on where I should look would be greatly appreciated. Thanks!
how to loop a chained pattern?
Here are 3 chained patterns that I am trying to get compressed into "possibly" one line with the help of a looping mechanism like the each() method... $("#background1").css("left",(parseInt($("#background1").css("left")) - smallStarSpeed - PLAYGROUND_WIDTH) % (-2 * PLAYGROUND_WIDTH) + PLAYGROUND_WIDTH); $("#background2").css("left",(parseInt($("#background2").css("left")) - mediumStarSpeed - PLAYGROUND_WIDTH) % (-2 * PLAYGROUND_WIDTH) + PLAYGROUND_WIDTH); $("#background3").css("left",(parseInt($("#background3").css("left"))
how to retrieve a session variable ?
Hello, I'm new to the site and start with jquery. I like to know how to retrieve a session variable. I use the Spring MVC , below my code (controller + jsp) in the controller, I put my session variable model.addAttribute("tabDay", getJoursFeriescalendrierDefaut()); getJoursFeriescalendrierDefaut () return a list of string Int the JSP <script type="text/javascript" charset="utf-8"> var tabJoursFeries=${tabDay}; //not working alert(tabJoursFeries) var tabJoursFeries2=$(tabDay); //not working alert(tabJoursFeries2)
JQuery UI Dialog box- TOO WIDE when displayed on small mobile screens
How do I change the width of the jQuery dialog box? I am using it on a mobile website and it works fine for screens that are greater than 320x480. But if the screen is really narrow (like 240 wide), the box is too big for the screen. I use the following doc type. <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> This is the function that calls the dialog. function dialog2Button(title,message,button1,action1,button2,action2) {
ASP Scripts SRC Folder Not Working?
I can run this code fine using the Google URL for the SRC, but... <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function () { $("#<%=lblStatus.ClientID %>").delay(1500).fadeTo("fast", 0.0); }); </script> I cannot run the same code if I swap-out this line of code: <script type="text/javascript" src="/scripts/jquery-1.8.0.js"></script> It gets better, I can easily access the .js
[jQuery] UI/Accordion - Possible to deep-link?
Hi, This is probably a stupid question, but I've been scouring around trying to find an answer to no avail. Is is possible to have a hyperlink that links to the accordion on another page in such a way that it opens a specific accordion element? For instance, I have a page where I want to include an accordion where each accordion element is a different service offered by my company. On another page, I want to have a series of links, each one linking to a different element in the accordion, so that
Simple Fade and Hide Problem
Basically I am displaying a images in a row. Each image will have a mouseover and out event, like so function fadeIn(a) { jQuery(a).find(".thumbnail").fadeTo("slow", 0.7); jQuery(a).find(".thumbnailText").show('fast'); }The mouse over will show a div container which lies on top of the image. When I mouse of the image away from the area where the new div appears its fine. However when I move over the new div it repeatable appears and disappears. The reason for this I reckon is because its being read
Show Hide on mass level
I use the Show/ Hide .hover function but on a large scale and for 2 different things.. i was just wondering if there is anyway to shrink it... it's not causing a problem and works just fine but could potentially be smaller. however; one set of the script works from images hover and displays an infobox on the left side about the "company" the other, works on links and images, again showing on the left side (set position). if no way to shrink it thanks anyway :) $(document).ready(function()
Close button is not working.
Hi, I referred this website. http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/ I couldn't close the drop down list box while clicking the close button. I implemented it in my application. But close button alone is not working. Can anybody give me a solution. Thanks in advance.
getJSON
Hi, I have an issue with the getJSON method, here is the code of the jquery: $(document).ready(function(){ $.getJSON('../php/functions/user_info.php', {id: id}, function(data){ alert(data); }); });the php code at ../php/functions/user_info.php is: <?php require_once 'connection.php'; $link = conenct('localhost', 'root', '', 'w_db'); mysql_query( "SET NAMES utf8" ); mysql_query( "SET CHARACTER SET utf8" ); mysql_set_charset('utf8', $link); $id = $_POST['id']; $id = mysql_real_escape_string($id); $query
why :not(selector) does not working when we feed a complex selector to :not()
jquery: $("p:not(p:eq(0))").css("border","3px solid red"); html <p class="para1">This is paragraph 1:</p> <p class="a">This is paragraph 2:</p> <p class="para2">This is paragraph 3:</p> <p class="a">This is paragraph 4:</p> <p>This is paragraph 5:</p> can you please help?
background image replace?
i have a bgimage in the css definition like DIV#container_footer{ position:fixed; height: 128px; min-width: 1000px; width:100%; bottom:0px; background-image: url(../images/tin/footer_0.png); background-repeat:repeat-x; background-position: center bottom; margin: 0 auto; } and i want to change it in thsi function function changeTin (i) { var url = "url(../images/tin/footer_"+i+".png)"; $("#container_footer").css("backgroundImage","url("+url+")"); //$("#container_footer").css('backgroundImage',
Help adapting code for one slideshow so it supports two (multiple) on same page.
This code I found works great for one slideshow, but I need to have two side-by-side and I'm a novice, so I can't see a good way to do this: The page I am working on is here: http://www.nuancepress.com/nuance-press-announces-2-volume-collection-of-the-best-of-fantasy-and-horror-artist-d-x-stone/ There are two slideshows (#dk-ad and #lt-ad) and they need to function independently of one another. There is probably an easy way to do this but since I'm a total hack I'll probably end up duplicating a
Adding to Option element to table cell
I am novice to jQuery, and I had to do some small jQuery job at my hand, but i am unable to make it work. The thing is, the exisiting code is generating a modal popup containing table rows, with Option element(op1) which gets its data from DB, But I am adding a small filter to that Option value, So When I add a new Option element on its change, it just add to the first row, and not to current row. For instance the modal popup have 5 table rows to enter data for 5 people, and there is a dropdown
Apply background color to multiple td's when its id is known
Hi all, I have a jquery function which gets the id value of td's whose checkboxes are checked. I need to color those td's. I have written this function which does not give me any error but does not color the td's also.. Here is the function: $('#custom-interval-tbl td').each(function() { $(this).find('input:checkbox:checked').each(function() { var tdId= $(this).attr("id"); var tdElement = $("#custom-interval-tbl td").eq(tdId); console.log("D Element"+tdElement); tdElement.css({background:"#333333"});
Tabbing past Datepicker control
Hi, I am having a problem where I have to hit tab twice before my datepicker control will lose it's focus. No matter if you type in a date, or select a date from the calendar the next control won't gain focus until you hit tab a second time. The first time you hit the tab button the calendar disappears then the second time the next control with get the focus. The desired response is that the first tab will close the calendar and also move to the next control on the page. I am using jquery 1.7.2
How do I narrow down on this error?
I am using JqGrid to display a datagrid on my page. When I single click a row, it throws the following error but it lands in Jquery file. Timestamp: 8/15/2012 9:20:44 AM Error: TypeError: elem is null Source File: http://localhost/lavanyadeepak/Scripts/jquery-1.7.2.js Line: 1903 Is there a way to find out the source of this error?
toggle/update container height when accordion opens
hello, I want to set a container's height dynamically (and maybe animate) when I open the accordion menu. this is my html code <div id="top"></div> <div id="container"> <div id="left"> <div class="logo"></div> <nav id="menu"> <ul class="menu"> <li><a href="#">link</a></li> <li><a href="#">link</a> <ul class="submenu"> <li><a href="#">link</a></li> <li><a href="#">link</a></li> <li><a href="#">link</a></li>
jquery event existence
Hi, is there any way to do the next: lets assume I 2 buttons (b1 and b2) have a button and when I click b2 it's like i'm clicking number 2? I am using the dreamweaver SpryTabbedPanels and I want to create anther element that when I will click it, it would be the same as I have clicked on the the tab label. hope my explanation is good enough. thanks
Internet Explorer freezes for TR (rows)...
I have the following code in JqGrid onLoadComplete event. IE freezes and goes into Not Responding for a few seconds to minutes whereas FF/Chrome render it in a jiffy. loadComplete: function () { jQuery("#list1").trigger("reloadGrid"); // Call to fix client-side sorting //Set Tooltips ... var ids = "" + $("#list1").getDataIDs(); //list1 is the table name which is also rendered as JqGrid var arrIds = ids.split(",");
outerWidth(), IE and percentage
So I don't know why, but it seems outerWidth() isn't working properly for me. I have this <div> that I give a width of 70% inside a 800px <div>. The first <div> should then have a width of 560px. So I'm trying to get the computed width of my element, and I thought outerWidth was supposed to do it since in the documentation it says: Returns the width of the element, along with left and right padding, border, and optionally margin, in pixels. For some reason however, it refuses to output the width
JQuery Compatibility Mode Detection
Is there a way we can detect if the browser is running in compatibility mode and preferably switch the browser to IE 9 standards mode automatically?
Problem with variable length substring
Need to retrieve the eventID for the example. The event ID range length (1 to 4 charachers) Start at position 12. var eventID = $(this).text(); alert(eventID.substring(12, 4)) ;
Target row in table that has the clicked link
Hi. I have a table, with several rows. One row has a class of 'order_details'. Within the table I have a link. I want this link to show this row (default hidden). The problem is I have multiple tables, with the same structure. When I click the link, it opens all rows with the class. How can I say only open the row with the class 'order_details' that is within the current table? Thank you
Unable to click Table's Td on single click
I have table with check boxes in each row which is hidden. I have written a jquery function to check/uncheck the checkbox when clicked on TD and change its background color. My issue is I have to do double click on TD inorder for this change to happen. Can anyone please tell me what the issue is? Here is the HTML <td id="tid" width="10"> <label for="checkbox"><input type="checkbox" id="c1" value="checked" /></label> </td> JQuery Code: $('#custom-interval-tbl td').click(function(e) { if($(this).find('input:checkbox').is(':checked'))
Registering a dynamically created form
Hi everyone, I'm having problems submitting data from my dynamically created form. I believe the problem lies in hows it is being registered. It is submitting the form but not passing any data into my ajax call which is causing the PHP to fail. I use this in other places within my website and it works, but not when the form is created dynamically. You can find the jsfiddle here --> http://jsfiddle.net/skyros/ZFE7x/ What it does: HTML is loaded in dynamically using .load(); User selects an image
Creating frame in IE
Hello, I want to create a frame, in this frame there will be content loaded which must me formatted with a specific style (the reason for a iframe). I wrote some code which works fine in firefox, but doesn't work at all in IE (I get an error). Does anybody has an idea how to fix this? I create a jsfiddle as a demo: http://jsfiddle.net/fBe3C/ Thanks, Sjaakmans
set toggle class on individual div.
I have three div with same class. In this what I need is when I hover on that div so it will change it's color but if that div is selected so that stick with that selected color. and other are stay as it is and when I select another div so that selected div show normal. here is my Example. [html] <div class ="box" id="1"> Something </div> <div class ="box" id="2"> Anything </div> <div class ="box" id="3"> Anything </div> [js] $(".box").click(function() { $(this).toggleClass("disable"); }); [css]
i have faced problem in firefox12
i am working on paroll project. we are using jquery,springs and hibernate. recently,we are using ff12 version and we fixed css properties to our application. then,when we opened some pages not opend shows blank page.when we click 3rd or 4th time the data wll displayed on screen. so please suggest any one.
Rollover color issue on cells based row
In my grid, 4 div based cells collectively make a row. If i rollover any cell it should highlight all other cells of the row. My code is as under: <div dataindex="0" dataid="303" class="myclass mygrid-data-cell mygrid-data-odd-row" id="cell-1-0">First Column</div> <div dataindex="0" dataid="303" class="myclass mygrid-data-cell mygrid-data-odd-row" id="cell-2-0">Second Column</div> <div dataindex="0" dataid="303" class="myclass mygrid-data-cell mygrid-data-odd-row" id="cell-3-0">Third Column</div>
Large item dropped within small tab ... is that possible ?
Hello, I have an accordion embedded in a connected sortable list. My items (accordions to be dropped from one tab to another) are 300 px when my tabs are like 50 px. When trying to drop those elements it doesn't work.... it can be dragged but refuses to get dropped.(too large to be swallowed ;-) ?) Anyone used good practice to perform this ? Thanks ! Paul
JQuery images roll over effect not working in IE8
Hi I'm doing a micro-site with a grid of images, i created a bit of code to do a simple roll-over so when you are over the images display a blue panel with titles. It works fine in Firefox, Chrome and Safari but IE8 is not working at all. here is the link for the live version: http://loweandpartners.com/ms/lowe/ Could you guys give me directions and tips so I know what i am doing wrong, I will appreciate it. thanks in advance. Jquery Code I put it in the header, just put it here to make it easy
Ajax Post Not Sending Array
Hello, Back again with another question lol So I have been trying to send an array of a UL:LI to a PHP page. The array is made and through jQuery can be read just fine. The problem is when I use the $.ajax() function the array is not sent. jQuery.html <html> <head> <title>jQuery Testing</title> <script type="text/javascript" src="templates/js/jquery.js"></script> <script> $(document).ready(function() { $('.list1 li').dblclick(function() { $(this).clone().appendTo('.list2'); }); $('#test').click(function()
Next Page