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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:32:05+00:00 2026-06-09T19:32:05+00:00

Html code: <div data-role=popup id=popup-activity> <div data-role=header> <h1>Error</h1> </div> <div data-role=content data-theme=d class=ui-corner-bottom ui-content>

  • 0

Html code:

   <div data-role="popup" id="popup-activity">
        <div data-role="header">
            <h1>Error</h1>
        </div>
        <div data-role="content" data-theme="d" class="ui-corner-bottom ui-content">
            <h3 id="error" class="ui-title"></h3>  
        </div>
    </div>

Jquery:

 $('#error').val('Please select Activity');                     
 alert($('#error'));
 $('#popup-activity').popup("open");

Hi i’m new to jquery.

I’m using jquery.mobile-1.2.0-alpha.1.js which allows popups as in the above description.
When I open the popup the value in the error id does not show up. In fact it shows empty.
So I’ve put an alert box to see its value which says [object Object].

Does anyone know how to display the text in the popup?

  • 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-09T19:32:06+00:00Added an answer on June 9, 2026 at 7:32 pm
    $('#error').val('Please select Activity'); 
    

    should be

    $('#error').text('Please select Activity'); 
    

    Or

    $('#error').html('Please select Activity'); 
    
    alert( $('#error').text() ); // or $('#error').html()
    

    Because, .val() is for input, textarea controls, so you need .text() or .html().

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

Sidebar

Related Questions

My html code is: <div title=test class=xyz>Tesing</div> I want it to look like: <a
My HTML code is: <div data-role=fieldcontainstyle=padding:0; margin:0; padding-top:0px;> <div style = margin-top:-5px> <select name=selectmenue1
HTML code: <div class=goleft> AD 300x250 size </div> <div class=itemImageBlock goleft> <span class=itemImage> <img
HTML code: <div class=clearfix style=color: #555 style=display:block; > <input type=text id=id_site placeholder=nom-du-site style=width: 245px;
Consider the following html code: <div id='x'><div id='y'>Y content</div>X content</div> I'd like to extract
I have this HTML code: <div class='com_box'> <div class='com_box_c'> <div class='com_box_info'> <a id='quote'>quote</a> </div>
HTML code: div id=updatePanel>​ jQuery code: var data=[1, 2, 3, 4, 5, 6, 7,
Question 1 Here is the HTML code. <div class=preferredContact paragraph>ph:<span preferredcontact=40>(02) 9540 9959</span></div> I
Jquery code $(a#inline).fancybox({ 'type' : 'inline', 'hideOnContentClick': true }); Html code <div class=top_wrap> <div
Here's my HTML code: <tr> <td>data 1</td> </tr> <tr class=test> <td>test data 1</td> </tr>

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.