Doubts in Java Script

Results 1 to 2 of 2

Thread: Doubts in Java Script

  1. #1
    Godha Guest

    Default Doubts in Java Script

    I am now to javascript .<BR>if total has exceeds then I have to load one picture at right side . if not I have to load another at the same place. Please tell me.Thank you.<BR>By<BR>Godha.

  2. #2
    Join Date
    Dec 1969

    Default RE: Doubts in Java Script

    Try this :<BR><BR>&#060;img name="myimage"><BR><BR>&#060;script language="javascript"><BR>FirstImage= new Image()<BR>SecondImage= new Image()<BR><BR>FirstImage.src = "one.gif"<BR>SecondImage.src = "two.gif"<BR><BR>if (x > y) {<BR> document.myimage.src=FirstImage.src<BR>}<BR>else {<BR> document.myimage.src=SecondImage.src<BR>}<BR>&#060 ;/script><BR><BR>Something like that will do the job.<BR><BR>Pete

Posting Permissions

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