473,387 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Help with multiple scripts on one page....

I have a series of images that, when I click on the thumbnails, I would like to open in a pop-up window fitting the exact size of the image. All the images are either 600x400 wide, or 400x600 tall.... So i created 2 javascript popups, popTall and popWide, so when you click on a wide thumbnail, it accesses popWide, and the tall thumbnails access popTall. The popWide script is first in my code, and it works fine, but the popTall doesnt work at all.... Can you help me with my script so that each one works?! Thanks! Here is the script I'm using in the "HEAD"....

<head>

<SCRIPT LANGUAGE="JavaScript">
function popWide(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men
ubar=0,resizable=0,width=600,height=400,left = 376,top = 135');");
}
// End -->
</script>

<SCRIPT LANGUAGE="JavaScript">
function popTall(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,men
ubar=0,resizable=1,width=400,height=600,left = 376,top = 135');");
}
// End -->
</script>

Jul 20 '05 #1
1 1100
"ucsbgaucho" <ch***@chrisaustin.us> wrote in message
news:6d******************************@localhost.ta lkaboutprogramming.com...
Can you help me with my script so that each one works?!
Thanks! Here is the script I'm using in the "HEAD"....

function popWide(URL) {
day = new Date();
id = day.getTime();
... <snip> ...
function popTall(URL) {
day = new Date();
id = day.getTime();

You're trying to reuse identical variable names on the same page.
Doesn't work. Rename the second scripts variables to "day2" and "id2"
or similar. Then it should work.

-- Richard
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Edward King | last post by:
Hi! I am trying to achieve the following: I have a number of help pages (in the format help_nn.php where nn=helpid). I want to be able to open a particular help page by calling the function...
0
by: mcp6453 | last post by:
I am trying to use Jack's FormMail script (http://www.dtheatre.com/scripts/formmail). Since I'm brand new at PHP and not very good at HTML, I have an easy question, which I will narrow down. When...
29
by: Paul | last post by:
Hi, I'd like to limit the number of selections a user can make in a multiple select listbox. I have a note on the interface to say that only x no. of items should be selected and I check the...
2
by: kewl | last post by:
Hi All, We have an ASP.NET 2.0 (C#) intranet application that needs to spawn multiple browsers using RegisterClientScriptBlock. Here's what we got so far: // Go thru each datarow in the...
17
by: Saps | last post by:
Hi all. Can anyone help me here. I have loads of .sql files and i need a way to call these from my asp page so the user can run them from the browser. Meaning i have a page with a list of all...
1
by: Italian Pete | last post by:
Hi, I have a usercontrol which includes a small piece of Javascript built up as a string in <scripttags and put onto a web page when an instance of the User Control is created. The Javascript does...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
5
by: Max | last post by:
Is there any way to set a select-multiple type <select multiple="multiple"with multiple selected options in scripting? Any idea about this is appreciative.
1
by: Daniel Kaplan | last post by:
I know I can have multiple scripts on one HTML page (at least I think I know I can). i.e. <script language="Javascript" type="text/javascript" src="../js/mainbutts.js"></script> ...html...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.