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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:25:05+00:00 2026-05-24T09:25:05+00:00

Here are the lines in my function that should be selecting the div var

  • 0

Here are the lines in my function that should be selecting the div

var t=1;
var problemId=1234;
var x="#problemTypeDtl&" +t+"_"+problemId;
$(x).Text('bites');

Here is the div:

 <tr>
    <td colspan="2">
       <div class="problemStatusType" id="problemTypeDtl&1_1234"></div>
    </td>
 </tr>

It looks like the the selector is not selecting the div…what am I doing wrong?

Thanks in advance.

  • 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-05-24T09:25:06+00:00Added an answer on May 24, 2026 at 9:25 am

    Why don’t you make an all encompassing class called problemTypeDt along with problemStatusType (because I don’t know if you need to keep that for something else) and use the problem ID as well…an ID. So

    Script

    var t=1;
    var problemId=1234;
    var x=t+"_"+problemId;
    $("div.problemTypeDt#"+x).Text('bites');
    

    Markup

    <tr>
        <td colspan="2">
           <div class="problemStatusType problemTypeDt" id="problemTypeDtl&1_1234"></div>
        </td>
     </tr>
    

    As noted above in the comments, it is illegal to use an ampersand.

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

Sidebar

Related Questions

Here is a function I wrote to break a long string into lines not
Here's the line from App.Config: <add key=CheckFileFormatString value=P{0}\t&quot;{1}, {2}&quot;\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t{9}\t{10}/> Here's the code that puts
In a function that reads data (data meaning exclusively strings) from disk, which should
Here are my two offending lines from a reused function: //snip $req = mysql_query($sql,$db)
Here's the situation. function scrollLog(line) { // Assume Firefox // alert(weird); frames['log'].find(line); }; Here's
Here is the situation : Some process writes lines into a fifo file (created
While trying to execute the following lines only the last two statements are displayed(Here
ANSWER: If you ever see these lines and are mistified like I was, here's
My father has found a Russian language keyboard mapping that he really likes here
with the following three lines: $( .thumb ).bind( mousedown, function() { $('.thumb').not(this).unbind('mouseenter mouseleave'); });

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.