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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:18:44+00:00 2026-06-07T05:18:44+00:00

I have this undefined value it said that on javascript console what is wrong

  • 0

I have this undefined value it said that on javascript console what is wrong with my functions?

What i am trying to do here is that, when i click the button it will submit the hidden value to my database. after submitting the value it will fadeout.

the jQuery below

 // AJAX/JQUERY FORM
$(function() {
$(".videoThumbS").click(function() {

var test = $("#v_w_id_value").val();
var dataString = test;

if(test=='') {
    alert("Please Select Video");
} else {

$.ajax({
    type: "POST",
    url: "api.php",
    data: dataString,
    cache: false,
    success: function(html){
    $(".videoThumb4").fadeout();
    $(".videoThumb4").hide();
}
});
} return false;
});
});

the form below

<form method="post" action="">
<input type="hidden" name="v_w_id" value="UOIDKSJLKH" id="v_w_id_value" />
<input class="videoThumbS" onClick="ALKJKLJLKMNF" type="button" name="selectSel" value="Select" id="selectbut" />
</form>

why i always got that?
the api.php below

<?php
include ( 'class/conn.php' );
if( isset( $_POST['selectSel'] ) ) {
$v_watch_id = $_POST['v_w_id'];
$selected_videos = mysql_query( "INSERT INTO s_vids VALUE('', '$v_watch_id', NOW() )" ) or die ( mysql_error() );


/* VIEW RECORDS */      
$result = mysql_query("SELECT * FROM s_vids");            //query
$array = mysql_fetch_row($result);                          //fetch result    

echo json_encode($array);
}
?>
  • 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-07T05:18:46+00:00Added an answer on June 7, 2026 at 5:18 am

    Your dataString is just the value of $("#v_w_id_value"), so there is no $_POST['selectSel'] and $_POST['v_w_id'].

    The data of ajax request should be something like:

    data: {selectSel: 1, v_w_id: dataString },
    

    And in fact you don’t need to pass the selectSel to the sever side, only need to check v_w_id.

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

Sidebar

Related Questions

I have this HTML and Js and the firtst result is an undefined value.
Hi I have following JavaScript code that I am trying to run. My aim
document.getElementsByName('name').value returns undefined . I don't have the foggiest idea as to why this
I have this error NOTICE: UNDEFINED VARIABLE: LOGO IN C:\WAMP\WWW\SITE\TOOLS\SMARTY\SYSPLUGINS\SMARTY_INTERNAL_DATA.PHP ON LINE 291 CALL
I have this code and I keep getting undefined if I test the selectedIndex.
I have odd problem: After starting server I got this error: undefined local variable
Let's say you have an enum like this: public enum ColorsEnum { Undefined, Blue,
I have a call like this: $(#ContextMenuModal).height($(body).height()); However $(body).height() returns undefined when I view
I have the following markup: <button class=button type=button><span>Edit</span></button> I want to have a click
I have this string, which is generated by dojo.toJson() function: {page:accommodation task=viewList,language:undefined} When decoding

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.