Backwards Pop-up

Apr 20, 2007

found a script and tested it with firefox & iexplorer 7 and it works to pop-up a window in both programs the weird thing is that it works backwards i mean, the pop-up opens as the main window and the main window becomes the pop-up, of course i could just invert the files, make the pop-up the link and the main page the var on the script to pop-up but got any ideas on how to fix it? Put this script after <body> tag on any html file, notice the pop-up.html reference.

<script language="javascript"><!--
var isIE=document.all?true:false;
if (!isIE) document.captureEvents(Event.CLICK);
function popW(url){
t=Math.round(Math.random()*250);l=Math.round(Math.random()*600);
if (navigator.appName=="Netscape") {oWin=window.open("","_blank","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");}
else{if (navigator.appName=="Microsoft Internet Explorer"){oWin=window.open("","","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");}}
if (oWin!=null){oWin.resizeTo(360,550);oWin.moveTo(l,t);oWin.location=url;}
try {window.event.cancelBubble=true;}
catch(e){};
}
function popW2(clkEl){
try{s=clkEl.href; ;popW(s);clkEl.href='pop-up.html'}
catch(e){};
}
//-->
</script>

Let's say thats your intro page so just put a link to get inside with:

<a id="w2" href="mysite.html" onclick="popW2(this);">

This works weird because the mysite.html becomes de pop-up and the file on the javascript tag the main window.

View 7 Replies


ADVERTISEMENT

JQuery :: Cycle: Combining 'backwards' With #hashes?

Nov 26, 2011

I've set several options, but I'm having trouble using 'backwards' with the #hash function on dynamically created slideshows. I'm using PHP to generate slide arrays for a given page. I pull the slides in sequence from a full array in amaster file. Everything works fine when I navigate forward, and also when I navigate backwards within the slide array on a given page (I use the manual setting with prev/next buttons). The problem occurs when I navigate backwards to the first slide, then clickmy PHP-generatedlink to get the nextset of "previous" slides. When the page loads, it starts at the first slide instead of the last, even though 'backwards' is set to true. I think the hash script is overriding it, since there's no #hash on my PHP link (I can code one in, but it's code-intensive so I'm hoping there's a simple on-the-fly javascript solution).

[Code]...

View 1 Replies View Related

JQuery :: Traversing Backwards From A Specific Element

Oct 30, 2010

I want to start traversing backwards from the previous sibling of a specific div element. I've tried something like this but it does not seem to work because it's only selecting the specific div:

var start = $("#specific_div").prev("div"); // start from the previous div sibling of the "specific div"

jQuery.fn.reverse = Array.prototype.reverse;
start.reverse().each(function(i, E){
console.log(E.getAttributeNode("id").value);
});

[Code].....

View 2 Replies View Related

JQuery :: Find Reverse - Possible Find A Node Backwards Instead Of Forwards

May 27, 2009

<div>

Is it possible find a node backwards instead of forwards.

I would like to do (remember find_reverse does not exist)

View 7 Replies View Related

Text In Text Box Has Been Selected Forwards Or Backwards?

Aug 16, 2010

Is there a way to tell if the text in a text box has been selected forwards or backwards?If you select some text from left to right and then hold down shift and use the cursor keys the right end of the selection moves. If you select some text from right to left and then hold down shift and use the cursor keys the left end of the selection moves.Is there a way in Javascript to detect which way the text has been selected? I need to know if the "end" position is before the "start" position or after. Using ranges and selection objects seems to "normalise" the selection so that the start is before the end.

View 2 Replies View Related







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