Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ General Web Design _ Images on pages

Posted by: oOMIGUELOo Apr 27 2012, 10:17 AM

Hi, need a little advice, i'm very much new to html,

i am creating a site for mobile phones, and i need to know how to use the same image when clicked on, to show up in another page in the<table> area, for example. i use the <a href=""> theory to the page i want the same image to show up in the other page, but, what i don't understand is to direct the image to that page.

Help! wacko.gif

thanks

Miguel

Posted by: Darin McGrew Apr 27 2012, 04:06 PM

If you mean a small image that opens a page with a larger version of the image when you click on it, then please see the FAQ entry http://www.htmlhelp.com/faq/html/images.html#thumbnail

If not, then can you explain more clearly what you want?

Posted by: oOMIGUELOo Apr 28 2012, 11:12 AM

no, it's not a link to enlarge the image in another page.

ok, i'll try be more clear, what i want is:

for example,

the image 1 is clicked on in "page 1" then the same image 1 is viewed in "page 2", but... what i want is, i want it to be linked in a certain area in "page 2", depends what image you click on in "page 1", that image will show up in "page 2" in that certain area.

i don't know weather i have to use the <table><tr><td> tags in "page 2" and link the image in "page 1" in the <table> area. I'm not sure how to do it.

like a confirm download page, when you click an image from another page, you see the same image in the confirm download page.

i don't know weather i have to use jscript to do this.

i hope i was abit more clearer this time. if not i'll try to be even more clearer.

Thanks so much for helping out.

Posted by: Darin McGrew Apr 28 2012, 12:28 PM

One way is to have multiple "page 2" pages, each displaying a different image. Then on "page 1", each image links to a different "page 2" page. (You can automate the creation of the "page 2" pages.)

Another way is to generate "page 2" on the fly, with a server-side (e.g., CGI, PHP) program. Then on "page 1", each image is linked in a way that passes the identity of that image to the server-side program, so the server-side program can generate a version of "page 2" using the chosen image.

Posted by: oOMIGUELOo Apr 28 2012, 02:41 PM

I thought so, so to do what want with the image i have to use a server side code... I am also new to using PHP language, but have use the basics of PHP.

what about javascript, would it also be usefull to use?

Posted by: pandy Apr 28 2012, 03:00 PM

No, you don't *have* to do that. You can just create several pages as Darin said.

Posted by: oOMIGUELOo Apr 29 2012, 08:10 AM

Yes i know, that was that last option i was going to take, making various pages of the downloading page so i can link the image alot easier.

But i was wonding, instead of making various pages, i can use server side language and use the (if, else and do) in the code for the images? instead of making so many pages.

Posted by: Darin McGrew Apr 29 2012, 11:47 AM

QUOTE
But i was wonding, instead of making various pages, i can use server side language and use the (if, else and do) in the code for the images? instead of making so many pages.
Yes, you can. That's what I meant when I wrote:
QUOTE
Another way is to generate "page 2" on the fly, with a server-side (e.g., CGI, PHP) program. Then on "page 1", each image is linked in a way that passes the identity of that image to the server-side program, so the server-side program can generate a version of "page 2" using the chosen image.


What kinds of server-side program can you use? What kind of programming experience do you have?

Posted by: oOMIGUELOo Apr 30 2012, 04:26 AM

i can use javascript and PHP servers, i have very little experiance, i only know the basics of jscript and PHP/MySQL...

i did study Pascal, Visual Basic and Delphi builder thou...

It's my first web page that i'm creating, and i thought if i did so many pages with the same images it would be to many, but PHP would be the best option to linking the images to the download ../*.PHP page. right?





Posted by: oOMIGUELOo Apr 30 2012, 09:18 AM

If its with php or jscript, i need help where i should put the code and how to start the code, and should i start a new *.js or *.php page and put the code in these pages and link one of the two to html page?


Posted by: Darin McGrew Apr 30 2012, 10:40 AM

Maybe you don't need to write anything. Perhaps one of these PHP image-indexing programs will meet your needs:
http://php.resourceindex.com/Complete_Scripts/Images_and_Graphs/Image_Indexing/

Posted by: oOMIGUELOo May 1 2012, 03:14 AM

Thanks Darin, i will look in to it.

What i was also thinking of using is the openNewWindow() theory using javascript, when clicking on an image it opens up the new window with the same image with option to download it.

Posted by: pandy May 1 2012, 05:30 AM

But that's very different from what you first said you wanted.

BTW if the purpose is to offer the image for download, you don't have to do a thing. Anyone can just rightclick on it and save it to their harddisk.

Posted by: oOMIGUELOo May 1 2012, 01:45 PM

Yes i know, i was reading up on html bible book that also talks about javascript, and can use it better for what i want.

Sorry i didn't explain what kind of web page i was creating, its a web page for wap internet/smartphone internet navigating, to download images, videos & audio content.

Posted by: oOMIGUELOo May 2 2012, 07:42 AM

I wanted to know, how can i put more code into this new window?:

<script language="javascript">
function NewWindow(url){
window1=window.open("","","width=390,height=620,scrollbars=yes,resizable=yes");
window1.document.write("<h3>Download page</h3>");
}
</script>

and where do i put the code?

Posted by: oOMIGUELOo May 4 2012, 05:41 AM

QUOTE(oOMIGUELOo @ May 2 2012, 02:42 PM) *

I wanted to know, how can i put more code into this new window?:

<script language="javascript">
function NewWindow(url){
window1=window.open("","","width=390,height=620,scrollbars=yes,resizable=yes");
window1.document.write("<h3>Download page</h3>");
}
</script>

and where do i put the code?




in this window i want to search the images, so when i click the images in the other pages, that same image then is shown in -the new window page-. can anyone help?

i'm not sure how to do this.

Posted by: pandy May 4 2012, 06:51 AM

CODE
<img src="http://htmlhelp.com/icon/wdglogo.gif" onclick="window.open(this.src)">


That how you mean?

Posted by: oOMIGUELOo May 4 2012, 07:18 AM

QUOTE(pandy @ May 4 2012, 01:51 PM) *

CODE
<img src="http://htmlhelp.com/icon/wdglogo.gif" onclick="window.open(this.src)">


That how you mean?



ok, in the onclick="window.open(this.src") in the (this.src) do i have to put the image file in the brackets?

how do i link a screen shot of the page, so i can show you what i mean?

Posted by: pandy May 4 2012, 07:47 AM

It needs to be as I wrote it, with a parenthesis.

Just post the URl to the screen shot or upload it to here. You do the latter with the File Attachments field below the textarea you type your post in.

Posted by: oOMIGUELOo May 4 2012, 08:22 AM

with javascript code i put above earlier, what i'm trying to do is with this new window, where it says "image small size", i want the same image to go in there. But, i put a link in this line of code in the javascript open page so it can open up with the html download page: window1=window.open(../../HTML-LINK,"","width=390,height=620,scrollbars=yes,resizable=yes");
(../../HTML-LINK)

what i can't figure out is how to insert the image in the "image small size box".


Attached thumbnail(s)
Attached Image

Posted by: oOMIGUELOo May 7 2012, 05:04 AM

can anyone help me?

Posted by: Darin McGrew May 7 2012, 10:57 AM

Why can't you just use something like this?

CODE
<img src="url/to/small-image.jpeg" alt=...>

Posted by: oOMIGUELOo May 8 2012, 03:40 AM

i am using that code, with that code doesn't let me show that same image when clicked on in the other page, specifically in that small-image box.

i don't know how to do that, i am trying everything.

in the page before the download window i have various thumb images, every image when clicked on i want that image to show in that small-image box.

Do you know what i mean?

Posted by: Darin McGrew May 8 2012, 11:34 AM

QUOTE
i am using that code, with that code doesn't let me show that same image when clicked on in the other page, specifically in that small-image box.
Right. The <img> tag just shows an image.

If you want to have one page that shows different large images, depending on which thumbnail was clicked, then you need a program that generates different <img> tags, depending on which thumbnail was clicked.

Posted by: oOMIGUELOo May 10 2012, 03:43 AM

Did it!!!

i used javascript openNewWindow() to generate the image. With a bit of code and patience, i put it all together and did it.

thanks heaps you guys, i appreciate your help and ideas.

cheers!


Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)