Avatar of ITsolutionWizard
ITsolutionWizard
Flag for United States of America asked on

html / javascript innertext

Do you see anything wrong in javascript part?

<div class="container">
    <div class="row">
        <div class="col-md-12">
            <br />
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <h4 class="headline margin-top-0 margin-bottom-30">Tabs Style 2</h4>
            <div class="style-2">
                <!-- Tabs Navigation -->
                <ul class="tabs-nav">
                    @foreach (Domain.Event eItem in rv.EventTypeList())
                    {
                        if (eventCount == 0)
                        {
                            showActive = "Active";
                        }
                        <li class="@showActive"><a onclick="ShowSection('@eItem.EventType')"><i class="@eItem.EventIcon"></i> @eItem.EventType (@eItem.TotalCountEvent)</a></li>
                        eventCount = eventCount + 1;
                    }
                </ul>
                <!-- Tabs Content -->
                <div class="tabs-container" id="tabs-container" style="display:block;">
                    <div style="display:block;" class="tab-content">
                     <p id="tabs-data"></p>
                    </div>                    
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <br /><br />
        </div>
    </div>
</div> 
<script>
    function ShowSection(eventType)
    {
        alert(eventType);
        document.getElementById('tabs-data').innerText = eventType;
    }
</script>

Open in new window

JavaScriptjQuery

Avatar of undefined
Last Comment
Jim Riddles

8/22/2022 - Mon
Julian Hansen

What are we looking for?
ITsolutionWizard

ASKER
Just want know anything wrong with the codes?
I can’t get the inner text show up
ITsolutionWizard

ASKER
Any help?
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
ASKER CERTIFIED SOLUTION
Julian Hansen

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Jim Riddles

I think we would need to see the rendered HTML.