Opening New Tab With Js...?
Dec 15, 2003
I heard elsewhere that this may not be possible; still, I thought I'd check.
I'd like to be able to open a new webpage in a new *tab* if the browser allows for it, otherwise, just a new window.
Possible?
View 3 Replies
ADVERTISEMENT
Jul 23, 2005
I am using the following code to display an image in a seperate
window.
<form>
<input type=button
onClick='window.open("image1.jpg","","width=260,height=260,resizable=0,border=0")'
value=Shhow Picture'>
</form>
I want the window to be the exact size of the image so I set the width
and height of the window the same as the width & height of the image.
The code works, however there is a white border on the top and left
side of the image. If I add 20 to the width and height of the window
then there is a white border around the whole image.
Is there anyway to have the window the exact size of the image,
without this white border? I know there is probably a simple solution,
but I'm a beginner at JavaScript.
View 2 Replies
View Related
Sep 23, 2005
I have a form on a page and when the form is submitted it should open a
new window and post the content to it.
When the script being posted to is a html page, then this works fine,
but when the script being posted to produces an svg graphic, then there
is no 'view source'. Its almost as though the opened page headers are
already set for html and doesn't like the svg xml schema.
Here is the code:
document.report.action="graphic_rpt.cfm?RequestTimeout=700";
var mywin;
if ( !mywin || mywin.closed )
{
mywin =
window.open(mycgi,'view_report','width='+mywidth+' ,height=425,top=50,left=0,scrollbars=yes,toolbar=y es,resizable=yes');}
}
document.report.target = 'view_report'
document.report.method = 'post'
document.report.submit();
mywin.focus();
View 1 Replies
View Related
Aug 28, 2009
I am confused as to why a window will not open if i include certain code. if i use code...
View 8 Replies
View Related
May 1, 2009
I found a script for drop down menus on the web. I use it on my homepage (www.k66t6-mf.com). The script works fine. However when you click on the links the pages open in a new tab or window. I do not want this. Does anyone know how I can prevent this from happening? (I know there is a lot of code, and I'm sorry about that).
[Code]...
View 2 Replies
View Related
Apr 6, 2010
I want to open a new tab "[URL]" when the user presses a key. How can this be done?
View 3 Replies
View Related
Jul 13, 2011
is there a way in HTML or Javascript to open a new window and force it to be a new Window, not a new tab? and also avoid popup blockers??
View 7 Replies
View Related
Sep 9, 2011
I'm trying to open up an internal link from my leftnav div into my content div. I used the following JS code from my book but im not quite sure how to make it all work.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
[code]....
View 3 Replies
View Related
Nov 2, 2010
I am designing a tabless web page.The page contains 2 div sections.One is for menus and other is to display the contents of the page by clicking the menus.I don't want to use frames and iframes.Is it possible to do it using the div tag? The code I had used is show below.
<html>
<head>
<title>Example</title>
<style type="text/css">
div.left {
[Code].....
View 2 Replies
View Related
May 8, 2001
I'm pretty poor at Javascript, but does anyone have any ideas on how I can get a new browser window to open behind the current window when it is opened.
View 7 Replies
View Related
Dec 17, 2006
I have a company web site where I wish to open a search window with javascript. I do know and have used the window.open( for this.
The window that is opened provides a search function an returns a list of results as hyperlinks. I then want the user to be able to select the link from the list and when the link is clicked the 'poped' search window closes and the hyperlink reference be displayed in the window which referenced it in th efirst place.
View 3 Replies
View Related
Mar 23, 2007
Hi I managed to find a way of opening a PDF in a new window using JavaScript.
I warned the user beforehand and opened the new window at 80% height and width of the original window to show it was a new window.
However I can't seem to control XLS, DOC, RTF documents. These are the issues:
1. Firefox: They always seem to open in a new window anyway.
2. Firefox: Firefox opens a blank window as well when the JavaScript is used.
3. IE and Firefox: I can't seem to control the height and width
View 1 Replies
View Related
Apr 15, 2010
I have an html form that calculates a square footage (length x width)
Code:
<center>
<form name="frmOne">
[code]....
View 7 Replies
View Related
Jun 25, 2010
Code that worked in IE6 for opening a new window (window.open) now, in IE8, REPLACES the window with that code, on the same tab.
and the HTML code <a href=... target="newWIn"> is ignored, but if I delete the "target=..." it too replaces the current tab contents.
How do I open a new window, or at least a new tab, in IE8?
View 4 Replies
View Related
Jul 23, 2005
I need some help with closing a popup window. I'm making an online portfolio,
that has one base page with text and thumbnails. When a user clicks on a thumb,
a new window opens containing a larger image and a caption (each contained on a
separate htm document). I do this with a function in the header script as follows:
var picpage=" ";
var params=" ";
function fullpicwin(picpage,params)
{
window.status="Opening picture... please wait";
window.open(picpage,'fullpic',params)
}
picpage (the name of the htm file), and params (window size, etc.) are passed
from the click code by each thumb. Each popup is sized differently, of course,
based on the side of the larger photo. All controls, etc., in the popup are
turned off. The user can click the "x" box or a form button at the bottom of
the popup to close the window.
All this works very nicely... EXCEPT...
The user can move the mouse back to the main page and open ANOTHER popup by
clicking on another thumb BEFORE closing the existing popup. The problem is the
2nd popup retains the size of the first, so of course the photo may be blocked
by the borders, etc.
What I want to do is force the closing of the first popup if the user tries to
open a 2nd and so on. There is no reason to have more than one large photo
showing at the same time.
I thought I could put some code in the function that checks for the existence
of a window named "fullpic", and if it's there, closes it first, then opens
another. But I can't seem to get the syntax right.
View 1 Replies
View Related
Jul 23, 2005
I am trying to find out how to position an opening window in Internet
Explorer.
While in Netscape/Mozilla/Firefox exist the options screenX and screenY for
the open method of the window object, I couldn't find anything similar in
IE.
View 2 Replies
View Related
Jul 23, 2005
Can a window be opened without a titlebar? Can an alert message box be opened without a titlebar and an OK button?
I'm trying to display something like a tooltip when the onclick event occurs.
View 6 Replies
View Related
Nov 18, 2006
How can I make this script I generated with HomeSite, open links in new
windows/tab instead of the same? ....
View 4 Replies
View Related
Sep 8, 2011
I am animating a slider.I am using setInterval to loop the animation.This works fine...However...If you open a new tab, or minimize the browser window... when you come back the animation speeds up for a bit and then slows down again...Any ideas why this would be?...I suspect that while the browser window is not active it stores up the setInterval functions and then runs them at once when the window is active... speeding up the animation.
View 1 Replies
View Related
Dec 5, 2011
We have a page which contains an iFrame. The page which contains the iFrame opens up half way down and not at the top.
is there a way in css to open up the page at the top?
This is the code which calls the iFrame:
Code:
<iframe src="Page1.aspx#myAnchor" width="975" height="180">
If I remove the #myAnchor from the url - it does work ok. But we want the anchor tag there to open up the iFrame window at that point.
(Its the parent page which we need to open up at the top).
View 3 Replies
View Related
Jan 17, 2010
ok so here what i want to do:
i want a dropdown menu
i want a button (go)
i want ten different items in the dropdown menu
if i choose the first item and click go i want a new page to open in the same window
if i choose the second item and click go i want to a different page to open in the same window and so on
all ten items lead to a different link when i click go....how do i do this?
View 3 Replies
View Related
Jul 20, 2010
Trying to adapt a bit of Code, but failing wonderfully!
I'm writing in Cold Fusion, but using a little java script to create the sliding effect.
It's from a sliding open list function in another site, and I tried to just hack my current needs in there.
Is followed by:
I've tested the script, div and the DB call by just calling it with
And that works fine.
I've never coded in Java, hence the problem!
View 5 Replies
View Related
Feb 18, 2011
I am opening a new small window through javascript.
Here is the code:
But on the same page I have another link for a new window which is essentially the same code:
As you can see in the red text, one link should open map.asp and the other should open pofull.asp... but they BOTH open in pofull. So I have tried to change the function name for one of them but then it doesnt work at all.
I have tried everything to separate the two scripts but nothing has worked.
View 2 Replies
View Related
Mar 22, 2011
What I'm doing wrong with this page? [URL]. The reason I'm writing is because the images aren't opening.
View 2 Replies
View Related
Aug 8, 2011
Im having problem with this slideshow I wanna do. Im a beginner and dont really know how to do, when I want to check the small pictures, and then open a bigger version of them in another page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
[Code]....
View 5 Replies
View Related
Sep 6, 2011
How do I open a window from within a .js file?I want to do this, below in a .js file like I would in a html file.
<a href="google.co.uk" class="thickbox"></a>
View 2 Replies
View Related