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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:53:31+00:00 2026-05-26T21:53:31+00:00

Well this question might look simillar to questions easily findable with google but for

  • 0

Well this question might look simillar to questions easily findable with google but for some reason all solutions out there have not worked for me. All I want to do is to check if there is text inside of textarea.

JS snippet:

var PrzedDzier = document.getElementById('ctl00_m_g_87871370_ce46_4f47_b1eb_614d0106535d_ff105_1_ctl00_ctl00_TextField');   
var a = PrzedDzier.val();
if(a == "")
{
  alert('FU');
  result = false;
}

HTML baby:

<textarea dir="none" class="ms-long" title="PDzier" id="ctl00_m_g_87871370_ce46_4f47_b1eb_614d0106535d_ff105_1_ctl00_ctl00_TextField" cols="20" rows="2" name="ctl00$m$g_87871370_ce46_4f47_b1eb_614d0106535d$ff105_1$ctl00$ctl00$TextField"></textarea>

Debugger (Firebug) stops working at var a = PrzedDzier.val(); so I assume it’s something wrong with val() method…

  • 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-26T21:53:32+00:00Added an answer on May 26, 2026 at 9:53 pm

    You have retrieved the object as a JS object, not a jQuery object. You need to use the jQuery ID selector to retrieve the jQuery object:

    var PrzedDzier = $("#ctl00_m_g_87871370_ce46_4f47_b1eb_614d0106535d_ff105_1_ctl00_ctl00_TextField");
    var a = PrzedDzier.val();
    if(a == "")
    {
      alert('FU');
      result = false;
    }
    

    If you would like to access the text using pure JS, simply use the value property:

    PrzedDzier = document.getElementById('ctl00_m_g_87871370_ce46_4f47_b1eb_614d0106535d_ff105_1_ctl00_ctl00_TextField');   
    var a = PrzedDzier.value;
    if(a == "")
    {
      alert('FU');
      result = false;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might be an odd question, but it has actually caused me some headache.
I know this might look like an old question but Im trying to put
I know this question may well be the silliest question you've heard today, but
Well, I tried to ask this question as a comment on this question, but
Well, first of all sorry about this question it must be pretty straight forward
I understand the question might well be too vague, but just in case anyone
Well the title of this question might not actually reflect what I want, I
This might be a way too generic question, but what is the general approach
my question might sound stupid to some of you, but I need some good
Okay, this might seem like a weird question, but bear with me. So I

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.