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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:16:54+00:00 2026-06-04T08:16:54+00:00

i call a javascript function from an input text control (in a php file):

  • 0

i call a javascript function from an input text control (in a php file):

<input name="first_name"  id="first_name" size="30" maxlength="25" type="text" value="{$fields.first_name.value}" onblur="checkvalid(this);">

This is the function in the javascript file:

function checkvalid(control){
  alert(control);   
}

now i need to debug this control and see its properties, variables and values (not using the Visual studio, using ‘eclipse’). so i guess my only option is print on screen the properties of the html input control but when i do alert(control), i get “[object HTMLInputElement]” message and not the properties of the control.

how can i debug the html control? and if i can’t , how can i print its properties and variables?

  • 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-04T08:16:56+00:00Added an answer on June 4, 2026 at 8:16 am

    The properties you refer to are actually called attributes. Let’s make a function that will iterate over an element’s attributes, list them in a nicely formatted string and alert.

    function check(element) {
        var attrs = element.attributes;
        var output = "";
    
        for (var i  = 0; i < attrs.length; i++)
            output += attrs.item(i).name + ': ' + attrs.item(i).value + '\n';
    
        alert(output);
    }
    

    Now we’ll call it for your element. It’s got id="first_name", so we may use document.getElementById.

    check(document.getElementById("first_name"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to call a JavaScript function from PHP? <?php jsfunction(); // or echo(jsfunction()); //
I want to call a JavaScript function through PHP and store the returned value
Possible Duplicate: How to call a JavaScript function from PHP? I have a php
HTML <form action='insert.php' method='POST'> <p><b>Client:</b><input type='text' name='idclient'/> <p><b>Total:</b><br /><input type='text' name='total'/> <p><input type='submit' value='Save'
I am trying to basically call a function from another javascript file (inside a
I am currently using this code: <input type=button value='Call' class=call onClick='voipCall(<?php echo $number_1;?>)'> <input
I call a javascript function from a textbox by using OnKeyPress=clickSearchButton() Here is my
Summary I want to be able to call a JavaScript function from a Flex
How to call or make the javascript function from the Application_Start of global.asax in
I am trying to call my function named isUrgencyTypeValid from my javascript code but

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.