JQuery :: Getting The Child Of An Object Without An Id?
Jun 2, 2010
how to find this. I just need to know how to find child elements on a parent element that I already have the object for. The parent node doesn't have an id so I can't just get the ID and use the find functionality in jquery.
View 1 Replies
ADVERTISEMENT
May 12, 2011
I want to do something like this
<div>
<p>
<p class="active">
[code]....
View 7 Replies
View Related
Sep 30, 2007
I have a page (page 1), my page 1 has an IFRAME which loads another page (page 2).
My page 2 has a JavaScript object declared on the page: var MyObject = new Object();
I want to access this object from the parent page (page 1).
I tried:
var TempObj = document.getElementById("MyIFrame");
TempObj.document.MyObject.value = "blah blah";
But it said MyObject didn't exist.
Can someone tell me how to access it in this manner?
View 2 Replies
View Related
Jul 23, 2005
I have tried this using both frames and window.open(). In either case, if the new content comes from a different site than the original (or comes from a site and original is a local file) the document object is inaccessible. The new window object seems to have no document and no all[] or just about anything else useful. If the new content came from the same site (or local computer) as the original, everything seems to be where it belongs. I have looked all over and can find no references to this problem. Is this some security issue that everybody but me knows about?
I am seeing this on IE 6.0.2800.1106. The files are created in notepad
so there should be no surprises there.
--
spc
View 1 Replies
View Related
Apr 24, 2010
How do I define a child of a frame? What's the opposite of parent.document?
View 1 Replies
View Related
Jul 23, 2005
I'm trying to figure out this script doesn't display any text in the
child window and why I'm getting the null or not an object error.
It's taken directly from the Javascript and DHTML cookbook (not listed
in the book errata on o'reilly website). Initially I get an error
"window.dialogArguments.yourName" is null or not an object. Then I
fill out the field on the form, press the button and the child window
does display but there is no text inside the child window.
Questions: Should I be declaring an object that isn't currently
declared like "window"? or is "window" a built in object that doesn't
need declaring? do I need to assign the dialogDoc.html or "result" to
"document" somehow? It looks like they have me putting a value in
"result" then never actually using "result"... confused... Using ie
6.02800...Suggestions? gj
<html>
<head>
<title> Launch a Modal Dialog</title>
<script type="text/javascript">
function openDialog(form){
var result = window.showModalDialog("dialogDoc.html", form,
"dialogWidth:300px; dialogHeight:201px; center:yes");
}
</script>
</head>
<body>
<h1>Internet Explorer Modal Dialog Window</h1>
<hr />
<form name="sample" action="#" onsubmit="return false">
Enter your name for the dialog box:<input name="yourName" type="text"
/>
<input type="button" value="Send to Dialog"
onclick="openDialog(this.form)" />
</form>
</body>
</html>
<html>
<head>
<title>Modal Dialog</title>
</head>
<body>
<script type="text/javascript">
document.write("Greetings from " +
window.dialogArguments.yourName.value + "!");
</script>
</body>
</html>
View 3 Replies
View Related
Feb 9, 2011
<div class="userbox posts" id="pst146996">
<div class="imgholder">
<img alt="Chris Hardin" src="http://codebix.com/bp/1633.png">
<div style="margin-left: 20px;" class="commentbox">
[code]....
i want already select .postlike in $(this) now i want to select the tagh1 who is in .commentboxelements.i want to change the h1's inside text 1 to 2 so i write the code
$(this).closest('.posts').children('.commentboxelements center h1').html('1');
i try this but it's not worked anyway how i can do this.
View 1 Replies
View Related
Jan 5, 2012
so i wrote this slider with some help from an admin, everything works as I would like it to but I'm trying to make it a plugin so i need to tighten up a certain part of the code:
(function( $ ){
$.fn.jmSlider = function() {
// get total width of all li elements in the slider
var wrapWidth = 0;
[code]....
what i would like to do is instead of using "li:first" and "li:last", i would like to use first-child and last-child so the element doesn't need to be a li, in can be anything that is the direct child of the parent container.
View 2 Replies
View Related
Nov 24, 2011
I have a difficult work around Jquery. I want to remove all li items from the ul except first li and last three li how to remove the li elements from these list.
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
[Code].....
View 1 Replies
View Related
Oct 28, 2010
I have created parent child checkboxes. When one child is selected, then parent of that child, other child of same name and parent of that same name's child will be selected... Now I want if I unchecked any child, then only same name of child and parents should be unchecked or if I unchecked Parent Child, then same name of parent and child will be unchecked.
[Code]...
View 1 Replies
View Related
Jul 23, 2005
I have a parent window that pushes a new window object onto an Array
with the following code :
OpenChild()
{
//totalNumWindowsCreated is global
totalNumWindowsCreated = totalNumWindowsCreated + 1;
childWnds.push(window.open(link, "child" +
totalNumWindowsCreated,"dependent"));
..
..
..
}
This pops up a new window with every call. In the child window I call
a parent function onbeforeunload, appClose() :
function appClose(){
if (window.opener && !window.opener.closed){
window.opener.CloseChild(getQueryString("application"));
}}
This is in my frameset tag of the child code :
<frameset ... onbeforeUnload='appClose()'>
The window.opener.CloseChild() function is called perfectly when I have
one child window open, but as soon as I create another child window
both of the open child windows don't ever call it. They do both go
into the onbeforeunload appClose() function, but do not call the
window.opener.CloseChild() function inside of this routine.
Anyone have any ideas why when I have two child windows open I can't
access the window.opener functions?
I have tried taking each new window out of the array and used the
following code in CloseChild() :
CloseChild()
{
//win and totalNumWindowsCreated are both global
totalNumWindowsCreated = totalNumWindowsCreated + 1;
var win = window.open(link, "child" +
totalNumWindowsCreated,"dependent");
..
..
..
}
View 1 Replies
View Related
Oct 5, 2010
13 line causes this exception. Function is called insied of ready() handler. function renderGridSystemRecursively(scheme, container){
[Code]...
View 2 Replies
View Related
Mar 10, 2011
I am trying some simple things with javascript and trying to use it in a object oriented way. However I am now facing a problem in which I can't access an object variable from an object method. I am using jQuery.
My code is as follows;
Code:
My problem is that the variable msg1 does not work when accessed from function called from the jQuery get function. I get the message undefined. Therefore I am wondering, is there a way how I can access msg1 of my object instance from the get function of jQuery?
View 1 Replies
View Related
Apr 29, 2010
I am trying to alert the ID of a particular menu that I have clicked on and I am getting object,object. Instead of the name of the ID.
[Code]...
View 1 Replies
View Related
Feb 5, 2010
I have two result. SelectableChildren: groupHead.nextAll(".SimpleButton") and SelectableChildren: groupHead.nextAll(".SimpleButton").next().children(".SimpleButton")
I would like to combine them into one object so that I can bind a handle to them in one loop. $.each(combineResult, function(index, object){ ... })
I have to make them in one, so that I can pass it around.
View 12 Replies
View Related
May 2, 2010
Lets say I had a wrapped set of <p> elements. I understand how slice could return more than one element, but what is the difference between nth-child() and eq()?
$('p:nth-child(3)').css("font-style","italic");
$("p:eq(2)").css("font-style","italic");
$("p").slice(2,3).css("font-style","italic");
View 7 Replies
View Related
Oct 15, 2011
I am trying to update a progress percentage using jquery in my event handler. The first line works fine. The second line should be the jquery equivilent, but does not work.
event.target.icon.firstChild.textContent = progressPercent
$('event.target.icon').eq(0).text(progressPercent)
View 2 Replies
View Related
May 21, 2010
How can i select immediate children of an element only. Like i have
<div class="widget">
<ul>
<li><a href="google.com">Google</a>
[code]....
View 1 Replies
View Related
Apr 24, 2009
I've got a reference to a TableCell and I'd like to use jQuery to get the first instance of an <IMG> tag within that TableCell, but can't get the syntax right, I understand how it would work if I were to reference the TableCell by and ID or class, but not when I have a direct reference to the cell, I've got:
What the jQuery syntax should be to get the first img tag within "tdRef"?
View 2 Replies
View Related
May 26, 2009
I've been staring at code for way too long. I have a data structure like:
<ul id="mylist">
<li class="active">Stuff <a href="#" class="movethis">Move</a></li>
<li class="active">More Stuff</li>
</ul>
How do I get the li that doesn't have 'a.movethis'?
View 1 Replies
View Related
Nov 8, 2011
I want to create a menu with 10 div in it and each one show one of the div (with the same number):
[Code]...
View 2 Replies
View Related
Apr 7, 2010
This seems like a relatively straight forward problem. I've searced google and these forums. I just want to select this's last child. How do I do that?
View 2 Replies
View Related
Jul 24, 2010
I have a list (simplified version example)
<ul>
<li><a>Grandfather</a>
<ul>
<li><a>Father <span>Desc</span></a>
[code]....
I want to be able to select the span elements that have a sub ul (ie, Grandfather,Father, but not son or daughter. I tried $('#page-ui li:has("ul") span'), which works for the top level nav that doesn't have any children, but shows up for uncle and son and daughter since it applies it to all the spans inside the first li with a sub ul. I also tried$('#page-ui li:has("ul") span:first-child'), but that didn't help either since all the spans are the first childre
View 2 Replies
View Related
Feb 9, 2011
I'm having a problem with selecting only the first child of my content tree. What I have is
<div id="Ft">
<ul class="Ft_colum">
<li><h3><a href="#">Home</a></h3></li>
<li><a href="#">Demo link</a></li>
<li><a href="#">Demo link</a></li>
<li><a href="#">Demo link</a></li>
[Code]...
View 2 Replies
View Related
Jun 9, 2011
I want to automatic calculate the width of a child div. I have a parent with a fixed with and two children in there. The first has a flexible width due to his content (title of post) and is transparent. The second child contains only a background image and should always fill the rest-width. I tried it like this but it doesn't work [code]...
View 3 Replies
View Related
Jan 18, 2010
I'm using the following to sequentially change the background color of some list items. It works, but is there a direct way of putting a variable inside the n-th child parentheses, instead of concatenating? Second question, more CSSey, though. The highlight goes all the way across the page since the CSS bounding box is 100% for the li items. The lines are various lengths so I can't just set the bounding box to, say, fifty percent. Is there a way to use jQuery to make the bounding box, or background color only go to the end of the text?
View 1 Replies
View Related