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

  • SEARCH
  • Home
  • 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 8034351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:59:05+00:00 2026-06-05T01:59:05+00:00

I’m hoping this has a simple solution. I have a JavaScript code that displays

  • 0

I’m hoping this has a simple solution. I have a JavaScript code that displays random images on each page load. Each image links to its own page, as you see image1.jpg goes to image_1.html. As for image3.jpg I dont have a page for that image.

I want to leave it blank, and when the image displays randomly I dont want any sort of rollover that indicates that it links somewhere. In the JavaScript code below I have designated the area of the JavaScript that I think needs to be modified to obtain what I’m looking for.

Any tips or suggestion will help. Thank You.

var imagenumber = 1 ;
var randomnumber = Math.random() ;
var rand1 = Math.round( (imagenumber-1) * randomnumber) + 1 ;
images = new Array
images[1] = "assets/image1.jpg"
images[2] = "assets/image2.jpg"
images[3] = "assets/image3.jpg"
images[4] = "assets/image4.jpg"

var image = images[rand1] ;
var linknumber = 1; 
var img1 = Math.round( (linknumber-1) * randomnumber) + 1 ;
links = new Array
links[1] =  "image_1.html" 
links[2] =  "image_2.html" 
links[3] =  "" // <-- what do I place here to NOT have a link?
links[4] =  "image_3.html" 
links[5] =  "image_4.html"
  • 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-05T01:59:07+00:00Added an answer on June 5, 2026 at 1:59 am

    The indication of a link will come from the use of an <a></a> tag pair around the image, not from the destination of the tag pair’s HREF attribute. Suppressing the link with javascript:void(0); is a good idea for having the link go nowhere/do nothing, but won’t remove the indication that a link exists…unless the javascript that converts a value from the links array into an image looks for a blank or other value and uses it as a signal to spit out an <img> tag without a surrounding <a></a> tag pair.

    So, look through your code and figure out where the actual HTML is being generated, and see what must be done to trigger a non-link output. If there is no code to make that happen, you’ll need to write it.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into

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.