i have this code that creates a div, adds id and appends the div. I am trying to drag that div but its not working like it should. $("<div class='twin_seat' style='width:120px;display:table-row;'></div>") .attr('id', twinseatsid) .appendTo(cinema) .draggable({ containment: cinema, snap: true, helper: 'clone' }); im using `helpe: clone` because i just want to visually see the element being dragged because when looking at the developer console the div does get dragged but it doesnt stay where it gets dragged to; that's the issue. help please. TIA.

Member Avatar
Member Avatar
+0 forum 1

I would like to get **all** Equipment values. *I have used DOM Document.* It is reading **ONLY LAST Element**. *Equipment Id: 28*. I need all three. Thanks in advanced. XML File: <?xml version="1.0" encoding="UTF-8"?> -<Physical> <Catalog> </Catalog> -<Installed> -<Equipment> <Id>26</Id> <Ref>Tew12</Ref> -<Characteristic> <CharacteristicName>Height</CharacteristicName> <CharacteristicValue>160</CharacteristicValue> </Characteristic> -<Characteristic> <CharacteristicName>Tilt</CharacteristicName> <CharacteristicValue>30</CharacteristicValue> </Equipment> -<Equipment> <Id>27</Id> <Ref>Tew13</Ref> -<Characteristic> <CharacteristicName>Height</CharacteristicName> <CharacteristicValue>165</CharacteristicValue> </Characteristic> -<Characteristic> <CharacteristicName>Tilt</CharacteristicName> <CharacteristicValue>50</CharacteristicValue> </Equipment> -<Equipment> <Id>28</Id> <Ref>Tew14</Ref> -<Characteristic> <CharacteristicName>Height</CharacteristicName> <CharacteristicValue>190</CharacteristicValue> </Characteristic> -<Characteristic> <CharacteristicName>Tilt</CharacteristicName> <CharacteristicValue>50</CharacteristicValue> </Equipment> </Installed> </Physical> Expected Result: Id 26 Tilt 30 Id 27 Tilt 50 Id 28 Tilt 50 CODE: http://www.daniweb.com/web-development/php/threads/458094/how-to-get-nodevalue-with-xpathxmlphp

Member Avatar
Member Avatar
+0 forum 21

I'm trying to extract an element's children from an AJAX call, but am having difficulty isolating it. My code is as follows: function AJAXcomplete(data){ var result = $(data).find('#productDetails > *'); jQ('#productDetails').append(result); }; function getDetails(e){ e.preventDefault(); var addy = jQ(this).attr("href"); jQ('body').append('<div id="productDetails"></div>'); jQ('#productDetails').show(); $.get(addy, AJAXcomplete); }; jQ('#slides').on('click', '.slideLink', getDetails); The above *should* append the children of `#productDetails` from the AJAX call, and append them to a newly created div of the same id. I can successfully retrieve the entire AJAX data and append that (tested) but I can't get the element I want. Am I doing something obviously wrong?

Member Avatar
Member Avatar
+0 forum 1

Hello Community, I want to know if there is a way to make a program that will click a button on a webbrowser but the button does not have a name (name="") or id (id="") property it just has a class (class="") property and if there is a way is there also a way to place text in a textbox on the webbrowser again the textbox does not have a name (name="") or id (id="") property it just has a class (class="") property.

Member Avatar
Member Avatar
+0 forum 1

Dear All, I'm new to C, and would appreciate your help about the below code. The purpose of the program is to multiply the elements of the array and print the result. The user enters the value for how many elements he wants to have multiplied, and then the function should calculate. For example, if the user enters 3, the result should be 1*2*3=6. For 4, the result should be 1*2*3*4=24. But, when I run the program, I always get very big and false numbers. [CODE]#include <stdio.h> int multiply_array_elements(const int ar1[], int n, int multiplication); int main(void) { const int …

Member Avatar
Member Avatar
+0 forum 3

In JavaScript (preferably jQuery) how could I create a new element and set its values, but I want it in a specific place In the document. My divs are structured like this : [code]/* container item [item to be created inserted here] */ [/code] I know how to do this and insert it before the end body tag, but not like this. I also say in jQuery, as most of my site is written in jQuery (only the js parts) Thanks, Matthew.

Member Avatar
Member Avatar
+0 forum 3

I am working on a bowling scoring system for a non-profit. They would like to be able to enter up to 9 games worth of scores into a form and have the shot results and game scores captured in a database. I have accomplished the scoring part with an html table/form combination. The last row of the table for each column is a Submit button for the user to click and send the shot results to the database using an Ajax call and then return a calculated score. Works very slick except.... On the Ajax return, I would like to …

Member Avatar
Member Avatar
+0 forum 2

Hi my name is Aida Boling and I am on here trying to meet new friends as well as trying to build an e-commerce website. I am originally an illustrator and my husband and I built a clothing business. At first, I was hard to communicate to manufacturers without any digital documents. So, I learned how to convert my manual artwork to digital platforms. Now that I have mastered this I am trying to get in the world of Web Design which will help me save money. I was fortunate to find [url]www.daniweb.com[/url] a while ago but I was so …

Member Avatar
Member Avatar
+0 forum 4

i have this dataset: [CODE]String[][] trainData= { //featIdx////////classInfo {"s", "y", "r"},//0 {"s", "n", "r"},//1 {"w", "y", "r"},//0 {"r", "y", "p"},//0 {"r", "n", "r"},//2 {"r", "y", "p"},//0 {"w", "n", "p"},//0 {"w", "n", "r"},//3 {"w", "y", "r"},//0 {"s", "n", "r"}};//1 int[] trainClassInfo = {0, 1, 0, 0, 2, 0, 0, 3, 0, 1};[/CODE] i want to check if the elements of trainClassInfo is all same at the indexes when trainData[i][0]=="s" i wrote this method but it doesnt perform correctly, i'm confused ... :confused: [CODE] public boolean allSame(int featIdx, String featVal) { boolean allSame = false; int classInfo =-1; for(int i=0; i<trainData.length; i++){ …

Member Avatar
Member Avatar
+0 forum 5

how to find out whether certain elements in an array are equal to one another? for this array: [icode]int array[] = {0, 1, 0, 0, 2, 0, 0, 3, 0, 1};[/icode] i wanna know if elements under the indexes 0, 1, and 9 are same numbers well the easy way is: [code]if(array[0] == array[1] && array[1]==array[9]) { System.out.println("These are same elements!"); }[/code] or something like this, for testing only once but the thing is, i want to test different set of elements in the array by looping. any ideas? :?: thank you :)

Member Avatar
Member Avatar
+0 forum 2

Hey All, I have written a script that uses elementTree to work on python 2.4. Took quite a while and worked a threat but now I need to get it working on 2.3.4. I can't upgrade the version of python. Is there an equivelent version of the element tree for 2.3.4????

Member Avatar
Member Avatar
+0 forum 3

i have an array like this: [B]String[][] data= {"s", "w","s", "y", "r", "r", "y", "p"};[/B] i wanna do some action if there was no similar array element before that particular element, for example, do something if [B]data[0]=="s"[/B], then do something if [B]data[1] == "w"[/B], but skip when [B]data[2]=="s"[/B], because [B]"s"[/B] already exists before [B]data[2][/B], like this: [CODE] for(int i=0; i<data.length; i++){ if(data[i] != SIMILAR ELEMENT BEFORE data[i]){ DO SOME ACTION } } [/CODE] can someone please tell me some idea? please... thank u

Member Avatar
Member Avatar
+0 forum 7

Here is my code at the moment: [code] import java.util.Scanner; class menuOperations { String[] fNames = new String[50]; String[] lNames = new String[50]; String fName = " "; String lName = " "; String sFName = " "; String sLName = " "; int dAmount,dTimes,i; Scanner in = new Scanner(System.in); public void newEntry() { if (fName == " ") { int i = 0; } if (i == 50) { System.out.println("Sorry, your address book is full. You can only store 50 entires per book."); } else { System.out.println("Please enter the first name of the person:"); fName = in.nextLine(); fNames[i] = …

Member Avatar
Member Avatar
+0 forum 2

Hi all, I want to parse the elements in my arraylist to double. May I know how to implement that? [CODE]import java.io.*; import java.util.*; public class Array2 { static ArrayList myDouble = new ArrayList(); static String[] temp; static String[][] finalTemp; static String[] arr; static int rows; public static void main(String args[]) { try { BufferedReader in = new BufferedReader(new FileReader("C:\\Users\\Serene\\Documents\\Major Project\\Alignment Algorithms\\Testing2.txt")); //reading files in specified directory String str = null; while ((str = in.readLine()) != null) //file reading { str = str.trim(); temp = str.split(","); myDouble.add(temp); } rows = myDouble.size(); finalTemp = new String[rows][]; for (int i=0; i<rows; i++) …

Member Avatar
Member Avatar
+0 forum 14

Hi, I have pretty just started javascript and I have to say it is the hardest language to learn probably due to the lack of official documentation or something like that. If someone can point me in the right direction for documentation, that'll be great. On the other hand, php is so easy to learn because of the official documentation and tutorial sites. So, here's the thing. I have a multiple elements that are in the same class. How can I get those elements to respond to an event without actually having to with [iCODE]onmouseover="this.style.background = '#687168';"[/iCODE] or something for …

Member Avatar
Member Avatar
+0 forum 11

Hi, I am trying to write elements from a list that I have created to an outfile using a for-loop with this code: [CODE]for j in range(int(Allele[i])): outfile.write(' allelelocus[j] * ')[/CODE] However when I do this I just get a whole bunch of allelelocus[j] in my out file. I was wondering if there was any way to get my program to write the actual jth element of the list and not just allelelocus[j]. Thanks! Elise

Member Avatar
Member Avatar
+0 forum 4

I am currently writing code to populate a select tag with all the hours of the day. I recently rewrote a function that will populate a temporary select tag based off a time passed in as an argument and then return the temporary select at the end. When I attempt to assign the product to a variable, Javascript gives the error "Invalid Assignment on left-hand side." Have I stumbled onto one of the cases where you can't directly assign variables to each other, or is this a syntax error? This the line that is giving me an error [code]eval(select1) = …

Member Avatar
Member Avatar
+0 forum 6

I am currently trying to make an html link that will add elements (specifically, drop down menus) to the current page when you click it. Since I am adding all the elements to the page using JavaScript, I'm not sure how to set up the link to call a function rather than go to a different page. I've seen people set the href attribute to the function they want, so I tried that and it didn't work. I've also seen a way that involves using onclick and making the link follow the onclick, not go to a different page. In …

Member Avatar
Member Avatar
+0 forum 4

I want to remove the JOB node with JOBNAME "One" from the following file: <SETTINGS> <SYSTEM> <VERSION>3.1<VERSION> </SYSTEM> <JOB> <JOBNAME>One</JOBNAME> </JOB> <JOB> <JOBNAME>Two</JOBNAME> </JOB> </SETTING> The code that is supposed to remove it looks like this: [CODE]try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = factory.newDocumentBuilder(); Document doc = docBuilder.parse(new File(str_fileName)); System.out.println("starting parser"); NodeList list = doc.getElementsByTagName("*"); for (int i = 0; i < list.getLength(); i++) { //Get Node Node node = (Node) list.item(i); // Look through entire settings file if (node.getNodeName().equalsIgnoreCase("JOB")) { NodeList childList = node.getChildNodes(); // Look through all the children for (int x = 0; x < …

Member Avatar
Member Avatar
+0 forum 4

Hi there, I am wanting to find out how to add text to a hidden field in a HTML form. I want to add text from an array, the array holds the information for the caption placeholder for the images. Basically i have an image viewer which lets you scroll through images and they have a text caption below them telling what the images are. When the user clicks an image this brings up the form and hides the imageViewer. I want the caption of the image clicked to automatically be entered into the hidden field of the form when …

Member Avatar
Member Avatar
+0 forum 2

The End.