javascript functio variable not getting sent through?

theres nothgin wrong with my ajax, it works and is sending other variables but whe i want to send "pood" from function farmers(pood, happy) i twill not work. now when i call the function it goes like this onclick="farmers('pisslet', 'popcocky')" now it will not send PISSLET, what do i do
its making me angry this is the querystring the other variables are sending to my ajaz page and i echo them out, but thie pood variable will not work . i even tried redefining it with var gummy = pood;
it comes up blank on the ajax page when echos please help. not to mention i alert(pood) and it says htmltablet something. var queryString = "workingvariable=" + blabbr + "¬workingvariable =" + pood;

Posted On: Sunday 25th of November 2012 09:20:18 PM Total Views:  248
View Complete with Replies

Related Messages:

jQuery IF function   (62 Views)
I have a basic idead of jQuery and can do some basic stuff, but I can't figure out how to do the following: I need jQuery to do the following function when you SELECT an option from a form Dropdown selection... When a person selects PS3 in drop down it will hide all DIVs with the class of .container that do not have the class .ps3 in it. How can I do this
Need help with 2 JQuery functions   (74 Views)
I have a form with a text input where I am trying to use 2 jquery functions together. However only one of them seems to work. So I am hoping their might be a jquery guru out there that can help What I have is a text input box called nickname and also has a id of nickname What I am doing is when the user types in a nickname into the field I am checking my mysql database to ensure the nickname is available or not. However I also need this text input box to not allow/accept any spaces which I am trying to do by preventing the spacebar Here is my code /*prevent spacekey from putting a space in the text input box that has the id of nickname */ $(#nickname").keyup(function(){ str = $(this).val() str = str.replace(/\s/g,'') $(this).val(str) }); /*below is the code which currently works fine for cheacking the avail of a nickname as its typed*/ pic1 = new Image(16, 16); pic1.src = "graphics/loader.gif"; $(document).ready(function(){ $("#nickname").change(function() { var usr = $("#nickname").val(); if(usr.length >= 3) { $("#status").html('Checking availability...'); $.ajax({ type: "POST", url: "http://www.******.***/inc/", data: "nickname="+ usr, success: function(msg){ $("#status").ajaxComplete(function(event, request, settings){ if(msg == 'OK') { $("#nickname").removeClass('object_error'); // if necessary $("#nickname").addClass("object_ok"); $(this).html(' Available '); } else { $("#nickname").removeClass('object_ok'); // if necessary $("#nickname").addClass("object_error"); $(this).html(msg); } }); } }); } else { $("#status").html('nickname has to be 3 characters or more.'); $("#nickname").removeClass('object_ok'); // if necessary $("#nickname").addClass("object_error"); } }); }); //--> Here is my form field code Nickname:
2 js conflicting? I have two js that functions that?   (120 Views) I have a scrolling js called jBond Slider that moves when you click and drag. And I am also using prettyPhoto when they are click to open in a "pop up" window. This is copied over from an older site using lightbox: My issue is when you scroll, it registers it as a click also and will open the link when you are just moving the slider. If you view the 2nd link I provided this is what I want it to look like. I need to use prettyPhoto because there are times when I use it to open another webpage instead of just a photo in which case lightbox would work. Is there a way to tell the page to first use jbond slider and when it is stopped use PrettyPhoto If I remove the prettyPhoto reference it works like I want it to also so it has to be some conflict with that. see here: Please help!
Split function and looping through predefined class?   (85 Views)
, I was wondering what the string.split() does. And another question is that I want to loop through the class like Math and find out what functions are defined in it.But, I was not too sure how to that. I tried a couple of things but they unfortunately didn't work. Thank you..
Got problem in the onchange function   (101 Views)
There is one table that have fields included the add row button. I am using onchange event to call data from other tables, so when I select an option in the option box can automatically get the value that has been selected earlier (do not need input the value manually). Then I add row in the same table and after that I select one option back in the box option and get different values from the first, the problem is the values obtained appear in the first box, not in the second box. For the html example: No Name Class Point Action 1  
Javascript function timing issues   (65 Views)
all, afetr receiving such excellent help regarding my first ajax file, i have received an error in my code that i have not encountered before. I have created a form with input fields and when the button is clicked, three functions are run, the first is an ajax call to a php file that creates and populates a table based on values from the database, the second executes the calculation function, the third takes the calculation results and inserts them into the table created from the ajax call. After all my tests, i found the error lies in the calculation.js file, the following code works; function multiply() { document.getElementById("A").value = (calculation) ; document.getElementById("B").value = (another_calculation) ; document.getElementById("C").value = (another_calculation) ; document.getElementById("D").value = (another_calculation) ; alert("Calculation done"); } //POPULATE ORDER TABLE WITH RECOMMENDED VALUES function fillOrder() { document.getElementById("A_order").value = document.getElementById("A").value; document.getElementById("B_order").value = document.getElementById("B").value; document.getElementById("C_order").value = document.getElementById("C").value; document.getElementById("D_order").value = document.getElementById("D").value; alert("Orders values added"); } However, when i remove the alerts, i get an error in the javascript saying antibody_order is null.
javascript function onClick issue   (86 Views)
all. I am trying to get a function call from an onclick used in a html form it looks like this. function work(strVal) { alert(strVal); return 1; } and this I don't know javascript very well but i do know java, and this should work with a string. When i use the work() function in a onclick it only works with an integer. If i use it anywhere else i can use and integer or string. so if i do this it will cause a pop up alert that shows the integer correctly If i do this it will not pop up 'word' Is there something about an onclick that limits the use of a string in the functions arguement. this function works with a string if i call it from somewhere else, it just doesnt work in onclick . I have not clue
window.onload function   (119 Views)
hey , I have a problem here. I wish to generate 1 pop out date function. below is my code of javascript..but still I cant get any pop out after I click my textfield..guidance needed...ty window.onload = function(){ new JsDatePick.({ useMode:2, target:"dateStartAppraisal", dateFormat:"%Y-%m-%d" }); };
not able to execute function in javascript   (62 Views)
My problem is that I am trying to execute a function on button click event but it just shows not even for a sec it just flashes. html & Javascript : function createLabel(){ /*Get UserName*/ var unString = document.createElement("label"); unString.className = "userName"; var uName = document.getElementById("username").innerHTML; unString.innerHTML = "By " + uName + ""; /*Get UserName*/ /*Get PostString*/ var postString = document.createElement("label"); var postText = document.getElementById("poster").value; postString.className = "postText"; postString.innerHTML = "\n\n" + postText; = "block"; /*Get PostString*/ var hr = document.createElement("hr"); var tr = document.createElement("tr"); var td = document.createElement("td"); tr.className="postTR"; td.className = "postTD"; td.appendChild(unString); td.appendChild(postString); td.appendChild(td); tr.appendChild(hr); document.getElementById("postTable").appendChild(tr); }
click function not working   (144 Views)
why isn't this working $('body').find(".overcolor").click(function(){ alert("hi"); });
My function don't work after ajax post   (104 Views)
Have a interesting problem. I make a little ajax mechanism to get info from php file and add a function for delete the data. phpfile.php: js file: function getdatafromfile(){ var bu = 'bu'; $.ajax({ type: 'POST', url: 'phpfile.php', data: {bu: bu}, success: function(msg){ $("#msg").html(msg); getContent(); } }); } function something(){ alert("alert"); } Data from the php file is fine, but when I click on the link (alert) getted from ajax, function don't work. How to fix that
Help with functioning Javascript   (67 Views)
I'm looking for someone who knows Javascript well. I've posted on other forums and it appears that no one is able to help me with getting a script to work on my page., Well, no one here can see over your shoulder, so post the script (or fragments) and a detailed question about what you are having trouble with and perhaps some of the JS gurus can give you some suggestions.
daysTill function   (98 Views)
First let me introduce myself as Miss Beginner of all time!...I recently took upon myself to give myself a challenge and take a beginner's javascript my first assignment i have to display certain scripts...i have accomplished everything so far except on my second page i would like to have the "daysTill()" to display where i wrote the text in my document...i would be so ever grateful if someone could help me is my complete 2 pages of scripts and i have bolded and change the color of where i mean exactly: by Martine Couture This page requires Javascript Did you know there are...days left before the end of the Javascript course Did my page meet all expected Javascript Yes! Almost! Hoping you enjoyed my last assignment...javascript is a struggle!
cannot pass string to javascript function from Ajax   (117 Views)
I am using ajax to pass php variable to javasccript function as shown below for my particular application. i am using the foolowing function from ajax.js freely available from net to implement the ajax functionality as var abc = new sack(); PHP portion which passes the response text: ************************************ javascript: ********* showfield(ss) { alert(ss); } Problem: ******* 1] When $table is having a string with only numeric characters for eg: "123" we get the alert 2] When $table is having a string with alphanumeric characters for eg: "123efg" we get the error report as "missing ) after argument list" 3] When $table is having a string with alphanumeric characters for eg: "efg123" or "abcdfr" we get the error report as "efg123 is not defined" or "abcdfr is not defined"., You need to pass strings with double or single quotes so you should use the escape character try echo "show";, Really a Great solution
javascript function to write to a input text box   (71 Views)
: I have two input boxes on a form which receive the first and last name of a user. I want to be able to use charAt() to get the first letter in each box and pass it a third box on the same form. is this doable May I request some help I was thinking something like the function below would be the starting point --I stand correct, as it is not working. var str=\"Mossa\"; document.write(''); var str=\"Barandao\"; document.write(''); Any thoughts! Mossa
Getting return value from post anonymous function   (80 Views)
Hi . I have been struggling with a form wizard all day. I'm using jquery stepy (form wizard) along with validation plugin. To cut a long story short, my first step is to get MySQL connection from form controls details. On submit ('next' button) a check is made on an empty hidden control ('hid'). rules: { hid: { required: function(){ return checkDBData(); }, messages: { hid: {required: 'SQL not available'}, ...(etc)... So, if the function checkDBData passes, false should be returned, so that the form can progress to the next step. If the connection details fail, true is returned so that an error msg is posted. Here's the checkDBData function: function checkDBData(){ var host = $('#mysql_host').val(); var username = $('#username').val(); var password = $('#password').val(); var dbname = $('#dbname').val(); $.post( "install/sqlcheck.php", {"host": host,"username": username, "password": password, "dbname": dbname}, function(msg){ if(msg.required == false){ return false; }else{ return true; } }, "json" ); } the return values don't find their way back to the rules. However, if I hard code false and true to the function... function checkDBData(){ var host = $('#mysql_host').val(); var username = $('#username').val(); var password = $('#password').val(); var dbname = $('#dbname').val(); $.post( "install/sqlcheck.php", {"host": host,"username": username, "password": password, "dbname": dbname}, function(msg){ if(msg.required == false){ return false; }else{ return true; } }, "json" ); return false; //or return true for testing purposes } This works. I assume it's due to the asynchronous nature of the ajax call. Any ideas
javascript error :function callAjax undefined in firefox   (101 Views)
I am calling the callAjax function in the HTML body as below : Request Tracking System Requests for me Requests
How can I apply this function to an input ?   (82 Views)
See my demo page for where I have it working on an img src but not an input which is what I really want. Here's the link to my testing / demo page: As for what I want to do, how can I apply the function to the input so it's image changes on the value of the select like the regular image does which uses HTML's img src. As for all of the code that produces what you see on said page: function showimage(t){ if (!document.images) return; document.images[t.getAttribute("name").replace("select","pics")].src=t.options[t.selectedIndex].value } Regular Image using: < img name="firstpics" src="/stellardonations/paypaldonate.gif" > Input Image using: < input name="firstpics" type="image" src="/stellardonations/paypaldonate.gif" border="0" name="submit" > Yes No No = Donate Yes = Subscribe
Javascript function not firing   (80 Views)
I'm having problems with a JavaScript function not firing and I can't figure out why not. I'm opening a pop-up window which needs to pass some variables back to the opening window. I've used this code elsewhere with no problems and I've copied it and changed some of the details and now it doesn't work. It's probably going to turn out to be something so stupid but I just can't see it. Pop-up window code: function sendValue (employerseq,employercode,employername) { var selvaluea = employerseq.value; var selvalueb = employercode.value; var selvaluec = employername.value; window.opener.myfunc(selvaluea,selvalueb,selvaluec); window.close(); } Using alerts I can see that the correct variables have been passed into the funcion and are being assigned correctly. It doesn't seem to want to trigger the function in the opener window myfunc. Opening Window code: function myfunc(employerseq,employercode,employername) { alert('in my function'); window.document.getElementById('employer_seq').value = employerseq.value; window.document.getElementById('employer_code').value = employercode.value; window.document.getElementById('employer_name').value = employername.value; } It doesn't even trigger the first alert instruction in the function. Can anybody see what the problem is
javascript for loop breaking out of function   (137 Views)
I have a javascript test function to determine if items have been entered but it appears that the function never completes, it runs the for loop but not the items after it I can produce a screen capture video of the events that happen, contact me and I will send a link to my download area. of the code outside of the for loop (the last 5 lines) does not get executed here is the function that is triggered by a mouseover: [icode=javascript] function testChecked(form) { var noneselected = 0; var errmsg = ''; var iserror = 0; var formcount = document.forms.length; alert('initial form length:' + formcount); for ( var cntr = 0; cntr