Question
please help woth coding! i jus need the skeleton!
~ 18 A A Aa Po abc A All Styles Uab XXA RAA Paragraph Sen • Next insert an h1 that contains a type of Halloween candy • Inser
Another rollover: Load three images of dogs and using functions with parameters do the following. (Remember you can call the
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Skeleton code to swap two images over onmouse over event

<html>

<head>

<title> Rollover test </title>

<script language="JavaScript">

function movein (image1, image2)

{

window.document.picture1.src = image1;

window.document.picture2.src = image2;

}

</script></head>

<body>

<a href="" onMouseOver="movein('Darcy3.jpg');"

onClick="return false;"

onMouseOut="movein('Liz-book.jpg');">

<img src="Liz-book.jpg" name="picture1" height="300" > </a>

</body>

</html>

In the 2nd question, you need to create a image gallery and then swap between the three images.

code to create image gallery:

<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="4"><img class='imagem_artigo' src="swap_1_large.png" width="200" height="225" alt="Image Swap Sample" name="swap"></td>
  </tr>
  <tr>
    <td colspan="4"><div style="font-size: 11px; text-align: center; padding: 0px 0px 12px 0px;">« CLICK TO ENLARGE »</div></td>
  </tr>
  <tr>
  <td><img class='imagem_artigo' src="swap_1_large.png" width="50" height="56" alt="Thumbnail" onclick="document.swap.src='swap_1_large.png';"></td>
    <td><img class='imagem_artigo' src="swap_2_large.png" width="50" height="56" alt="Thumbnail" onclick="document.swap.src='swap_2_large.png';"></td>
    <td><img class='imagem_artigo' src="swap_3_large.png" width="50" height="56" alt="Thumbnail" onclick="document.swap.src='swap_3_large.png';"></td>
    <td><img class='imagem_artigo' src="swap_4_large.png" width="50" height="56" alt="Thumbnail" onclick="document.swap.src='swap_4_large.png';"></td>
  </tr>
</table>
create html image tag:
<img class='imagem_artigo' src="images/image1.gif" ID="TestID"/>

Adding the script and function:

<script type="text/javascript">
function SimpleSwapSetup(){
  var x = document.getElementsByTagName("img");
  for (var i=0;i<x.length;i++){
    var oversrc = x[i].getAttribute("oversrc");
    if (!oversrc) continue;
    // preload image
    // comment the next two lines to disable image pre-loading
    x[i].oversrc_img = new Image();
    x[i].oversrc_img.src=oversrc;
    // set event handlers
    x[i].onmouseover = new Function("SimpleSwap(this,'oversrc');");
    x[i].onmouseout = new Function("SimpleSwap(this);");
    // save original src
    x[i].setAttribute("origsrc",x[i].src);
  }
}
</script>

Trigger javascript

<html>
<img class='imagem_artigo' src="image.gif" oversrc="image_over.gif" onmouseover="javascript:SimpleSwap(this,'oversrc');" onmouseout="javascript:SimpleSwap(this);">
</html>
Add a comment
Know the answer?
Add Answer to:
please help woth coding! i jus need the skeleton! ~ 18 A A Aa Po abc...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • <!DOCTYPE HTML> <html lang="en"> <head>    <meta charset="utf-8"> <title>Plaid Scarf Selector</title>    <link rel="stylesheet" href="a3.css" />...

    <!DOCTYPE HTML> <html lang="en"> <head>    <meta charset="utf-8"> <title>Plaid Scarf Selector</title>    <link rel="stylesheet" href="a3.css" />    <script src="a3.js"> </script> </head> <body>    <section>        <h1> Plaid Scarf Selector </h1><br>        <p>Feels close to real cashmere (but costs a lot less).        Think of this scarf as the next best thing to wearing authentic cashmere.        Its microsueded fabric really is that soft. In fact, at first touch some        mistake if for the real...

  • Hello I need help with this program. Should programmed in C! Program 2: Sorting with Pointers...

    Hello I need help with this program. Should programmed in C! Program 2: Sorting with Pointers Sometimes we're given an array of data that we need to be able to view in sorted order while leaving the original order unchanged. In such cases we could sort the data set, but then we would lose the information contained in the original order. We need a better solution. One solution might be to create a duplicate of the data set, perhaps make...

  • I need help answering questions 1-6 please Your group is working to develop and study new...

    I need help answering questions 1-6 please Your group is working to develop and study new proteins. To analyze the composition of a protein mixture you have produced, the protein solution is placed in an electric field. Proteins with different total charges will drift at different speeds in the solution, and can be separated for further analysis. Your group needs to focus an optical apparatus at known positions within the protein solution in order to record an image of a...

  • I need help with certain questions. Please. 18. 4 points For each Rental, list the Rental...

    I need help with certain questions. Please. 18. 4 points For each Rental, list the Rental ID, Rental date, customer ID, customer first name, customer last name, and count of disks rented; sort by Rental ID. Show the Rental date formatted as ‘mm-dd-yyyy.’ Hint: use a GROUP BY clause. 19. 4 points List the disk ID, title name, rating, format description, and fee amount for all copies rented in Rental 3; sort by disk ID. Show the fee amount formatted...

  • Please help me with this MATLAB programming problem! Im coding iin MATLAB2018 if that makes any d...

    Please help me with this MATLAB programming problem! Im coding iin MATLAB2018 if that makes any difference! The first picture is the question i need to answer. The picture below is used as reference to answer the question. The last picture (below) is the into to the problem, and is used as reference. 1. Use Matlab to create the following single plot with three subplots. All titles, gridlines, and axis labels should be as shown. Arc System Response 15 E...

  • part II is what I need help one. part 1 is also attached for your reference...

    part II is what I need help one. part 1 is also attached for your reference Part II: Low Pass Filter contd. Noise Removal To observe the noise removal capabilities of a low -pass filter, we will add a second input to the system to simulate noise Step 1: Alter your Simulink model by adding another sine wave function and use a Sum block to add the inputs together as the new input to the system. The second sine function...

  • This task is a program framework that you should complete. The program should allow the user...

    This task is a program framework that you should complete. The program should allow the user to move a circular figure with the mouse over a drawing area. The current position of the figure is displayed continuously: Given is the main program: import javafx.scene.Scene; import javafx.application.Application; import javafx.beans.value.*; import javafx.scene.*; import javafx.scene.paint.Color; import javafx.scene.text.Text; import javafx.stage.Stage; public class Main extends Application { private DraggableCircle dc; private Text text; private void updateText() { text.setText("("+dc.getCenterX()+", "+dc.getCenterY()+")"); } @Override public void start(final Stage...

  • hello there, i have to implement this on java processing. can someone please help me regarding...

    hello there, i have to implement this on java processing. can someone please help me regarding that? thanks War is the name of a popular children’s card game. There are many variants. After playing War with a friend for over an hour, they argue that this game must never end . However! You are convinced that it will end. As a budding computer scientist, you decide to build a simulator to find out for sure! You will implement the logic...

  • I NEED HELP WITH DEBUGGING A C PROGRAM! PLEASE HEAR ME OUT AND READ THIS. I...

    I NEED HELP WITH DEBUGGING A C PROGRAM! PLEASE HEAR ME OUT AND READ THIS. I just have to explain a lot so you understand how the program should work. In C programming, write a simple program to take a text file as input and encrypt/decrypt it by reading the text bit by bit, and swap the bits if it is specified by the first line of the text file to do so (will explain below, and please let me...

  • please help!! the first photo is to answeer the 4 questions! i really just need help...

    please help!! the first photo is to answeer the 4 questions! i really just need help on question 11 and 12 QUESTION 9 Instructions A link to the data marathon is included in this section. You will use JMP to answer questions 9. 13. Each question includes the steps needed in JMP. In the following paragraph, you will find the steps to save graphs that you will need. marathon.txt Before loading the file into JMP, you will need to do...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT