Results 1 to 5 of 5

Thread: Compatibility question

  1. #1
    Join Date
    Aug 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Compatibility question

    I'm just starting with java and trying to make small think to work.
    I'm using image thumbnail viewer
    Code:
    		<script language="javascript">
    
    			imgFile = new Array()
    
    				imgFile[1] = "/images/1_670.jpg"
    				imgFile[2] = "/images/2_670.jpg"
    
    
    			imgSrc = new Array()
    			
    			for(i=0;i<imgFile.length;i++) {
    
    			   imgSrc[i] = new Image()
    
    			   imgSrc[i].src = imgFile[i]
    
    			}
      
    			imgLink = new Array()
    
    				imgLink[1] = "/1/"
    				imgLink[2] = "/2/"
    
    		</script>
    and than thumbnail images

    Code:
    <a href="#" onClick="document.visible.src=imgSrc[1].src; visible1.href=imgLink[1]" title="image 1"><img src="/images/thumb_1.jpg"></a> 
    <a href="#" onClick="document.visible.src=imgSrc[2].src; visible1.href=imgLink[2]" title="image 2"><img src="/images/thumb_2.jpg" /></a>
    and finaly I'm showing big images which are going to switch when you click on thumbnail
    Code:
    <a name="visible1" href="/1/"><img name="visible" src="/images/1.jpg" />	</a>
    I have no problems with switching images, but I need link to change too and it seems to be a problem. In IE 6.0 everything works normal, but in FF links don't change.

    What is wrong with FF?
    May be there is a better solution for my problem?

  2. #2
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm just starting with java and trying to make small think to work.
    please dont take this in wrong way possible
    please follow the link
    JavaScript Is NOT Java

    p.s. but ur still in the right forum though
    Please don't mind me. I am just posting a lot of nonsense.

  3. #3
    Join Date
    Aug 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Ok, I got this one.

    Now I'm gonna start learning JavaScript.

    But what about making link change when you select another picture?

  4. #4
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    he he m not much of a JavaScript guy. all i know is, the code that u just posted is "categorized" as JavaScript and not Java.

    <edit>
    but i know some Java, and that is not Java
    Last edited by jr_yeo; 08-04-2006 at 03:21 PM.
    Please don't mind me. I am just posting a lot of nonsense.

  5. #5
    Join Date
    Aug 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Any body?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •