473,372 Members | 1,093 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,372 software developers and data experts.

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 3127
Lee
ABC said:
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).


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.com...
ABC said:
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).
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.com...
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.com/images/fptut17a_small.jpg";
pix[1] = "http://www.fontstuff.com/images/fptut17b_small.jpg";
pix[2] = "http://www.fontstuff.com/images/fptut17c_small.jpg";
function pic(t) {
document.all.i.src = pix[t];
}
</script>
</head>
<body>
<center>
<a href="javascript:pic(0)">Picture 1</a> |
<a href="javascript:pic(1)">Picture 2</a> |
<a href="javascript:pic(2)">Picture 3</a>
<br><br>
<iframe name="i" align="center"
frameborder="0" scrolling="no"
marginwidth="0" marginheight="0"
style="width:150; height:112"></iframe>
<br><br>
<sup><a href="http://www.fontstuff.com/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.com/images/fptut17a_small.jpg";
pix[1] = "http://www.fontstuff.com/images/fptut17b_small.jpg";
pix[2] = "http://www.fontstuff.com/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="javascript:pic(0)">Picture 1</a> |
<a href="javascript:pic(1)">Picture 2</a> |
<a href="javascript:pic(2)">Picture 3</a>
<iframe name="i" align="center"
frameborder="0" scrolling="no"
marginwidth="0" marginheight="0"
style="width:150; height:112"></iframe>


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

--

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


McKirahan wrote:

var pix = new Array();
pix[0] = "http://www.fontstuff.com/images/fptut17a_small.jpg";
pix[1] = "http://www.fontstuff.com/images/fptut17b_small.jpg";
pix[2] = "http://www.fontstuff.com/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="javascript:pic(0)">Picture 1</a> |
<a href="javascript:pic(1)">Picture 2</a> |
<a href="javascript:pic(2)">Picture 3</a>


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


What is the script good for, why not simply use links e.g.
<a href="http://www.fontstuff.com/images/fptut17a_small.jpg"
target="i">Picture 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.com> 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.com/images/fptut17a_small.jpg";
pix[1] = "http://www.fontstuff.com/images/fptut17b_small.jpg";
pix[2] = "http://www.fontstuff.com/images/fptut17c_small.jpg";
function pic(t) {
document.all.i.src = pix[t];
}
</script>
</head>
<body>
<center>
<a href="javascript:pic(0)">Picture 1</a> |
<a href="javascript:pic(1)">Picture 2</a> |
<a href="javascript:pic(2)">Picture 3</a>
<br><br>
<iframe name="i" align="center"
frameborder="0" scrolling="no"
marginwidth="0" marginheight="0"
style="width:150; height:112"></iframe>
<br><br>
<sup><a href="http://www.fontstuff.com/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
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...
4
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...
2
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...
14
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...
17
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
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...
4
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...
1
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 -...
6
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.