Multiple Windows On Different Locations

Nov 21, 2006

I need to open multiple windows via javacript. The for-loop is willing to do that for me:

function open_multiple(){
for(i=1; i<=10; i++){
window.open(&#392;.htm', 'myWindow'+i)
}

There's no problem in using the var i in the naming of the windows.
What I'm struggling with is the var i in the positioning:

function open_multiple(){

for(i=1; i<=10; i++){
var x=30*i;
var y=30*i;
window.open(&#392;.htm', 'myWindow'+i, 'top='y', left='x);
}
}
As you can see, I've put the vars outside the string as part of the solution I allready found out. Obviously, as I'm still posting this; it doesn't work yet. :o I must be overlooking something.

if (anyone can point out my mistake here){
document.write("thanks a million")
}

View 2 Replies


ADVERTISEMENT

OnMouseover Slideshow With Multiple Image Locations

Jul 14, 2010

Im a complete newbie to javascript and I've basically copied and pasted the javascript I found here to use on my site. Its an onMouseOver slideshow: [URL] to use on my site. Basically, my problem is how do I add a second, separate image in a different location on the web page, associated with this script? If I post <a href="javascript:warp()"><img src="myimage" name="targetimage" border=0></a> in two different locations, which is the script for the image, the script stops working, but having it once makes it work. So how do I add two different image locations? Can someone please help me here? I just want to add more images in a different location. ie have image location 1, and image location 2.

[Code]...

View 6 Replies View Related

Multiple Image Locations Rotate Upon Page Load/refresh?

Sep 12, 2010

I am building a site with ads that I want to rotate positions (this way I can keep it fair for advertisers- the bottom ad rotates up to the top) upon refreshing the page, searching through the site, or each time the user visits. I have three images (sponsor1.jpg, sponsor2.jpg,sponsor3.jpg) that are always displayed vertically in the right banner. I assume this is just a simple javascript slideshow tweaked a bit but can't figure it out.

I find plenty of js scripts that will rotate several images through one image location, but I want image POSITION 1 to start with sponsor1.jpg, image POSITION 2 to start with sponsor2.jpg..and so on... then upon refreshing the page image POSITION 1 is holding sponsor2.jpg, image POSITION 2 is holding sponsor3.jpg... etc

View 2 Replies View Related

Child Windows Can Not Access Window.opener When Multiple Child Windows Are Open

Jul 23, 2005

I have a parent window that pushes a new window object onto an Array
with the following code :

OpenChild()
{

//totalNumWindowsCreated is global

totalNumWindowsCreated = totalNumWindowsCreated + 1;
childWnds.push(window.open(link, "child" +
totalNumWindowsCreated,"dependent"));

..
..
..
}

This pops up a new window with every call. In the child window I call
a parent function onbeforeunload, appClose() :

function appClose(){

if (window.opener && !window.opener.closed){
window.opener.CloseChild(getQueryString("application"));
}}

This is in my frameset tag of the child code :

<frameset ... onbeforeUnload='appClose()'>

The window.opener.CloseChild() function is called perfectly when I have
one child window open, but as soon as I create another child window
both of the open child windows don't ever call it. They do both go
into the onbeforeunload appClose() function, but do not call the
window.opener.CloseChild() function inside of this routine.

Anyone have any ideas why when I have two child windows open I can't
access the window.opener functions?

I have tried taking each new window out of the array and used the
following code in CloseChild() :

CloseChild()
{

//win and totalNumWindowsCreated are both global

totalNumWindowsCreated = totalNumWindowsCreated + 1;
var win = window.open(link, "child" +
totalNumWindowsCreated,"dependent");

..
..
..
}

View 1 Replies View Related

Multiple Popup Windows Opened When A Button Is Clicked Multiple Times.

May 25, 2006

This is my first post to this forum. When a button in parent window is clicked multiple times, more than one popup window is opened. This problem is occurring in linux firefox and mozilla browsers. In windows the code is working fine. Is there any option in window.open() method to open a popup window once. s there any known issue regarding this case?. Need a workaround to fix this issue.

View 1 Replies View Related

Multiple Child Windows Opened When A Button Is Clicked Multiple Times?

May 24, 2006

hen a button in parent window is clicked multiple times, more than one child window is opened. This problem is occurring in linux. In windows the code is working fine. Is there any option in window.open() method to open a child window once.

View 8 Replies View Related

Multiple Pop Up Windows

Nov 27, 2002

I have a web page with several thumbnail images displayed. These are linked to the full size images that appear in pop up windows.

I have two questions:
Firstly, is it possible to size the pop up windows the same dimensions of the images within? If not, how can I center the image displayed in the pop ups?

Also, I have tried and failed to get the pop up to appear in the centre of the screen.

View 5 Replies View Related

Multiple Popup Windows

Jul 20, 2005

I've a problem I hava a page with different popup windows, when I hit a link the first one pops up and with the first open i would like to hit the second link in the parent page so the second links pops up a window in the first popup. The way I have it now is working but with each link the
size of the popup window should be different but that doesnt happen how can I solve that problem?

this is my code:

View 5 Replies View Related

Opening Multiple Windows ?

Nov 3, 2010

I have a JavaScript that allows you to open 5 additional windows when you click on the button. It works properly when using Mozilla, but when you use IE7, only 1 window pops up not 5.

Code:

View 3 Replies View Related

Multiple Windows Using Window.open()

Mar 24, 2006

I have 2 jsp pages which are loaded from the same browser window.
Inside these jsp pages, I have created 2 windows to write client side
log. I have used different id for 2 windows as follow.

In JSP1 page I create one window & second window is created in jsp2
page.

Win1 = window.open('Log1', 'win1',
config='right=0,top=60,toolbar=0,width=300,height= 300,resizable=1,scrollbars=1,location=no,status=no
');

Win1.document.writeln(yyyy + '-' + mm + '-' + dd + ' ' + hh + ':' + mn
+ ':' + ss + ',' + ms);

Win2 = window.open('Log2', 'win2',
config='right=0,top=60,toolbar=0,width=300,height= 300,resizable=1,scrollbars=1,location=no,status=no
');

Win2.document.writeln(yyyy + '-' + mm + '-' + dd + ' ' + hh + ':' + mn
+ ':' + ss + ',' + ms);

When the page loads I can see 2 pop-up windows just fine. But then all
the writeln statements(from page1 & page2) go to the win2. Even the
writeln statements from page1. I would like to have page1 log go to
win1 & page2 go to win2. What I am doing wrong?

View 1 Replies View Related

Multiple Draggable Windows - Layers

Feb 9, 2009

I'm not much of a programmer so I've difficulties getting the yellow windows at the following web address: [url] to drag and collapse correctly. Currently, the only window that works is the one with the red header. All the other windows should also be draggable and be allowed to close down.

So, basically I need to create the variable for this thing so that the nav windows work correctly. Problem is, everything I've tried has failed miserably to date.

code:

View 3 Replies View Related

How To Open Multiple Chat Windows

Mar 24, 2009

I'm developing chat application using Ajax,jsp,HTML,java. I have strucked in opening multiple windows to chat with diff users by clicking on roster window.I want to be open a window tat looks like a chat window in gmail.I have created one window like tat using div's but I'm not able to open multiple divs with diff user names.

View 2 Replies View Related

Opening Multiple Windows Or Tabs

Aug 4, 2011

I am currently designing a website for our public library. I have added a card catalog search bar on the side of every page. Our catalog software company has supplied the code. After embedding it, I previewed each page to make sure it was working properly. At the time, it worked fine. Since then, I have added other elements to the homepage such as a Twitter feed and a Flickr slideshow. Now, when I attempt to search in the catalog search bar on the homepage, it opens two tabs, but only in Firefox.

Our IT person from the software company suggested I make a copy of the page and strip the code down to see what the problem is. After doing this, I have made no headway. Even with the catalog as the only code left on the page, other than text, it still opens two tabs.

[Code]...

View 3 Replies View Related

How Many Ways To Open Multiple Windows With A Click?

Jul 23, 2005

Are there other ways to open multile windows at once?

<SCRIPT language="JavaScript">
function open1() {
var open1 =
window.open('http://google.com/CheckEnviro.pl','','scrollbars=yes,height=600
,width=800,resizable=yes');
}
function open2() {
var open2 =
window.open('http://google.com/CheckEnviro.pl','','scrollbars=yes,height=600
,width=800,resizable=yes');
}
function open3() {
var open3 =
window.open('http://google.com/CheckEnviro.pl','','scrollbars=yes,height=600
,width=800,resizable=yes');
}
// -->
</SCRIPT>

<A href="javascript:open1();open2();open3();">Click Here to open all</A>

Here is what I have now, but I need something which can pass HTTP_REFEREER.
The window.open does not do that.

View 2 Replies View Related

Counting Text Copied To Multiple Windows

Apr 22, 2009

A while ago I queried how to count total characters in an output document and never really got anywhere. this query builds on from that. basically what I need to do is as follows.

- Using a basic input form, gather information.
- Populate strDoc with the info.
- When the button is clicked, the strDoc is populated and formatted and displayed in a popup window using:

What I'm trying to do is create a function that will count all characters in the strDoc (including spaces/LF/CR etc). If the total of the output doc is > 3800 characters, then the function will separate the doc into chunks no greater than 3800 characters and display each chunk in either a different window or a single window labled in order of chunk (ie. 1, 2 or 3).

This is way beyond me at this stage, but is critical to a project I'm working on at the moment.

View 8 Replies View Related

Load Multiple Windows.onload Functions ?

Apr 22, 2011

I am having trouble running multiple windows.onload functions and having trouble how to implement them.

Here are the two functions I'm trying to load:

View 4 Replies View Related

Error - Multiple Popups Crashes IE While Trying To Pass Value Between Two Windows

Mar 20, 2009

I've lost almost half a day to identify/recover this script error.I often got this type of error.

I've parent window with two text field.There user can either enter the value on the field or choose popup option to search & select the value.When user open the popup & selects value, the selected value gets populated to parent window text field & close popup window. Everything working well, but sometimes after closing popup window, it keeps on opening same popup window multiple time until my internet explorer get crashed. It happens only in IE.

Here is the snippet of parent window:

Here is the snippet of popup.html:

View 1 Replies View Related

How To Reference Js Code In Two Locations

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

Popup Boxes Display In Different Locations

Apr 10, 2010

I've set up my form with javascript popup boxes to display help. Im using mouse over to display the boxes, and I'm specifying the top, left, and size values for each box..... Which works FINE on my monitor...... BUT, a user was running the application and they were on a differently sized monitor and the boxes were in a different location...

My monitor was set at 1024 x 768. The user was set at 1280 x 800. I presume the reason the boxes appear to be moving is because screen varies while the form is constant... So, does javascript use it's zero, zero point for top and left locations of the box from the monitor rather than the window the form is running is? And if so, how do I set these up so they DON'T move around and obscure things they shouldn't?

View 2 Replies View Related

Creating A Drop Down Option Menu For Locations?

Jun 25, 2009

I'm looking for some code for creating a drop down option menu for locations, i.e. when registering a user selects a state / county from a drop down menu.I need 3, one for USA, UK and Europe.

View 2 Replies View Related

Load Locations Within A Google Maps Layer Based On URL

Sep 7, 2009

I'd like to load locations into the map area dynamically, based on the button URL being selected from the left-hand menu of the Locations page.So when the visitor selects Drebkau within the Germany tab, for instance, the map is changed to that new location.Also, on the current website, we have URLs that link to the various locations. Can those coordinates be used for the new map dynamic map coordinates?

View 2 Replies View Related

Run Mulitpal Image Changing Arrays Targeted To Different Locations On Same?

Feb 11, 2010

Ihave 2 simular image changing arrays on a page that are targeted to different images that are layered on top of each other (zBodBox.gif & zPWBox.gif). The images are being replaced with other transparent gifs so that the image below shows the transparent pixels of the overlaying image.The transparent gifs work, the links work, the problem is that I don't know how to make the arrays seperate and work independently so that they replace the image intended. This is for a website I am building for a prouuct I have just received a patent for so it is not on the net at this time. I could email you the entire file including the images if necessary. My email address is:stevenbraid@gmail.comIf someone could please help me work out this bug I could get my product to market. I am sorry the code is so long but as it is not up and running yet this is the best I can do. I have streamlined the code as best as I can without leaving out the essentuals.

Code:
<HTML>
<HEAD

[code]....

View 3 Replies View Related

Google Maps API / Compare Driving Distances Without Displaying Locations

Sep 18, 2009

I'm trying to make something a lot like a store locator where a user types in their address of origin and submits, then the script compares the driving distances between their entered address and the 4 destination locations that I will store in an array once the page loads.It's kind of hard to describe. I have a form working to do the distance and driving directions once I know which destination will be chosen.That seems to be working just fine. The problem is that I just can't get anything working that will compare the distance between the origin and each of the options before choosing and displaying directions to the nearest destination. My ultimate goal is to update the list of <options> with PHP and maybe MySQL - though I really don't need this to be large-scale. Then, after the user inputs a starting address if they choose a specific location from the dropdown it will give those directions, otherwise (if the "choose closest location" option is still active) then I will run a comparison of driving distances for each option's address value and store them to an array. Once all locations are read and tested for driving distance I want to take the closest location set that option as selected, and then run the call for driving directions as usual.

I know how to pull the option values, how to set and unset the "selected" attribute, and how to check to see if distances need to be compared. I can figure out how to do just about everything I need EXCEPT for getting the google maps API to play along. I've tried so many dead-end ideas that I have just reset my map code to square one. Any ideas for a script piece to run that will return only the driving distance for a list of locations?I'm going cross-eyed trying to get this working. Does anyone have any ideas for a code blurb to tie this all together? I think everything else should work once I get through the distance iterations but I'm useless with the google maps API...

View 3 Replies View Related

Window.Open In FireFox - Click Very Quickly - Multiple Windows Open

Nov 16, 2009

I'm using an <A> tag with an onclick event to open a window with JS (window.open)... In FIREFOX, if I click very quickly, multiple windows open. Not a problem in IE.

View 8 Replies View Related

Open Windows Under Current Windows?

Apr 6, 2010

below is clickunder code , but it open under windows when visitor click everywhere on the pagei need it be speacial for links , whenever visitor click on speacial link , it opens windows

<SCRIPT LANGUAGE="Javascript">
function PopShow3() {
CookieTest=navigator.cookieEnabled; if(CookieTest)

[code]....

View 5 Replies View Related

SVG Pop Up Windows

Jul 20, 2005

I would like to pop up a new window when the mouse over an icon, but I don't like to link to another new page, as I will get the details in the database and then I will add those details as the text in the pop up window.

Does anyone know how to do this in svg? is it use the javascript?

View 1 Replies View Related







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