Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8784139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:00:54+00:00 2026-06-13T21:00:54+00:00

I need to embed some javascript within a website, and what I want it

  • 0

I need to embed some javascript within a website, and what I want it to do is the following:

I want to have a set of hidden images within the website and depending on the input from user (into a query box) a certain image specified to a certain input value should appear therefore stop being invisible.

In my case I am making a timetable and I have set of 5 images, when user imputs for example “monday” the image that is set to this value (monday timetable) should appear. Please help me writing this javascript for the html document.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T21:00:57+00:00Added an answer on June 13, 2026 at 9:00 pm

    You could use data attributes to link particular elements (images) to corresponding options.

    <select id="dow">
        <option>-- PLEASE SELECT --</option>
        <option data-target='div1'>Monday</option>
        <option data-target='div2'>Tuesday</option>
    </select>
    <div id="images">
        <div id="div1" class="hidden">Image for Monday</div>
        <div id="div2" class="hidden">Image for Tuesday</div>
    </div>
    

    You can show appropriate image using this script:

    ​$('#dow').change(function() {
        var id = $(this).find(':selected').data('target');
        $('#images > div').hide();
        $('#' + id).show();
    });​​​​
    

    See this DEMO.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website using asp.net mvc in which I need to embed a
I have a Silverlight application that I need to embed some less-than-common fonts in.
I have a number of SSRS reports that will benefit from some simple javascript.
I want to allow some websites to embed an iframe with a page from
I'm currenlty desigining and building a website where I need to embed some audio
I need to build a javascript file on the fly and embed some html
I need to embed soundcloud url in my website , SO I am asking
I need to embed an entire well-formed xml document within another xml document. However,
I need a solution to embed a pdf inside a flash screen i.e. want
I have inserted a hidden input in my comment form: $ip = $_SERVER['REMOTE_ADDR']; <input

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.