I am new to jQuery and I would like to process a matrix operationusing PHP.The front-end code is done bellow, its a 3x3 table. the user couldselect/deselect individual cells of the table and click the buttonthat calls a PHP script that will run some function. How do I know if a cell is selected? Is there is is_selectedfunction in jQuery? Would it be possible to send a 3x3 array to my PHP script?Please provide me with any info on thisMTMy current test code.
If I have a javascript variable with a value in it. How do I RETRIEVE the value of it and insert it into my <TD> cell? I am using a table to input values to <CANVAS> tag to draw a graph based on the values in <TD> You can ignore the part when ZHTML is evaluating with <? z tags
<HTML> <HEAD><TITLE>Welcome to Version 2</TITLE> <!-- JavaScript HEAD AREA --> <script language="javascript" type="text/javascript"> var rowValue; //Global variable to manipulate. </script>
I'm working on a forum. What I desire is to let user customize his own test. To do that I have to retrieve the user selected text. That's my problem. I don't know a jquery function to do that
It works great and does exactly what I need. I'm using it in flat mode so that it can be displayed statically on the page. What I can't seem to work out is how to retrieve the selected date once clicked on. I need to be able to print the output in dd/mm/yyyy format, either on screen or in an alert or something similar.
If anyone has worked with this calendar and knows how to do it, or can sort it, I'd appreciate it greatly. I can't paste code here as it's too long, but the source code on the site linked above is exactly the same as I'm using.
but if I once resize the block called res, it always select block called drop and I'd like to split the cells only if I just resizing the block called res.
I know that JQuery is a very powerful library and was just wondering if it had the following capability that I really need.
Lets say I need to insert new cells into a table row, I know how to do this basic task, but I need to insert my cells in a highly unusual way due to some of the requirements that are needed for the new cells.
I need to be able to insert cells a certain distance into the row, For example, if a row was 1000pixels wide, is there a feature in JQuery that would allow me to insert the cell 250pixels into the row and have a cell width of 50pixels and insert another cell 500pixels into the row with a cell width of 100pixels. I know how to set a cells width using JQuery, just not distance into a row.
The values wont ever be the exact same as above though because they are actually read from a database, so for example, one cell would have the following values [code]...
I'm dynamically creating an HTML table using JQuery. I'm not assigning id's to the tr or td tags in the table. The reason I'm not, is that it seems complicated, given that the table is initially loaded and then the user can add and delete rows. I'll also need to sort the table on demand.
I maintain the current row the user has clicked on as a global variable (curRow) using this... $("#prodTable tbody tr").live('click', function() { curRow = $(this)[0].rowIndex; });
I want to do input validations on certain cells based on values in other cells in the row. for example, the value of cellA cannot be greater than the sum of the values of cellB-CellD. The question is, given a certain table rowindex, how can I access the cells in the row? Is this not a good approach?
See the table code below. Because this table is created by a third party application, I can't modify their code. So, I'm stuck trying to find other ways to change the table styles. I figured jQuery would be a great way to accomplish this, but I can't figure out the correct code. Can someone show me how to change all cells, or certain cells (dddefault and ddlabel) to have a border? I've gotten close, but it only affects the first cell.
<TABLE CLASS="datadisplaytable" SUMMARY="This layout table is used to present the weekly course schedule." WIDTH="80%"> <TR> <TH CLASS="ddheader" scope="col" > </TH> <TH CLASS="ddheader" scope="col" > Monday </TH>
Want to create jsondata from table cells: For instance: Table cells with unique ids with class "data" should become jsondata: {"Cell1id":"Cellid1 innerhtml","Cell2id":"Cellid1 innerhtml",etc etc} What is the easiest way to do this?
I'm using .parent on a draggable table row and need to check the contents of every cell in a particular column in the table. $(ui.draggable.parents("table")[0]) This gives me the table.. how do I get say the collection of cells in column 2. I thought about something like this: $(ui.draggable.parents("table")[0](tr td[1]))
I have to ad a line between some rows, but not for the first col.the table has:table { border-collapse: collapse }that is fix and I can not change it.the following sample code draws the lines nicely in IE6 but in FF there'sjust nothing (also used color here, to see if the selectors are right):
I'm using jQuery to check if a group of radio buttons has one of them selected. This works fine if there IS one selected, but errors if NONE are selected. Can anyone show me how to make it work if NONE are selected?[code]
I would like to know how I can retrieve html data with jQuery. With my current project I have all pages in 1 html file (jQuery mobile). Every page has his own ID. Page 1 has id="question_1", and the next one is id="question_2".
Now I would like to retrieve this ID and add +1 to the question. So if you press a buton it will always go to the next page.
So I have a div with id "navigation" which contains an <ul>, and the <ul> has several <li> items.What I want to do is to animate the <li> items as i rollover them.My question is , how can I only animate the current <li> I rollover, because right now when I rollover one, all <li> items animate.
I am simply trying to retreive the value of a label. Here is the label: <asp:Label ID="Label3" runat="server" Text="I love ASNA"></asp:Label>
Here is what I am trying to do with JQUERY: See LINE 1 and LINE 2 below. It comes back with UNDEFINED/ < asp:Content ContentPlaceHolderID="PageScriptPH" runat="server" > <script type="text/javascript"> var ATTDTA_CLICK_ACTION_CODE = 'X'; var ATTDTA_DOUBLE_CLICK_ACTION_CODE = 'X'; wingsHelpers.subfile.assignDoubleClickAction( "ATTDTA", ATTDTA_DOUBLE_CLICK_ACTION_CODE); var p = $("#Label3").val(); <======== LINE 1 alert(p);<======== LINE 2 </script> </asp:Content>
I'm completely new to jQuery and Javascript but I have extensive (10+ years) with Flash and Actionscript.
I want to create a dyanmic tree menu, but I wonder what is the best way to get the data from a MySql database.
Honestly, compared to AS3, the implementation of XML seems very primitive... In As3 you simply move around the xml as if those were objects using E4X. This way: MyXML.myNode.myChild[3].text()
So I wonder, what is the best way to work with data from the DDBB? Is there a better way of using XML with jQuery? Maybe JSON?
JQuery 1.4. I cannot get this line to return anything but null: alert($(this).closest("div.cr").html());Any ideas on why not? I have tried using parents("div.cr:first") with no luck as well.
Here is my sample code. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]"> <html xmlns ="[URL]"> <head > <meta http-equiv ="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type="text/javascript" src="jquery-1.4.min.js" ></script> <script type="text/javascript"> $(function(){ $(".mcf").live('submit',function(){ alert($(this).closest("div.cr").html()); //alert($(".mcf").closest(".cr").html()); alert($("div.cr").html()); //alert($(this).html()); return false; }); }); .....
I have a jQuery object upon which I am setting the 'top' value using the .css() method. The value is to Float accuracy:
$('#example').css('top', 13.857759); Setting the value works fine, and the result in the DOM is: <div id="example" style="top: 13.857759px;">...</div>
However, when I go to retrieve the value using the .css() method, the value is returned as an integer: alert($('#example').css('top')) // alerts "13px" Is this an intentional quirk of jQuery, or considered to be a bug?