parent-child

onclick the child, avoid the parent function

Hi, I have a div and it has a click event. In the div there is two link are available with separate click event. My problem is, while I click the two separate links, the div event only firing not the link event. How can I use this all three events separately? Anyone help? ...

Add/remove class of tag when other child links are hovered over

When I hover over the parent links in my menu the class "toggle-active" is added to a span tag so the arrow image is changed. I also want this class to be added to the span tag when I'm hovering over the child links of the parent link inside the .sub-menu container, but I cannot get it to work. Here is the structure of the menu: <ul> <l...

Mapping Code collection to database collection

I have been trying to brainstorm this with little success. The practice around here is to have the business object reflect the database table schema, since that follows the business "structure". For example the Parent table would have an ID, FirstName, and LastName column. Therefore the .NET class will have an id (to know how to communin...

How To Receive Output From A Child Process' STDOUT Without Blocking or Poling

I have a long-running console-based application Sender that sends simple text to STDOUT using non-buffered output such as cout << "Message" << flush(). I want to create an MFC dialog-based application (named Receiver) that starts Sender and can read it's output. Receiver should also be able to detect when Sender has died, or be able to...

Controlling the top parent window from iframe with jquery or javascript

Hi, I have a page on my site which has a blank text field. Next to this is a button which opens up an iframe (using colorbox). This iframe shows a list of files - next to each file is a button which puts the filename in to the text field in the parent window by calling the function below: function returnImage(file){ $('#input_text_i...

Very basic question about parent() and prev() in jQuery

Hi, I am handling a hyperlink's click event with a JavaScript function. I want to retrieve data from the hyperlink. The page looks like this: <div class="div1"> <div title="Title 1" class="div2"> <p class="p1"><a class="linkJs">The link in question</a></p> </div> </div> <div class="div1"> <div title="Title 2" class="di...

How to determine which detail table raised Telerik radgrid NeedDataSource Event?

For a radgrid, in the GridNeedDataSource Event, the eventargs include: RebindReason IsFromDetailTable This useful for determining whether the rebinding is caused by Parent or Child grid. What if I have a 3-tier grid? Parent > Child > Grandchild This boolean parameter will only tell me whether or not the grid raising the event was the ...

How to get only direct child elements by jQuery function

I have a table structure like this: <table1> <tbody> <tr> <td></td> ... <td> <table2> <tbody> <tr> <td></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> in javascript, I have a variable "tbl" with value of $(tab...

3 divs inside parent div w/o auto resize

I new to webdesign and I wonder how I could do something like this: .......................... LEFT --- CENTER ---- RIGHT .......................... Its one parent div in the center of the window, with 3 divs inside like columns. I want them to be dynamic, so they always scale to the browser window. This is how it looks now. My cur...

Implementation of an enforced one-to-many relationship in C#?

In my app, I'm working with Simfile and Notechart objects. A Simfile is essentially a Notechart container, with the following constraints: 1) Every Notechart must be contained in exactly one parent Simfile, at all times. 2) Given a Simfile object, I need to be able to obtain all of its contained Notecharts (should be easy). 3) Given a N...

how to retrieve parent node using xquery?

Hi, I am using xml and xqueries.I usually use an xpath expression relative to a parent node to retrieve its child node. But, I am not sure how to do the opposite meaning if I have a child node, how do I retrieve its parent node. <node id="50> <childnode1 childid="51" /> <childnode2 childid="52" /> </node> If I have the node <chi...

php OOP parent to child relationship

class base{ public $c = 'c'; public $sub = ''; function __construct(){ $this->sub = new sub(); } } class sub extends base{ public $ab = 'abs'; function __construct(){ $this->c = 'aas'; echo 'Test'; } } $a = new base(); print_r($a); I would like to the sub class to edit the base vars $this->c = 'blabla'; how can i ac...

Python subprocess how to determine if child process hangs?

Hello, How do I know is there my child process got hang while operating? ...

jQuery select the parent of a div

I have this html: <div class="vt ddsitem"> <a href="url"><img class="pt" id="xyz1" src="url"></a> <div> <img class="updown" src="images/updown.gif"> <a href="url"><img class="bin" src="images/bin.gif"></a> </div> </div> <div class="vt ddsitem"> <a href="url"><img class="...

Does a foreign key need to appear in children of children?

I have a set of tables with children of children, like so: Clients (PK ClientID) which is parent (one to many) to Property (PK PropertyID, FK ClientID) which is parent (one to many) to Property Detail (PK PropDetailID, FK PropertyID) and Case (PK CaseID, FK PropertyID). Should the foreign keys for the parent tables be repeated furth...

NHibernate.StaleStateException : Unexpected row count: 0; expected: 1

Hl Guys, I am busy writing a backend administrative program for a system that exists. I have selected NHibernate for my data access solution and am fairly new to it. I am experiencing the following error in a parent/child relationship: NHibernate.StaleStateException : Unexpected row count: 0; expected: 1 This error is caused by the fa...

Calling children of specified index?

Anyone know the proper syntax to write this statement? $('.nav ul li')[0].children("a") For some reason this is not working. The return is that its not a function. :( ...

Removing Sprites from stage

Hey guys, got a problem with my pages in flash. So i created 5 pages, each of which contains several movie clips (text, graphics, forms, etc). There is one specific page however that contains autogenerated content via. sprites. If i happen to land on this page, the sprites will appear, but when i transition to another page, they are stil...

Postgres SQL for joining parent-child audit tables

We're using a "1 audit table for each monitored Table"; However, in our case emp(PARENT) table has a child table emp_address which also needs to be monitored, so we have emp_audit and emp_address_audit tables. postgres audit SQL : how to join PARENT and CHILD tables for reporting purposes. /* Employee table */ create table emp ( ...

problem with parent() (jQuery)

problem with parent() jQuery Code http://webdev.faressoft.org/wp-content/plugins/ImageSlideShow/js/slideShow.js You can see the result here (Image Slide Show) http://webdev.faressoft.org/?p=208 $(".ImageNum span").click(function() { var image = parseInt($(this).text()); $(".correntImage", $(this).parent()).removeClass("correntImage")...