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 8184469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:30:50+00:00 2026-06-07T01:30:50+00:00

I stuck in this part. I have declared a integer variable called count @{

  • 0

I stuck in this part.

I have declared a integer variable called “count”

@{
    int count = 6;
}

I have a slider as well.

<input name="sliderStatus"  id="sliderStatus" onchange="updateThumbnail(this, @count)" type="range" min="0" max="100" value="0" step="1"/>

I have script something like this…

    <script type="text/javascript">
    function updateThumbnail(rangeInput, count) {
        var previousImage = document.getElementById('someImage' + rangeInput / (rangeInput.value / count));
        if (previousImage) {
            previousImage.style.display = 'none';
        }
        var nextImage = document.getElementById('someImage' + rangeInput / (rangeInput.value / count));
        nextImage.style.display = 'block';
    }
</script>

The script turns out that it cannot recognize the “count” in the script. How do it pass the variable from the view into the script? Help appreciated. 🙁

  • 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-07T01:30:52+00:00Added an answer on June 7, 2026 at 1:30 am

    try

    @{
        int count = 6;
    }
    
    <script type="text/javascript">
    
    var $count = '@count';
    
    </sxript>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to code this algorithm. I am stuck in the part of
I have been stuck on this for a while now and I cannot seem
I'm stuck with this problem I have a serie of pages of the CharacterView
I have a IceFaces-form and several input fields. Let's say I have this: <ice:selectOneMenu
I'm stuck on this and have been all day.. I'm still pretty new to
I'm stuck at this part... I'm trying to get the ID to be included
I'm trying to design some class hierarchy and I got stuck at this part.
I'm adding Rdio to my iOS app and I'm stuck on this part of
I'm studying data structures (List, Stack, Queue), and this part of code is confusing
I've come a bit stuck this afternoon with a bug in my web application

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.