Javascript Window Properties ...
Nov 8, 2005Is it possible to remove the site address from the title to a javascript window?
View 3 RepliesIs it possible to remove the site address from the title to a javascript window?
View 3 RepliesI'm getting errors in Firefox everytime I try to run this frame resize code, but it works fine in IE. I can't seem to figure out what the problem is with it.
The error is: Error: theFrame has no properties
Line: 8
The line that the javascript console is showing an error for is in italics.
code from page:
<html>
<head>
<script type="text/javascript">
var defaultCols="100px,*";
var hiddenCols="0px,*";
function ShowHideMenu(){
theFrame = document.getElementById("framed");
if(theFrame.cols == defaultCols) theFrame.cols=hiddenCols;
else theFrame.cols=defaultCols;
}
</script>
<frameset cols="100px,*" name="framed">
<frame src="lframe.htm" name="frameMenu">
<frame src="mframe.htm" name="content">
</frameset>
</head>
<body>
</body></html>
Come someone let me know what I'm doing wrong here?
I have a quere.How to get the url from the properties window in internet explorer using the java script.Ex: I opened browser and navigated to[url]....Now I right clicked on the page selected properties option.In the properties window i need to get the url using java script.
View 1 Replies View RelatedI would like to generate a page of links including some of the pdf properties (title, author, version, etc.) for a folder full of pdf's. Is this possible from Javascript?
View 4 Replies View RelatedI want to be able to pass the width of a window to CSS properties. Specifically I would like the width and left-padding of a DIV to be the exact pixel width of the browser window. Ideally, if the user resizes the window, the CSS would update. What is the simplest way to do this?
View 4 Replies View RelatedIn javascript I need to pass a variable or function or something from the parent window to the child window. There will be a URL in the parent that needs to be passed into the child so when you click on the link in the child window it pulls in the link from the parent's js. Like this (ignore my rubbish javascript as I'm just writing it to explain my point!)...
Parent window var variableName="http://www.google.com" (send variable to child window)
Child window (pick up variable from parent window and drop it into the link's URL)
<a href="(variableName);">google</a>
This might seem like a crazy way of doing things but it's totally neccasery in the project I'm working on for various reasons.
Not sure if its a variable it needs but either way it needs to be in the js somewhere in the parent and the child needs to read it within the link. Everywhere I've looked on the internet shows how to do this with forms etc but I can't make it work for a URL.
Is this correct?
window.pageXOffset/pageYOffset = how much page has scrolled in standards compliant browsers
window.innerWidth, window.innerHeight = viewport in standards compliant browsers
What browser supports these properties?
document.documentElement.scrollWidth
document.documentElement.scrollHeight
document.documentElement.scrollLeft
document.documentElement.scrollTop
document.documentElement.clientWidth
document.documentElement.clientHeight
And does document.documentElement.scrollWidth and document.documentElement.scrollLeft return the same value?
how the class attribute works in CSS: I can specify that every attribute with class="foo" be italicized with: .foo {font-style: italic;}
What if I want to do the same sort of thing in Javascript? Is there something built-in like document.GetElementsbyClass("foo").style = "italic" (I'm just making this code up of the top of my head, I don't know how javascript works.)
It seems to me that with JavaScript you're supposed to use the name="" attribute instead of class="". Why the diference?
I looked at webmonkey that had an article about this, but their writing style is simply confusing and I can't make heads or tails of their articles.
how to add extra properties to html elements as I was storing data in html attributes. After looking at some others code including Raphael and this addEvent code. [URL] They seem to treat objects just like an array. obj[property] = value; This would have been extremely helpful to know previously as I have needed to be able to include variables in property names - but have resorted to making the whole thing a string and calling exec() on it.
View 2 Replies View RelatedI have a couple of utility windows - a calculator and a calendar that popup
from my main window. I would like them to always stay in front of the parent
window until they are shut down with there own close buttons. As it is, when
you click back to the parent window, of course it comes in front of the
child windows. Can I do this?
Is there a way to make a javascript do something when the user closes the
browser? I would like it to go another url or something.
I do not want this script to run when a user clicks on a link on the page,
only when they close the browser.
I have a rather lengthy javascript application that I want to run in it's
own window. It looks like it is no problem to do using the window.open and
document.write commands, however this seems like a lot of extra code to wrap
every line of my javascript with mywindow.document.write(""); Is there
anyway around this or perhaps a different approach to running javascript in
it's own window?
this function should open a popup showing an image automatically
adjusting browser window's height and width. It works fine with IE6 but
not with IE7. In IE7 opens popup too small. why ? Code:
Is there any way to have a browser window resize itself when
displaying a new HTML page? I'm using the javascript below to open a
NEW window at a certain size, but I'd prefer the page to load in the
same window, just sized differently. Here's the script I'm currently
using:
<a href="#" onClick="MyWindow=window.open('THE_DOC.html','MyWindow','to olbar=no,location=no,directories=no,status=yes,men ubar=no,scrollbars=yes,resizable=yes,width=575,hei ght=805,left=20,top=20');
return false;">
<script language="JavaScript">
function link () {
msgWindow=window.open('http://anylink/index.html','link','border=0,directories=no,height="100%",left=1,location=no,menubar=0,resizable=yes,scrollbars=yes,status=yes,toolbar=no,top=1,width="100%"');}
</script>
<a href="javascript: link ()">any link</a>
The situation is: in Win2000 open OK in respect to the width & height referer in script.
But on WinXP, this link open on a litle window.
Does anyone know how to open a window that's a particular size and centers it on the screen?
How can I create a popup message window, with a custom message, that asks a yes or no question? If they click yes, it can load another script or a page, if they click no it leaves them where they are? Can someone give me an example?
View 2 Replies View RelatedPlease let me know to execute specific javascript code when the browser is exiting.
When a browser is closed i want some code to display images or text to be executed.
We've got a CDROM with a Flash Projector movie on it. Within the
Flash projector (which is already burned on CDROM...can't change it),
we have the typical getURL fuctions to open a Web browser and browse a
link. This works fine when there isn't a browser window already open:
the link opens in the FOREGROUND, infront of our Flash Projector.
However, now we've got a problem since after we've burned the CDROM,
if a user has a Web browser open already, and clicks a link within the
Projector, the new window does not come to the front...it simply stays
behind the full-screen projector.
So, we've tried putting an onLoad="window.focus;" tag in our BODY tag
on the web pages our Project is linking to, and that actually worked
at first (the pages are ASP Classic). However, they're not working
anymore. We're really not sure why.
When we load that page, quickly flip to another via ALT-TAB, the first
page DOES come forward. However, it doesn't seem to come infront of
another application. So, if we hit reload for the above page, then
quiclkly ALT-TAB to MS Word, the page will not force itself infront of
Word.
I open a window from JavaScript with w=window.open, write content with w.document.open,w.document.write, w.document.close. I specified charset with:
<meta http-equiv="Content-Type"
content="text/html; charset=ISO-8859-2">
but did not help much. In Internet Explorer w.document.charset="ISO-8559-2" after w.document.open solved the problem, but with Mozilla this do not work. There is a w.document.characterSet, but this is read only. Mozilla seems forcing UTF-8 - is there a way to change this?
I have a form that I would like to get the values entered on the page
and go to a new page in the same window. I can make the code work to
open a new window, but I need it to open in the same window. Here is what I have:
function pass_info() {
var info = "";
info += document.form2.productWeight.value;
window.open("/page/shippingrates/calculate_shipping_before.asp"
+ "?" + "weight=" + info,");
}
I know that it is the window.open, but I have not figured out what I
need to do to get it in the same window.
Is it possible to send attributes into this function to change the
print preferences from Portrait to Landscape with IE 6.0 set as the
standard browser? Right now I'm using
javascript:window.print()
as the command.
Clients want it and I want to confirm it's not possible. If I'm using
an old, deprecated process, please give me a heads-up. I'm no
Javascript genius.
I want to make a capture window in
*standalone* (in a *.js file) javascript, much in the same way as the
VBscript inputbox() function. I can make it inside a *.html file with
the prompt() function.
Or, is there a way to make a window and then work with this window?
I use the following code to open a javascript window. Is it possible to
modify this to have the standard toolbar open in the window?
<script language="JavaScript" type="text/javascript">
function popup()
{
window.open( "http://www.mysite/subfolder/page.asp" , ""
,"top=0,left=0,width=790,height=540,scrollbars=yes" ) ;
}
</script>
I've written a Fax Cover Sheet generator web page for the company I work for. The user inputs all the information into a form and clicks 'print'. I do not know CGI, so i've accomplished the tasking using javascript to generate a pop-up window containing the formatted information from the form. However, no matter what I try, I can't get the browser to print the pop-up box instead of the main window. Can someone help me?
Here is sample code that imitates how the real page works:
I would like to have a page on my site containing links to external URLs. When I click on these links, a new window should open with the new URL and some text formatting javascript (or other language) code be applied to it. This would be like loading a new URL and then apply a bookmarklet to it. But I want to be able to do both in one shot. you click on the link, open a new window, and apply the code to the URL. Also, when you open the new window, the location bar should show the external URL, not mine. It doesn't have to necessarily be done with Javascript.
View 1 Replies View Related