HTML - Linking To A Specific Image In A Javascript Array
Right now I have a very simple Javascript image array
Quote: <script language="JavaScript"<!-- ImageNames = new Object(); ImageNames.length = 56; for (counter = 0; counter < 57; counter++) { file_number = counter + 1; file_name = ("image" + file_number + ".jpg"); ImageNames[counter] = file_name; } //--></script> <script language="JavaScript"> <!-- which_image_loaded = 0; function changeImage(direction) { which_image_loaded += direction; if (which_image_loaded < 0) which_image_loaded = 56; if (which_image_loaded > 56) which_image_loaded = 0; if (document.images) document.myimage.src = ImageNames[which_image_loaded]; } function MM_callJS(jsStr) { //v2.0 return eval(jsStr) } //--> </script> along with an image on the page and buttons that control the script Quote: <a href="javascript:changeImage(-1)"> along with <img src="image1.jpg"> This is for a web gallery of photographs, basically a picture in the center with a Back and Forward button to cycle through them. I also have an actual thumbnail gallery though, as I want people to be able to load the images they want without having to manually cycle through all of them. How then would I link to a specific image in this javascript array from a separate Web Gallery page? I hope this is the right place to ask this, any help would be appreciated Similar TutorialsSo my question is simple and easy. I already have knowledge of how to make a image link you to a web page. but I recently found the need to make a image link you to a webpage but not in a new window (what I mean is not open up a new browser window or tab when the image link is clicked.) how do I do this? Hi, I have some big banner images that have a number of different links on them and i need to have them linking to another page. So far i have been breaking the images up into smaller images and putting them back together with CSS. This has proven to work fine on some of the simplier images but now i have some complex images with about 5-10 links in different places. To continue breaking up the banners these images would need to be broken into more than 30 parts just to have the areas i want clickable. Is there another way to acheive what im after using some kind of frame that i position over the image and get the same effect rather than having to break all the images up? is it image mapping i need to do some learning on or is this completely different? thanks in advance CC_Design Is it possible to choose an image from a drop down menu which would change an image on the page? for example using mouseover you can make thumbnail images or hyperlinks when hovered over, change an image on the page to the image that the link or thumbnail represents. can the same be done with a drop down list when an image number is chosen from a list can a centre image be linked with the choice chosen? Hi all. Great forum. I did a search and couldn't find my answer.. so here goes. Is it possible to link to a specific part of an image? For example I have a large class photo JPG and a page with all the students names on it. What would I need to do so that a parent can click on "John Smith" and it would take them to John's location in the photo..? I was thinking of something like <MAP> would help me out but it's not meant for this particular task. Thanks in advance! -M Hello, I have an image which has a white area somewhere on the right side, but not exactly on right. I want to put addthis.com share buttons on this white area (please see attachment to see the image I'm talking about). When I use div align="right" I get them to be on far right which is not what I want. How can I achieve this using HTML? If not addthis.com code, is there any way of putting simple text or links on this white portion? I donot want to use css to do this as I'm on joomla and using css for this little work conflicts with the main css of the joomla template. Please help me. This thing has been driving me crazy for days!!! Thanks, at least10 hello i am wondering if it's possible to load content into a div by clicking a link in div 1 and changing what is shown in div 2 and clicking a link in div 3 would change what is shown in div 4 i have attached a generic png of how i would want the page to look....and to give a better idea of what i am wanting...any idea's as to how to do this would be appreciated...but be prepared depending on your suggestion i may need some help with how to get it accomplished. Below are two notepad docs. I want to add a link from one to the other. Whenever I add the <a href="..... "></a> nothing shows up when I view the webpage. What am I doing wrong? Thanks. FIRST DOC <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"> <HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>Departments</TITLE> <META http-equiv=Content-Type content="text/html; charset=windows-1252"> <META content="MSHTML 6.00.6000.16544" name=GENERATOR></HEAD> <BODY style="text-align:center; font-family:verdana,helvetica,san-serif ;background-color:#c0c0c0"><!-- 2D departments Lastname Firstname --> <H1>Business and Information Technology</H1> <H1>Health</H1> <H1>Law Enforcement</H1> <H1>Communications and English</H1> <H1>Math and Science</H1></BODY></HTML> SECOND DOC <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Culinary Arts Recipe</title> </head> <body> <!-- 1G Recipes Lastname Firstname --> Hawaiian Chicken <hr size="2" width="100%" /> This dish can be seved quickly and easily. Boil and debone chicken. Add 1 can of your favorite cream of chicken soup to the chicken. Make 2 cups of cooked rice. Prepare plates immediately before serving. Lay chow mein noodles, rice, chicken, crushed pineapple, green onions, shredded cheese, sour cream, tomatoes, and coconut. </body> </html> hi again, i think that i know the answer to this question...but i needed reassuring. basically my website's hierarchy is pretty confusing but it seems to link fine on my computer and everything, then it didn't link on the school computers but i solved that problem because all that was wrong was the file pathways were different. Now however when my teacher tries to open my files, all she gets is that file that cant be found stuff. Do you think maybe the problem could be that my files are too complicated and that maybe i should put all my pages in one place and then all my other files in folders underneath those... please tell me your advice, with many thx Sam I'll do my best to explain this. I have an iframe and its source changes a lot. I want to have a link that will take you to the source of the iframe, whatever it may be at the time. This has been kicking at me for some time and I thought it was time to ask for help, it's probably something simple that I'm just not getting. Thanks in advance! Open Mozilla Firefox and go to this site: http://www.mm-theory.com Scroll down a bit until you see a table titled "Download PDFs" on the left-hand side. Click any one of them. Does anything happen, or do you get what I get: a blank window? Explorer doesn't seem to have this problem. I click on any of the links, I get the option to either open the PDF file in the browser or download it. If I choose to open in the browser, it does just that. Why would it not do the same in Firefox? The code for the links are as follows: Code: ... <tr><td class="PDFs"><a class="PDFs" href="../PDFs/Website Introduction.pdf">Website Introduction</a></td></tr> <tr><td class="PDFs"><a class="PDFs" href="../PDFs/Preliminary Concepts.pdf">Preliminary Concepts</a></td></tr> ... Thanks for any forthcoming help. I am fairly new at working with Iframes and i was wondering if there was a way to link in the following manner. I have 2 pages named index.html and store.html I have a link in index.html that i would like to open into an existing iframe in store.html the iframe is named iframe in store.html If anyone can help it would be highly appreciated. Thanks Greetings to all. I have been trying to sort this problem for a very long time. I have 2 frames on my web page, one is the contents. Can I link to a specific part of another frame? I don't think HTML allows this - or does it? Help please. What HTML code do I need and how do I link a word from one part of a page to text on another part of the same page? Hey! Something odd is happening in IE7 with a page & I can't figure it out! (doesn't do it in Firefox). This page: http://webshack.com.au/cane/index.htm loads fine, but when I got to 'Our Facilties' (2nd in the menu), it has no background & other bits 'cause it doesn't link to the stylesheet. But, if you 'Resfresh' the page - it all comes good - until you move to a different page and then return to the 'Our Facilities' page'. So I'm a bit stumped - It obviously links, but I can't figure out why not initialy, only on 'Refresh', and then again every time you return! Oh yeah, it only started doing it when I begin fixing bits after running it the though the WC3 validator . . . . Grant The page I'm working on is http://www.cdi-imaging.com/OnSession...PriceGude.html Loaded in my iframe is /OnSessionProofs/Daylily/PriceGude/11ozWhite.html How would I *link* that to the White Ceramic text on the left? Same thing for the rest, i.e. Ringer mug= /11ozRinger.html I want the page to load the small HTMLs in the Iframe (the blue rectangle) when the appropriate text is clicked. Thanks, Casey Dwayne First off, I would classify myself as having a basic working knowledge of HTML, but I'm far from experienced. I use Expressions (I know, first mistake), and do at least 50% of the work in the code view window. I'm having a problem right now linking a PPS document. I made the PPT and saved it as a PPS, and linked it using <a href="images/anamaited.pps" target="_blank"> When I preview the website on my computer and click the link the document opens in a new explorer window as a PPS, but when I publish the site and click the link it downloads the document and opens PPT. I don't want visitors opening my presentation in PPT, is there anyway to have the pps display in a browser window or do I have to convert the PPS into flash? If I need to display it as a different file type, I need to do it for free, any suggestions? -edit- wanted to clairfy when I click the link on the live site, it actually opens MS PowerPoint, not a new browser window as the tag specifies. Ok - first of all I'm quite sure that you can't actually like an image, but is there anyway that I could link the blue circle on this site with some kind of HTML/CSS workaround? http://www.yearofthebus.co.uk All suggestions welcome. Thank you, Steve Is there a way to select a jpg or html file and find out if it is linked to something and if so, what is it linked to? I have setup a basic pop up on a company test page that we are working with and the pop up only includes a link to open a new window with info. What I'm looking for is the html code for the link (image src) to close the pop up window when it's clicked on. I know that you can open a window off clicking the X or close button for the browser. I have yet to see code for an "a href" link to close the window. I would really appreciate any help on finding out how to pull this off. Thank so much. Mathew Shade Searcy |