parent

jquery - get parent of parent?

I'm using the jquery.cjobjectScaler plugin (link text ) and due to circumstances beyond my control, the img is hyperlinked within the div... I don't have any way to "strip out" that tag, nor can I reorder it at all... So, the original function is this: $("#productGrid li img").cjObjectScaler({ destObj: $("#productGrid li img")....

addClass to Parent

HTML: <div class="tabbed-section"> <ul class="tabs"> <li><a href="#tab-1">Tab 1</a><li> <li><a href="#tab-2">Tab 2</a><li> </ul> <div id="tab-1" class="panel"> content 1 </div> <div id="tab-2" class="panel"> content 2 </div> </div> jQuery: $('.tabbed-section .panel').hide();...

jquery - how to set parent attribute?

I'm trying to write an if statement where if one of the elements has it's display set to "none", I want the parent element to also display "none"... This is the code I'm trying, which doesn't work... /* tried this first */ if($('#prevx a').attr('display') == 'none') { $(this).parent().attr('display','none'); } /* and then this *...

Java: How to write method to accept child without casting to parent?

Not sure how to title this... So I've got three child classes of Event: WeightEvent, TimedEvent, RepEvent. Through whatever means, I get an object of one of the children. Now I want to send that child event to a method in another object so it can pull the data from it with the getSavedEvents() method. The method only exists in the child...

How to access to the parent object in c#

Hi, I have a "meter" class. One property of "meter" is another class called "production". I need to access to a property of meter class (power rating) from production class by reference. The powerRating is not known at the instantiation of Meter. How can I do that ? Thanks in advance public class Meter { private int _powerRating ...

iFrame and Javascript to parent document.

Hi, I have an iFrame with an external website. I know about the same domain rule, so I am trying to invoke some javascript via the src to the parent. Currently I have: <iframe id="my_frame" src="http://other.com"&gt;&lt;/iframe&gt; and I change the src using javascript as follows: <iframe id="my_frame" src="javascript:document.write...

Access Parent object PHP

I have class that extends another class. class TWITTER_FOLLOWERS extends TWITTER_BOT in TWITTER_FOLLOWERS i want to acces the db object from TWITTER_BOT but i get just an error Fatal error: Call to a member function fetch_all_array() on a non-object in /var/www/bot/inc/TWITTER_FOLLOWERS.php on line 163 On line 163 i have this code ...

How To Get Global MouseMove And KeyDown Events In Silverlight

Application.Current.RootVisual.KeyDown += Application_KeyDown The above does not work if I'm on a ChildWindow - that was instantiated in runtime. My question is, how do I get the mousemove or keydown event in the Parent Window that hosts this ChildWindow? Also, I'd rather not change anything in the childwindow (i.e., add an event that...

wordpress - how to make a page with no parent appear in a subnav menu

I have a page with a Parent of Main Page (no parent), so that it appears in the main navigation of the site. However, I also want to get to this page through one of the options on a drop-down menu. If I set the parent to that Nav page, it appears in the drop-down but then disappears from the main nav list. For example: Main Nav: Dogs C...

Animating Height of Parent Hides Select Options

When I focus on a select box I want the hidden tooltip to appear. When I click on the select box the animation starts but the option list is hidden. How I get round this? <style> .showme {display:none;} li {height:25px;background:red; } select{z-index:100;} p{margin:0px;padding:0px;} </style> <script type="application/javascript"> $(do...

Displaying a Graph structure in JSP

Hi there, I have a table in DB which holds child&parent relationships. Now i am trying to display this info in a jsp as a Graph (a single child can have multiple parents). May be i need to use recursive calls in jsp. has anyone come across this kind of work? any examples/pointers ? Thanks ...

Delphi Parent Form Buttons

Is there a way to disable the parent windows buttons? I have a "working" form that is called by a lot of forms, that I would like to disable the parent form buttons until it's finished doing it's thing. Then turn them back on. I'd like to do something that is attached to the OnShow event and onClose event. Thanks -Brad ...

Ruby on Rails - Adding parent object to child?

Hi, I have a user stored in a session which I would like to add as the owner of a comment. Rather than having a hidden field for user_id, I would like to add the user before the comment is saved in the controller. What would be the best way to do this? @comment = @post.comments.create(params[:comment]) Thanks. ...

parent element id

hello - can't get the parent id of the list the item is dragged into. I can get the items' id easily enough and thought i could get the parent from that but can't seem to grab it! <li id="tag_772" class="tag tagAssigned ui-draggable" >adventurous briefs</li> is the li dragged in. Any help much appreciated! $("li.tag").draggable({ ...

JQuery - grab the td value next to radio button

Hello, I have the following dilemma: My HTML is as such (this exists within a PL/SQL app.): <table id="search_result_table"> <tr> <input type=radio name="pv_select" value="'||lv_spriden_id||'"/> <font face="Calibri" size=3><td id="spriden_id" name="spriden_id">'||lv_spriden_id||'</td></font>' <font face="Calibri" size=3><td id="la...

TComponet / any other Superclass and its child item detection.

I have Popup menu control on form ( grr, I most likely gonna make it dynamic - hate static tools ). It has got Item with SubMenu. SubMenu has three Menu Items ( TMenuItem class ). I need to check by taking Sender param in if..then statement whenever procedure has been called by the Item with SubMenu or by SubMenu Items. I tried differe...

how do you prevent the mouseout of a parent from firing when hovering onto its child element?

So let's say I have a red square image that turns green when the mouse goes over it, and it turns back to red when the mouse leaves the square. I then made a menu sort of thing with it so that when I hover on the square, it turns green and a rectangle appears below it. What I want to happen is this: After the rectangle appears and I mo...

Wrapping my head around N parent->child associations

I'll try to explain this the best I can. I'm having quite a bit of difficulty trying to figure out this logic. Basically, I have a collection that includes thousands of objects which are each made up of a Parent and a Child property. So, roughly, this: public class MyObject{ public string Parent { get; set; } public string ...

Sending data from parent to child process and vice versa in C

Hi I've made a program that create 5 pipes and fork 5 processes in a loop. I've managed to send data from the parent to each child processe, when each child processe is overlapped by another program. Each loop is done in the following manner (parent.c): // Child process - reads from pipe if (childpid == 0) { dup2(fd[0], 0); // re...

display jquery prettyPhoto lightbox in parent from iframe

Hi, I know this issue has been discussed before but I can't seem to get it to work. I have a master html page with an iframe on that page. I am using jquery prettyphoto and I was wondering how I can get the light box to display in the parent window when I click on the link in the iframe? Please my code below: Master Page: <!DOCTYPE h...