473,809 Members | 2,736 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Image show with javascript

ABC
I am a total newbie to javascript. I have only done Frontpage.

I am trying to do a page of image show----I only managed to find a
javascript to create pop up windows for the chosen image. Almost good
but I want better.
http://www.fontstuff.com/frontpage/fptut17.htm

I want the viewer to lick on the text word in the main page and the
corresponding image will show in the iframe instantly, (or text in the
frame and image on the main page). It will be about 30 images so I
will need to download them all first.

I cannot find any javascript to allow control of the frame from the
main page, or the main page from the frame. Please help.

main page=main.htm
image=image.htm
text=text1, text2,...
image =pic1, pic2...

ABC
Do not reply by email. Replay to NG
Jul 23 '05 #1
7 3163
Lee
ABC said:
I want the viewer to lick on the text word in the main page and the
correspondin g image will show in the iframe instantly, (or text in the
frame and image on the main page).


I have *got* to start making an effort to keep up with accessibility options.

Jul 23 '05 #2
"Lee" <RE************ **@cox.net> wrote in message
news:cr******** *@drn.newsguy.c om...
ABC said:
I want the viewer to lick on the text word in the main page and the
correspondin g image will show in the iframe instantly, (or text in the
frame and image on the main page).
I have *got* to start making an effort to keep up with accessibility

options.


Agree!

This opens up for a completely new user experience...

LOL!

--
Dag.
Jul 23 '05 #3
"ABC" <AB*@nospam.net > wrote in message
news:5d******** *************** *********@4ax.c om...
I am a total newbie to javascript. I have only done Frontpage.

I am trying to do a page of image show----I only managed to find a
javascript to create pop up windows for the chosen image. Almost good
but I want better.
http://www.fontstuff.com/frontpage/fptut17.htm

I want the viewer to lick on the text word in the main page and the
corresponding image will show in the iframe instantly, (or text in the
frame and image on the main page). It will be about 30 images so I
will need to download them all first.

I cannot find any javascript to allow control of the frame from the
main page, or the main page from the frame. Please help.

main page=main.htm
image=image.htm
text=text1, text2,...
image =pic1, pic2...

ABC
Do not reply by email. Replay to NG


"I want the viewer to lick ..." -- so would I!

Will this help? Watch for word-wrap.

<html>
<head>
<title>iframed. htm</title>
<script type="text/javascript">
var pix = new Array();
pix[0] = "http://www.fontstuff.c om/images/fptut17a_small. jpg";
pix[1] = "http://www.fontstuff.c om/images/fptut17b_small. jpg";
pix[2] = "http://www.fontstuff.c om/images/fptut17c_small. jpg";
function pic(t) {
document.all.i. src = pix[t];
}
</script>
</head>
<body>
<center>
<a href="javascrip t:pic(0)">Pictu re 1</a> |
<a href="javascrip t:pic(1)">Pictu re 2</a> |
<a href="javascrip t:pic(2)">Pictu re 3</a>
<br><br>
<iframe name="i" align="center"
frameborder="0" scrolling="no"
marginwidth="0" marginheight="0 "
style="width:15 0; height:112"></iframe>
<br><br>
<sup><a href="http://www.fontstuff.c om/frontpage/fptut17.htm"
target="_blank" >Making a Browser Window Fit an Image</a></sup>
<center>
</body>
</html>
Jul 23 '05 #4


McKirahan wrote:

var pix = new Array();
pix[0] = "http://www.fontstuff.c om/images/fptut17a_small. jpg";
pix[1] = "http://www.fontstuff.c om/images/fptut17b_small. jpg";
pix[2] = "http://www.fontstuff.c om/images/fptut17c_small. jpg";
function pic(t) {
document.all.i. src = pix[t];
If you want to script frames across browsers you would better use
window.frames.i .location.href = ...
<a href="javascrip t:pic(0)">Pictu re 1</a> |
<a href="javascrip t:pic(1)">Pictu re 2</a> |
<a href="javascrip t:pic(2)">Pictu re 3</a>
<iframe name="i" align="center"
frameborder="0" scrolling="no"
marginwidth="0" marginheight="0 "
style="width:15 0; height:112"></iframe>


What is the script good for, why not simply use links e.g.
<a href="http://www.fontstuff.c om/images/fptut17a_small. jpg"
target="i">Pict ure 1</a>
?

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #5
"Martin Honnen" <ma*******@yaho o.de> wrote in message
news:41******** *************** @newsread4.arco r-online.net...


McKirahan wrote:

var pix = new Array();
pix[0] = "http://www.fontstuff.c om/images/fptut17a_small. jpg";
pix[1] = "http://www.fontstuff.c om/images/fptut17b_small. jpg";
pix[2] = "http://www.fontstuff.c om/images/fptut17c_small. jpg";
function pic(t) {
document.all.i. src = pix[t];
If you want to script frames across browsers you would better use
window.frames.i .location.href = ...


Both work in IE5.5 and FF1.0.
Neither works in NS6.2 and Opera6.1 (for me).
<a href="javascrip t:pic(0)">Pictu re 1</a> |
<a href="javascrip t:pic(1)">Pictu re 2</a> |
<a href="javascrip t:pic(2)">Pictu re 3</a>


<iframe name="i" align="center"
frameborder="0" scrolling="no"
marginwidth="0" marginheight="0 "
style="width:15 0; height:112"></iframe>


What is the script good for, why not simply use links e.g.
<a href="http://www.fontstuff.c om/images/fptut17a_small. jpg"
target="i">Pict ure 1</a>
?


Excellent and it works in my 4 browsers!
--

Martin Honnen
http://JavaScript.FAQTs.com/

One thing I didn't do was preload the images per:

"It will be about 30 images so I will need to download them all first."

Jul 23 '05 #6
ABC
On Tue, 04 Jan 2005 13:27:22 GMT, "Dag Sunde" <me@dagsunde.co m> wrotd:

Agree!

This opens up for a completely new user experience...

Yeah . Very funny about the typo. But that is actually possible.....

Do you have a script to help?

ABC
Do not reply by email. Replay to NG
Jul 23 '05 #7
ABC
Thanks very much. but I am totally new to javascript. Can you please
explain which is the bit to put in the main page to control the frame.
I supoose the one you wrote was for the frame page.

Where is the reference to the text1,text2...? I want the viewer to
click text1 and see pic1 in the frame, click text2 and the frame will
instantly change to pic2.

Thanks

On Tue, 04 Jan 2005 13:48:23 GMT, "McKirahan" <Ne**@McKirahan .com>
wrotd:
Will this help? Watch for word-wrap.

<html>
<head>
<title>iframed .htm</title>
<script type="text/javascript">
var pix = new Array();
pix[0] = "http://www.fontstuff.c om/images/fptut17a_small. jpg";
pix[1] = "http://www.fontstuff.c om/images/fptut17b_small. jpg";
pix[2] = "http://www.fontstuff.c om/images/fptut17c_small. jpg";
function pic(t) {
document.all.i. src = pix[t];
}
</script>
</head>
<body>
<center>
<a href="javascrip t:pic(0)">Pictu re 1</a> |
<a href="javascrip t:pic(1)">Pictu re 2</a> |
<a href="javascrip t:pic(2)">Pictu re 3</a>
<br><br>
<iframe name="i" align="center"
frameborder="0" scrolling="no"
marginwidth="0" marginheight="0 "
style="width:15 0; height:112"></iframe>
<br><br>
<sup><a href="http://www.fontstuff.c om/frontpage/fptut17.htm"
target="_blank ">Making a Browser Window Fit an Image</a></sup>
<center>
</body>
</html>

ABC
Do not reply by email. Replay to NG
Jul 23 '05 #8

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

Similar topics

0
4954
by: amita | last post by:
hi, 1.I want to show a image file of type '.tif' in the browser window; for that I'm writting as ASP code page. 2.This '.tif' type image can be shown better with 'Kodak Image Control'. 3.To have this 'Kodak Image Control' on my code page I just add it's ..ocx to tool box and then drag it from 'Toolbox' to the page.
4
17115
by: Tim | last post by:
Hope someone in the big wide world can help... What I want to do is have an image slideshow which automatically scrolls through a series of images very fast, then pauses when you move your mouse over the image. The images will flick through (at a rate of about 5 per second) then pause when the user onMouseOver's. Any help would be gratefully received. :o)
2
9185
by: Kevin Lyons | last post by:
Hello, Can anyone assist me with what I am trying to do with the following code (six different scenarios to try to make the functionality work correctly)? I want to always (and ONLY) display in the status bar 'Symantec Corporation' whenever anyone mouses over (onMouseOver) my image or link OR when one clicks while holding the left mouse down (onClick) on the same image or link. Upon releasing the mouse (onMouseOut), the
14
6566
by: mikeoley | last post by:
Why would this script below work on an html page: http://www.eg-designdev.com/aircylinders/test.htm But not a java page such as this: "http://www.eg-designdev.com/aircylinders/index3.jsp" Or does anybody have a simple slide show rotation script they could refer me to...thanks. <HTML><HEAD>
17
29423
by: santel_helvis | last post by:
Hi All, Could anyone tell me how to rotate the image in javascript. Which concepts I should concentrate to rotate the image
6
1678
by: Ben | last post by:
I am trying to write codes in VB.net to display 3 images in series on a Webform with each image being displayed in the same box for 5 seconds. I am trying to use Timer and image button, don't know how to get around it. thanks for any help
4
4234
by: bridgemanusa | last post by:
Hi All: I have a very long page of html that I want to take portions and hide them in divs, then show when a link is clicked. I have the hide show part working when the link is clicked, however I would really like to use linked images instead to do the following: - When open.gif is clicked, the contents of the div show and open.gif is swapped with close.gif - subsequently, when close.gif is clicked, the div contents get hidden
1
16517
by: www.web20developers.com | last post by:
http://www.web20developers.com http://www.web20developers.com/index.php?option=com_content&task=view... Ajallerix : AJAX, simple, fast Web image gallery demo ; at Novell AJAX - microlink pattern tutorial : A microlink is a link that opens up
6
10534
by: Seth Illgard | last post by:
Hi, Im writting a custom CMS and everything looks great, except when I see the results in IE. What im trying to do is: *Have an image in a layer (or relative positioned, or just margined). The exact image's coordinates depends in the window size (Fluid design) *The image should display correctly in front(above) another image (header image)
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10635
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10378
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10115
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9198
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7653
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3013
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.