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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:03:42+00:00 2026-06-01T14:03:42+00:00

i have the following code: <h3> Your Profile </h3> The information below is what

  • 0

i have the following code:

<h3> Your Profile </h3>
The information below is what we have on file for you.

<form id="profileform" name="profileform" action=""> 
<table>

<?php
$profile_array = select_profile_data($_SESSION['id']);
while (list($key, $value) = each($profile_array)) {
if(!in_array($key,$dont_display_list,true)) {
 echo '<tr><td>'.$key.'</td><td><input type="text" name=' . $key . ' value="'.$value.'"</td></tr>';
}
}
?>
</table>
<input type="button" value="submit changes" name="submit" onClick="button_click('profileform')">
</form>

<script type='text/javascript'>

function button_click(formname) {
var fullselect = formname + " :input";
alert(fullselect);
var values = $(fullselect);
alert(values.size());
$("#content").html('<span>Loading...</span>');
$("#content").load('profile.php', values, function(response, status, xhr) {
        if (status == "error") {
            var msg = "Sorry but there was an error: ";
            $("#content").html(msg + xhr.status + " " + xhr.statusText);
        }
    });
}

my alert at “fullselect” shows me the expected jquery selector string ‘profileform :input’. However, my “values” variable always returns a size of “0”. While there are definitely “input variables” in the form. Any thoughts on where i’m going wrong here?

thanks,

  • 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-01T14:03:43+00:00Added an answer on June 1, 2026 at 2:03 pm

    You missed the # from the start of the formname variable, as it is the id of the form:

    var fullselect = "#" + formname + " :input";
    

    Also, the values variable will be an array of jQuery objects, so it won’t be valid for you to pass accross to your PHP using the load() method. The best thing to do is to serialize() the entire form and pass that:

    var values = $(fullselect).serialize();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code - <form id=smsform class=appnitro method=post action=/form onSubmit=alert('Your message has
I have the following code in my CSS file, which isn't working. #home table
Form Build your own MVVM I have the following code that lets us have
I have following code for alertdialog: AlertDialog.Builder helpBuilder = new AlertDialog.Builder(this); helpBuilder.setTitle(Options); helpBuilder.setMessage(Choose Your
I have the following html code gogu@yahoo.com wants to be your partner. Do you
I have following code class User attr_accessor :name end u = User.new u.name =
I have the following code: <?php if (!$user) { ?> <div class=fb-login-button data-perms=email,user_birthday,publish_stream>Login with
I have following code to serialize my data into a file: out = new
I have the following code, which I sourced at http://dolcepixel.com/how-to-watermark-all-your-uploaded-images/ I need to modify
I have the following code: Url.Action(Index, Home, new {param1 = Model.Param1, param2 = Model.Param2}

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.