Javascript 'target=_blank'

Jul 20, 2005

i am doing an fprotate.class pictures and for the click link i'm trying to
get it to open in a new window. here's my command line and it opens in the
exisiting window:

<param name="url" valuetype="ref" value="http://www.mywebsite.com">

anyone have know what script text i put in to get hte page to open in a NEW
window similiar to the html [target="_blank"]

View 2 Replies


ADVERTISEMENT

How To Get A Javascript Link To Open In A New Window Like Target=_blank?

Apr 12, 2007

Code:
<a href="#" onclick="window.location='http://YourSite.com'">click here</a>
I want to make it so that it opens a new normal browser window just like target=_blank does.

View 3 Replies View Related

Target="_blank" Functionality - Target Page To Open It As Top Location From Within An Iframe

Mar 24, 2011

I am using the following javascript on the target page to open it as top location from within an iframe, which is working ok.

<script type="text/javascript">
if(self!=top) {
top.location.href=location.href
}
</script>

However my problem occurs when the user uses the browsers back arrow to return to the previous page, the script executes again returning them once more to the page they have come from. Is anyone aware of a work around to this problem as it would seem there isn't one? perhaps even a better solution for opening the target page from the iframe as top location. This is really causing confusion for users, and I really need to get the issue fixed.

View 2 Replies View Related

Adding A Class To All Links With A Target Of _blank

Jun 26, 2010

adding a class to all links with a target of _blank

View 12 Replies View Related

Form - New Window / Tab - Target="_blank"

Jun 30, 2010

i have a little problem with the target attribute ine the form below...

Code:
<form id="formReport" action="<?php echo $reportlink;?>" method="post" target="_blank">
<input type="hidden" name="reportProject" value="1">
<input type="hidden" name="idProjectRevision" value="<?php echo $idProjetRevision; ?>">
<input type="hidden" name="generateButton" value="<?php echo $bouton_generate_report; ?>" >
</form>

this form is submitted using the following .js code in order to generate a pdf Code: document.getElementById("formReport").submit(); the problem is that i get a popup (blocked by firfox by the way) instead of a new window or a tab, how do i solve this?

View 4 Replies View Related

Open Links In Target-="_blank"?

Oct 30, 2010

I need to add [target="_blank"] to the code below but I can't figure it out.

[Code]..

View 3 Replies View Related

Open In New Browser Window (like With Target="_blank", Not Window.open)

Dec 1, 2011

Code: window.location but have it open in new browser window (like with target="_blank", not window.open)

View 7 Replies View Related

Foist Javascript Into Another Frame, And Evaluate It In The Target Context

Dec 16, 2006

I have an outer page and an inner iframe. The outer page calculates some
javascript, and wants the inner frame to run it. The inner frame should hit
a page on the same (private) web server, so this is not a cross-site
scripting attack. But I would prefer not to taint the target page with any
extra logic to do this. (I will if I must.)

The calling page has these elements:

<script src="/javascripts/prototype.js" type="text/javascript" />...
<span id='update_me'>yo2</span>
<iframe id='grinder' src='sample.html' >
</iframe>

So here's most of the page which the iframe hits:

<script src="/javascripts/prototype.js" type="text/javascript" />...
<body bgcolor='silver'>
<span id='update_me'>yo</span>
</body></html>

Note that both the outer and inner page have a span with the same ID.

This question will resemble a JavaScript FAQ - how to evaluate Javascript on
the fly, or how to reload a JS file. The answers on the web generally do not
transport the JS across a frame boundary, so they don't address the bug I
encountered, and I can't tell if prototype.js or IE is at fault.

The outer page calls Ajax goodies that generate some JS looking like this:

Element.update("update_me", "here I B");

The page sends that, as a string, into this JS (in application.js):

function update_grinder(sauce)
{
var grinder = $('grinder');

if (grinder)
{
var doc = grinder.contentDocument;
if (!doc) doc = grinder.document;
if (doc)
{
evaluate(doc, sauce);
return;
}
}
document.write("your browser sucks");
}

So that contains enough logic to find the iframe's document, and it works
for Firefox, IE, Konqueror, and Opera. The code calls evaluate() with the
document where we need the evaluation context, and the string with our
source.

Here's evaluate():

function evaluate(doc, sauce)
{
var s = doc.createElement('script');
//s.defer = true; // <-- no effect
s.text = sauce;
var body = doc.getElementsByTagName('body').item(0);

if (body)
{
body.appendChild(s);
return;
}
body = doc.body;
if (body)
{
body.appendChild(s);
return;
}
}

That creates a <scriptblock, sticks our string in as its contents, and
pushes the block to the end of our <bodytag. Now here's the bug:

Firefox updates the inner <span id='update_me'>, and IE updates the outer
one.

If I remove the outer <span id='update_me'>, then IE simply can't find it
and throws an error. Even though it evaluates a script block clearly in the
context of the inner iframe.

I have tried calling the script from setTimeout, and from a button's onclick
handler.

Is there some script.aculo.us way to fix (yet another) bug in IE? Or is this
a bug in prototype.js?

View 15 Replies View Related

<form> Target Won't Target Window

May 19, 2011

i want to submit form data from the popup window, close the popup, and load in the main window. problem is, it always opens a new 'tab'. i'm using google chrome, i didn't think to try this in

in the <head> of the 'main' window:
<script language='javascript' type='text/javascript'>
window.name='main';
</script>

[Code]....

View 4 Replies View Related

Window.location.replace To _blank Possible?

Apr 12, 2006

Trying to automatically redirect to a new window.

View 2 Replies View Related

_blank Page Open Parent?

Jan 19, 2010

I have a page that open a new window witn _blank target.At this page I want to reload the parent window or even better to reload a div with ajax.I tried this window.opener.reload() but did not work.

View 1 Replies View Related

Resize Image Link Sent To _blank?

Aug 17, 2011

I have a situation where I'm sending full sizes images to new windows from linked thumnails. Using _blank, the window is rendering at a very small size, and the image scales to that size on some browsers.

I want the window to be larger when it comes up, and the image to display maximized (not scaled). I know how to resize the window from javascript in link-side docs, but not in linking-side docs.and no idea how to max the presentation of the image.

View 1 Replies View Related

Manual Select To Open A Link In _blank

Aug 9, 2006

If you have one or several links on your webpage, it could be your links resources, you might want your viewers to have the choice of opening the links in _self or in a new window / tab _blank

This service can be provided by a simple JavaScript function:

This code goes in the head section:

<SCRIPT LANGUAGE="JavaScript">
<!--
function mylink(target)
{
if (target) where = "_blank";
else where = "_self";
for (var i=0; i<=(document.links.length-1); i++)
{
document.links[i].target = where;
}
}
// -->
</SCRIPT>


And this code goes in your Body section:

<form>
<input type="checkbox" name="targetnew" onclick="mylink(this.checked)">
<p>Do you want to open this link in a new window?</p>
<p><a href="http://www.codingforums.com">CodingForums</a></p>
</form>

You can add as many link in the form section as you like and choose if each link should have a checkbox or just one checkbox the decides all the targets.

View 1 Replies View Related

JavaScript: Save Target As / Save Link As

Jun 29, 2000

When you right click on a link you get the option to save target as...(ie) and save link as...(netscape). Is there some JavaScript to call this function like the JavaScript to open a new window?

View 3 Replies View Related

Open A New _blank Type Window When A User Submits

Mar 2, 2009

I need to find a way to open a new _blank type window when a user submits. I have found a few answers but none that fit what i need. alot tell you to use target blank on submit, but i have two buttons that do 2 completely different things. Is there a way to achieve that? here is the code i use!

<form name="done">
<div class="photoContainer">
<p class="process">Photos Successfully Uploaded</p>
<div class="processbtns">
<input class="button space" type="button" target="_blank" value="View Photos on ebby.com"
onclick="window.location.href = 'http://www.ebby.com/details/<?=$propid?>.html';"/>
[Code]....

View 3 Replies View Related

Edit - Open The Links In Select To _blank Not To A New Window

Nov 1, 2010

[Code]...

And i need edit this code that it open the links in select to _blank not to a new window

View 4 Replies View Related

JQuery :: Div As An Anchor ("_blank")?

Jun 25, 2009

I'm trying to get a link to open in a new window, I have the following jQuery so that the whole div is clickable.

$(document).ready(function(){
$(".promoBox.anchor").click(function() {
window.location=$(this).find("a").attr("href");return false;

[code]....

View 1 Replies View Related

Target Frame

Jul 23, 2005

I have a frames based website, my java menu is in frame "contents" but I want it to load the page in to frame "main", here is the code i have so far:

View 3 Replies View Related

JQuery :: Get The Value Of The Id When Using .target?

Oct 9, 2011

I want to know what div id I clicked on. My code looks like this:

[Code]...

I want to just know what the value of the div id is, in this case it would be "elem1". I saw .nodeName returns "div" but there's no .idName.

View 1 Replies View Related

How To Target DOM Node

Aug 23, 2007

I am trying to target specific DOM nodes in order to change the background color.

The html code is:
<div id="rightcol"><h1>Highlights Regional</h1>

<div class="art"><a name="clergy"></a><h2><a href="clergy.html">Understanding Addiction: Recovery Tools for Clergy and Other Congregational Leaders</a></h2>
<p>A unique opportunity for clergy and congregational leaders.</p></div>

I am using this javascript phrase:

var x=document.getElementById('rightcol').getElementsByTagName("A");

It is returning all of the links within 'rightcol'. What I need is the anchors, which I wish to address by individual name.

View 3 Replies View Related

Popup Box Target

Oct 6, 2005

I'm really weak at javascript,so i need some help here regarding popup boxes.
Currently,i have a file called main.htm, and when i click on a link it will bring me to my popup page called popup.htm,which is populated with buttons (say alphabets a-z). What happens is that when i click on any of those alphabetical buttons, say 'a', the letter 'a' will appear on my textarea that is in my popup box. However,i want it to appear on the 'main.htm' popup box instead. Is that possible? How do i do it?

View 3 Replies View Related

Target Div Tag Like Frame ?

Mar 2, 2011

I have 2 divs in my webpage. One div has links (using anchor tag). When I click on the link, I want the webpage in href url to open in other div. Can I do it using Javascript.

View 6 Replies View Related

More Than One Target In LocalScroll?

Apr 11, 2011

Code:

jQuery(function( $ ){
$.localScroll.defaults.axis = 'x';
// Scroll initially if there's a hash (#something) in the url
$.localScroll.hash({

[code]....

I'm trying to target more than one DIV -#slider_content- so that I may have the sliding effect more than once on the same page.

View 4 Replies View Related

Target A Link To A Div Tag

Feb 5, 2005

Does anyone know how to target a link to a div tag. Basically instead of using an iframe, im using a div tag with overflow, and I want to have it so when a link is clicked, that href is loaded in the div tag..

View 1 Replies View Related

IE-only Filter: Target IE 5.5.x --> 6.x/PC? Best Way?

Apr 7, 2007

What would be the best way to test for IE only, and IE less than 7 (without conditional comments)?

I want to apply alphaImageLoader via a JS function, but I am not sure of best way to only target IE 5.5 --> 6/PC.

Any tips?

View 9 Replies View Related

Can't Set The Onclick TARGET ?

Aug 7, 2011

I'm trying to obtain the object of the element on the page that is clicked, but my code is unable to set the target. Here's what I have.

The JavaScript

CODE:

The Form

CODE:

What I want to do is get the target element(the submit button) so that I can get its sibling(it contains a unique ID). But it's not working.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved