How To Reference Parent Browser
Aug 23, 2005
i have a custom button on the browser toolbar which points to a html application (HTA) which launches it when clicked.
an instruction such as
window.location.href
gives the URL of the HTA rather than the browser that launched it.
how do i reference the DOM of the browser from the HTA?
i have winxp sp2 with ie6.0
View 1 Replies
ADVERTISEMENT
Sep 11, 2007
I have an error when I try to make:
CustomObj =
{
is_all : Compatible(),
Types :
{
PASS : CustomObj.as_all ? "ok" : "onok",
...
...
...
but in an object literal notation I cannot use a parent object
variable? or
can I do to create a global variable inside my parent class
(CustomObj) and
than to use in my children objects like Types?
View 1 Replies
View Related
Feb 27, 2011
I have an iframe that can successfully reference its parent window, using the following code:
var elm = window.parent.document.getElementById('iframesID');
This works flawlessy in all browsers, EXCEPT for some reason, Safari 5 on Mac (Safari 5 on Windows works fine).
After debugging a bit, I found that the script breaks exactly on that line, and alerting the value of window.parent returns undefined. Going nuts! I Googled this specific question way too long and found no responses.
View 3 Replies
View Related
Mar 3, 2011
I'm new to jQuery and Javascript overall, I have searched the internet to make use of jQuery instead of the HTML's iframe tag. My problem is links inside a .load file, I want them to refresh the box on the index.php file, not the file itself (in this case the links are in blog.php)
Here's everything I can provide with:
Files:
"index.php"
"blog.php"
In my index.php file I have this script to make my index.php links open the required file in my div box.
"index.php"
<script language="javascript" type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#html").load("blog.php"); // shows the blog.php when I first enter index.php, which I want to have
$(".link_click").click(function(){
$("#html").load($(this).attr("id"));
});
});
</script>
Here's "index.php" link:
<a class="link_click" id="blog.php">Blog</a>
Here's my div box in "index.php" where I show the information within the loaded file:
<div id="html"></div>
All this works, but here's my problem, I have multiple links within "blog.php" which I want to make "index.php" to refresh the "index.php"'s html div. Is there some kind of way to edit the "blog.php"'s script to make it "index.php" the parent or reference?
"blog.php"
<script type="text/javascript">
$(document).ready(function(){
$(".link_click").click(function(){
$("#html").load($(this).attr("id"));
// Need to change this(?) to make it reference the index.php's html div box
});
});
</script>
View 2 Replies
View Related
Nov 23, 2006
I have been working on a site where I have already created 27 pages which has navigation using the classic unordered list with list items within and anchor tag links within the list items. I have already put ID on the list items which are three per page and have much CSS associated with these IDs. So I really would not want to change where I have put the ID on my tags at this point. I have written a script which is much more complicated than the two illustrated below however to two below serves to illustrate my problem. I had vaguely remembered that the Dom for Firefox and Internet Explorer was not exactly the same. But I didn't think of this when I started my site creation.
Consequently I need a way of getting a reference to my child anchor tags from my parent IDed list item tags. I know how to do this now for both Internet Explorer and Firefox but not at the same time. So my question is how do I do this? Is there one best way of getting a reference to a child tag that works both in Internet Explorer and Firefox? Is there one easiest way? Is there many ways of doing this? Please tell me what way you know of doing this. And please don't hesitate to respond to this posting if it has already been answered for I would really appreciate as many answers as I can get. Code:
View 4 Replies
View Related
Nov 13, 2011
I'm using window.showModalDialog but having an issue trying to set the parent window(main browser). I open modal window A which is then opens modal window B, top of modal window B onload I do window.opener.close()". My issue now is when i'm finished with B I set parent window(main browser) to a new url with window.opener.location. So my problem is modal window A the parent has been closed so window.opener.location will not work.
View 3 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
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
Mar 15, 2006
This code does not working in Mozilla. Works fine in IE.
--------------
<input type=text value=100 name=textbox>
<script>
alert(textbox);
</script>
--------------
This perhaps, because of Microsoft policy to globalize all tag names. Is there any method for cross-browser fix without using getelementbyid? Is there any method to pass values from outside of <script>, inside? (something like "global" in php functions) Javascript must be kept inside <script> tag.
View 24 Replies
View Related
Apr 7, 2005
i'm wondering how i can get a reference to the next td in a row? Do i need to assign all td's an id or something? i could do that failry easily because the table gets generated dynamically via a php function.. i just hink this would be nice that way when i go to delete something (with those infamous checkboxes) i would like the javascript prompt to display what it is that will be deleted..
View 7 Replies
View Related
Jul 23, 2005
I need to do a function in javascript to check or
uncheck all checkboxes with the same id. I want this function to work
in every form and every page of my site, as I will use the same id
("sel") for all checkboxes in the site. So I need to refer to these by
id. Code:
View 4 Replies
View Related
Aug 31, 2006
I have a form that appears several times on a page, and would rather not assign IDs. Is there a way to have my validation function focus() a text input without IDs?
View 7 Replies
View Related
Jul 25, 2009
i have this code:if (! $_POST["Name"] || ! $_POST["LName"] || ! $_POST["email"] || ! $_POST["phone"])
{
$Alert_Message = "Invalid Form";
}i got a js script from another forum here on this site that looks like this, and does work well:print <<<JSOUT
<script type="text/javascript">
confirm("Form is INVALID");
[Code]...
exit;i have 4 different messages that i want to choose from to be displayed in the js script, and I want to store the message that i want to use in a PHP variable along the way. the variable is: $Alert_Message . i am trying to do this with my confirm() function in js:confirm($Alert_Message);the code is not registering, so something is obviously wrong. can i reference PHP this way in a js script? if not, how would i go about doing this another way? can i change a js variable along the way in my PHP code instead, and then reference THAT variable when i get to my js script?
View 1 Replies
View Related
Apr 20, 2011
The following code is working fine in firefox n not working in IE8... I get the Object Expected Error when the code hits the if(GBrowserIsCompatible())..... line in the javascript code. Clear cache and browser history does not work. Does anyone have a resolution for this?
[Code]...
View 1 Replies
View Related
Oct 23, 2007
Is there a way in Javascript, or perhaps in HTML, to force a browser to
re-render an image on an HTML page after a round-trip between the client
and the server ?
In my particular case, the image is changing on the server although the
URL for it remains the same, but the browser is still displaying the old
image from its cache rather than the new image from its URL location.
View 8 Replies
View Related
Oct 24, 2011
I want to use jquery to detect what type of browser you are using and display a link to a .wmv file if you are on IE or display a link to a .mp4 file if you are any other type of browser.I have this script declaration in my <head> section.
<
script src="http://code.jquery.com/jquery-latest.js"></script>
In the body section I have the following
<div id="block"></div>
<
script type="text/javascript">[code]....
Nothing is being output on the page at all. I've tried to patch this together from various example on various web sites. How can I make this work?
View 1 Replies
View Related
Sep 18, 2010
On my site i use a lot of features that are unsupported by older browsers, and right now it looks pretty stupid when the features are only partially shown. So i was wondering if there's a way of making the browser look to different css files depending on which browser and version it is. For example, css3 gradient backgrounds are supported in firefox 3.6 or something, but not in 3.0. All the hacks out there is to 3.*, so it changes for the allready working 3.6 too if i hack it. I want to controll it so that i have a specific css file for the none-supporting version and lower and one for the supporting and above. I looked at a bad browser plugin (because it has some of the basic features im looking for)
View 15 Replies
View Related
Jul 23, 2005
We're in the process of re-writing the Intranet at work, and my javascript
knowledge could be written on the back of a post card. ;-)
Can any of you point me in the direction of some code that would enable a
form to open a specific pdf file? Details are below.
--------------------
All of our purchase orders are saved back to pdf files. Each pdf has the
prefix "PO_" followed by the po reference, then the file extension ".pdf".
For example, our file would be called "PO_12345M.pdf".
Each set of files is archived into years (folders are called 2003, 2004,
2005 etc.) so it will probably need a drop down box to select year, unless
it can search through all the folders.
The visitor should only need to enter the PO reference, and the code puts
the "PO_" and the ".pdf" on the end of it, and hey presto Acrobat opens with
the PO, or you get an error dialog if the file cannot be found.
--------------------
View 2 Replies
View Related
Jan 4, 2006
Since a few years I make use of an online service which provides me
statistics about visits to my web site. The only thing I have to do is
to include a few lines of Javascript in the most important page. The
company providing this service - Nedstat - has been acquired by a more
commercial party called Webstats4U and they have now decided to cause a
popup window to appear with a commercial message, every new day you
start up the page. Given the nature of the web page, this is
unacceptable. Does anybody know how to check whether a window has been
opened from a page and - if so - how to get a reference to that popup
window so that I can close it?
View 1 Replies
View Related
Jul 8, 2006
Example: I have an aspx page with several fields and a grid. When I
click on the grid i use js to poulate the form layout. I have maybe 15 different forms each with a different table. I have a lot of common js code that I put in a
separate file.
I have a function in that file that needs t obe specific
to each webform because the data is different. so in the separate js
file from a common function I want to call
PopulateSpecificForm(DataRow) and put that method in each webform.
It doesnt work? any ideas?
View 1 Replies
View Related
Oct 14, 2006
I've been doing this to get a reference to the body node of a document,
but I'm sure there must be something simpler than this:
var arrayOfBodyElements = document.getElementsByTagName("body");
var referenceToBodyNode = arrayOfBodyElements[0];
I tried:
var referenceToBodyNode = document.body;
and:
var referenceToBodyNode = window.body;
both of which got me "body undefined".
So what is the right way to get a reference to the body?
View 1 Replies
View Related
Jul 20, 2005
I'm working on an asp.net site and am trying to implement a popup help
window. I want the window to close when the user advances to the next page
in our application. The thing is, I'm doing this on a component basis and I
don't have access to the body tag from within my help component, so I can't
add the onunload tag. Is there some other way of achieving what I want? Can
I add an eventhandler to the body tag through javascript?
View 2 Replies
View Related
Jul 20, 2005
I am writing a validation function: what I want to do when an error is detected is to open a second window containing error messages. The form being validated is rather long, and there are several points in the code where I write the messages. So, I would like to have a separate function just to open the second window with an appropriate title (something like "the following errors were detected in your form"). something labout like this:
View 2 Replies
View Related
Sep 15, 2010
What I'm trying to do is when the mouse hover on the level1 class, I want level2 class change it's background color. But I do not know how to reference a subclass.
<div class="level1">
<span class="level2">One</span>
</div>
[code]....
View 4 Replies
View Related
May 31, 2010
Where can I find API reference ? for example, on the web, I found Dates documentation[url]...
then I try to find similar docs in official JQuery website, failed.
View 6 Replies
View Related
May 30, 2009
I'm looping thru all the document form elements with the below loop. While looping I would like to know if this element is from the second table in the form. My issue is the table has no name. How can I know if I'm dealing with an element that is in the second table of the form?
Code:
var field = document.forms['ovrFrm'].elements;
for (i = 0; i < field.length; i++) {
//DO SOMETHING HERE
}
View 1 Replies
View Related