JQuery :: Get A Value From Parent Function?
Jul 12, 2010
I am slightly confused, usually I can just find the answer from digging around the net and experminting but not this time! [code]...
I know the problem - I am inside another function which has become the new 'this' but how do I get back to the parent 'this' selector.
View 1 Replies
ADVERTISEMENT
May 4, 2010
At the moment i got the following:
[Code]...
View 13 Replies
View Related
Jan 5, 2011
In parent window
function f1()
{
..code..
}
Inside IFrame
$(document).ready(function()
parent.f1;
);
The above works without any problem But,I am getting the "TypeError: f1 is not a function" on accessing the below code
[Code]...
View 4 Replies
View Related
Jul 17, 2009
I am attempting to use the return value from a nested ajax function as the value for a variable in its parent. However, despite being able to successfully assign the variable within the nested function, it reverts back to its original value after the child function has terminated. Below is the code:
[Code]...
View 3 Replies
View Related
Jun 30, 2009
I'm having a bit of an issue with IE. For some reason on this page: [URL]. When the right panel #content slides in, the background of the parent div #bgfield also slides in with it. I can't find anything linking the two. The line of code for the slide looks like this:
$("#content").css({'margin-right' : '-651px' }).animate( { marginRight: "0px" }, 1200 );
The associated CSS looks like
/* Styles for Div holding the bg image */
#bgfield {
position: relative;
width: 900px;
height: 448px;
border: solid 10px #FFFFFF;
/* background-image: url(images/transparent.gif); -- set this in each page */
background-position: center top;
background-repeat: no-repeat;
background-attachment: scroll;
text-align: center;
padding-top: 112px;
overflow: hidden;
}
/* Styles for main Content */
#bgfield #content {
float: right;
position: relative;
background-attachment: scroll;
background-image: url(../images/rightbg87pc.png);
background-position: right top;
background-repeat: no-repeat;
overflow: hidden;
height: 275px;
width: 651px;
text-align: left;
font-family: Arial, Helvetica, sans-serif;
color: #000000;
margin-right: 0px;
}
View 1 Replies
View Related
Sep 29, 2010
It felt like 99% of everything I do with jQuery involves a database some tree-structure so I figured I'd try jsTree out. I uploaded the demo and the way it seem to work is for every parent in the tree it calls a function get_children (PHP) with AJAX which makes a SELECT-query for that node to get the immediate children.
Am I missing something or isn't that extremely demanding on the database? The way I always do is get as much as I can from the database in one go then put it into PHP-arrays. With that plugin as I've seen a lot is that they put all the database-calls inside a class, do all those queries get pre-loaded or something when you call "new Database"? Or is a SELECT-query for a few rows just not that demanding at all?
View 2 Replies
View Related
Sep 24, 2011
Demonstration page: [url]
Adjust the CSS margins of the BODY element with the first slider. The yellow P (paragraph) element resizes to fit its smaller containing block, as I would expect.
Then, adjust the CSS border or padding of the BODY element with the second and third sliders. The P element does not resize, though its origin changes. Instead, it overflows its containing block.
Finally, adjust the margins again. The P element snaps back into its containing block.
As you can see from the source, this is jQuery 1.6.4 and jQueryUI 1.8 pulled from googleapis.com.
Edit: Client is Google Chrome16.0.889.0 dev-m.
View 2 Replies
View Related
Jul 20, 2005
To validate that a function exists on the page, one must simply use the
syntax:
if ( window.funcName ) //...
However, the same syntax does not seem to work when attempting to validate
that a function exists on a parent window of a popup.
if ( window.opener.funcName ) //...
Is there a syntax that works for this?
View 3 Replies
View Related
Jan 9, 2010
Is it possible to trigger a function in a parent page from a window spawned from that page?
View 3 Replies
View Related
Nov 30, 2011
I want to create a parent class which initialises various stuff and then triggers a 'onStart' function. The idea is that the child classes can then just override this start function and do their thing when everything is initialised.
This is the code I was trying to use but it doesn't work
What I get is the parent start method always being called, not the child one.
I know that using this.onStart is assigning the method to the object not the prototype, so maybe I am mixing my methods here - but I tried it this way and it still doesn't work
What am I doing wrong? Is it not possible for a parent to trigger a method which is subsequently overridden by a child?
View 3 Replies
View Related
Jun 10, 2011
proper way to execute helloThere() from the parent function getHelloThere()? This code is not working for me...
index.html
--------------
<script>
function getHelloThere()[code].....
View 1 Replies
View Related
Sep 4, 2011
I have an embedded iframe that needs to call a function from a parent. The parent then automatically submits a form. It is written mostly using php, but since php is serverside, I need javascript to gather information in iframes. Here is what I have:
[Code]...
I am using opera, if that makes a difference. Should probably try it with chrome and IE...
View 2 Replies
View Related
Nov 22, 2009
I'm developing a site in HTML 5 and SVG, just for the heck of it. I have a portion of the site that uses the <embed> tag to load a new SVG when you change pages, which, in theory, would let me do effects between pages. However, no matter what I try, there is a white flash as the new SVG is loaded into the page. So, I figured I would make the embedded area invisible until it loaded, which was no big deal. But when I tried it, the flash still happened! So, I built a pause function to wait a bit longer. It sill flashes. Anyway, 7 hours later, I've determined that the newly embedded page isn't actually being downloaded and embedded until the end of the changePage() function is reached.
Here's my java script:
var close1;
var close2;
var bar;
var svgLoaded = false;
[Code]......
View 7 Replies
View Related
Apr 5, 2006
The challenge is as above really. I have a page with an iframe in it, and need to call a JS function in the *parent* page, *from* inside the iframe.
(It's for Google Maps, but I won't bore you with the complexities of that, as it doesn't affect the question).....
View 18 Replies
View Related
Sep 8, 2009
Ok...so here is what I have:
function myClass() {
this.checkLogin = function(name,pwd) {
if(name.length > 0 && pwd.length > 0) {[code]....
Everything works above. The first alert shows that this.status was set to 'error'. However, if I call myClass.getStatus(), I get undefined. How can I get the parseData function to set the variables in the parent function?
View 1 Replies
View Related
Jun 16, 2010
I have a popup window that calls a texteditor. I want the texteditor to show the inner HTML of the parent doucument by div id.
When I call the function through a submit (in child window) it workks great, but I want innerHTML to be added when child page loads.
I have tried calling function in body onLoad=getparent; tries adding it to inner script where it calls the editor , again onLoad=getparent;
Tried with and without () i.e onLoad=getparent();
Child window code:
View 2 Replies
View Related
Feb 8, 2009
I have a simple javascript function loadNPlay('file'),
parent.loadNPlay('file');
on clicke event it simply plays the file in a player in the parent window. with IE and Mozilla its working fine but with Safari, when called from iframe this function doesn't work(it does work, ie loadNPlay(..) when called in the same window, in safari)
I have tried:parent.loacation.loadNPlay(..) as well, it doesn't work.
View 2 Replies
View Related
Jan 4, 2011
Ok so I have a site that I want to automatically close the window when the focus is lost from the page. For example, if the user clicks off the page to something else on there desktop I want the page to close. So far I have managed to do this but the grids on my page and the scroll bars all trigger the close function when clicked on. Is there anyway to make the scroll bars and drop down boxes not trigger the function?
This is the code I have so far.
View 6 Replies
View Related
Jan 18, 2010
I have created and opened a child window called "checkwin" and have written some data to it. If the data is valid, I want the user to click on the 'CONFIRM' button on the child window, at which time I want the "submit()" function for the form on the parent window to be executed. If the data is invalid the user clicks on 'MODIFY' and I want focus to return to a field on the parent form. However, when I click on the "CONFIRM" or "MODIFY" buttons on the child window, nothing happens. Here is the code:
checkwin.document.write("</td></tr><tr><td align='right'><input type='button' value='CONFIRM'
onclick='opener.document.personnel_form.submit()'></td><td></td><td><input type='button' value='MODIFY'
onclick='opener.document.personnel_form.first_name.focus()'></td></tr></table>")
View 1 Replies
View Related
Aug 27, 2010
I have a page which has a form and also one iframe in the same. there is a button on the parent form.when the button is clicked, i am submitting the iframe and parent both. forms are getting submitted. but when i do print_r for iframe values, it is blank
[Code]...
View 1 Replies
View Related
May 12, 2010
I have a page. In that page is an iframe, lets name it 'A'. inside A there is another iframe 'B'. there is a link on that page which on click opens a popup. In that pop up, there is actually a document upload facility. Now i want that after every upload (onSubmit), iframe A should refresh.
have done it many times but today its not working.
function validate() {
(window.parent.opener.location.href)=(window.parent.opener.location.href);
window.parent.opener.location.reload(true);// this is tried as well
}
View 3 Replies
View Related
May 6, 2009
I want to change the background color of a <LI> that contains an <A>.
I tried using
$('a').parent().css('background-color','red');
But it did not work.
View 2 Replies
View Related
Jun 23, 2010
I am trying to get the ID of a parent. For example:
<div id="parent_holder1">
<div class="child_div">child div instance one</div>
<br /><div class="child_div">child div instance two</div>
</div><!-- PARENT HOLDER 1 -->
<br /><br />
<div id="parent_holder2">
<div class="child_div">child div instance three</div>
<br /><div class="child_div">child div instance four</div>
</div><!-- PARENT HOLDER 1 -->
When I click any of the children with a class of 'child_dev', I would like to get the ID of the parent the clicked child is within. For example - if I click "child div instance three" it would return "parent_holder2".
View 11 Replies
View Related
Feb 1, 2011
I think this is a small problem but it won't work or I am blind.I have a box with the following code:
[Code]...
View 3 Replies
View Related
Jun 11, 2009
I have a page in an Iframe and when the user clicks a image (href), I want a value to be set in the parent page. I don't know why this is not working.. In the iframe page , dollar1 is the id of the Imagebutton, then I have a hidden variable id= setEndUser. On the parent page I have a textbox
id = Enduser.
$(function() {
$("#dollar1").bind("click",function() {
$("#EndUserT").parent().val( $("#setEndUser").val() );
});
});
View 1 Replies
View Related
Mar 14, 2010
Get ID of a clicked parent ID?
[Code]...
View 1 Replies
View Related