Jump to content

Xsound

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Xsound

  1. I found out Some nice (geeky but CRAZYcoder) friend helped me.. /cheer You can always add my msn if you want the code.. Its a imageswapping javascript which swap both text and image on one click.msn@xsound.dk HF and GL in future all
  2. Found out its called Swapping Well, I want a swapping stuff where I change both text and image on this command: <a href="java script:last();">Last picture</a> | <a href="java script:next();">Next picture</a>
  3. Hey guys , I have this script to change image when I click a text with a ID set to "billede" .. The source look like this: <script language="JavaScript"><!-- pictures = new Array(2) var current_image=1; pictures[1] = "pic1.gif" pictures[2] = "pic2.gif" pictures[3] = "pic3.gif" pictures[4] = "pic4.gif" function changeImage(imageNo) { <!--document.images.billede.src = "graphics" + pictures[imageNo];--> current_image=imageNo; document.images.billede.src = "grafik/" + pictures[imageNo]; } function next() { if (current_image<pictures.length-1) { current_image++; document.images.billede.src = "grafik/" + pictures[current_image]; } } function last() { if (current_image>1) { current_image--; document.images.billede.src = "grafik/" + pictures[current_image]; } }//--></script> Now I wont to write it over so it change text on click .. so I did this (never tried javascript before only ASP/HTML/CSS ) <script language="text/JavaScript"><!-- tekst = new Array(2) var current_text=1; tekst[1] = "Brokenshell 10x10" tekst[2] = "Dogsnose 40x40" tekst[3] = "LesAmis Friends 40x40" tekst[4] = "Officespoon 40x40" function changeTekst(textNo) { <!--document.write.pictext.src = tekst[textNo];--> current_text=textNo; document.write.pictext.src = tekst[textNo]; } function next() { if (current_text<tekst.length-1) { current_text++; document.write.pictext.src = tekst[textNo]; } } function last() { if (current_text>1) { current_text--; document.write.pictext.src = tekst[textNo]; } }//--></script> where did I make mistakes? please help me .. (:
×
×
  • Create New...