Make - Variable In POST
Jun 10, 2009
Is it possible to make
function post(test1,test2,test3,test4){
$.post('test.php', {
test1: test3,
test2: test4
}, function() {
lert('yes');
});
}
the test1 in red to be what is comming from the function?
[Code]....
View 2 Replies
ADVERTISEMENT
Aug 21, 2009
I wonder if i can make the variable data which is [data] in jQuery.post( url, [data], [callback], [type] ) dynamic. for instance, this is the form i want to send,
PHP Code:
<form action="send_xml.php" method="post" enctype="multipart/form-data" id="form_send"><input type="checkbox" id="var_1" class="checkbox"/><input type="checkbox" id="var_2" class="checkbox"/></form>
[Code]...
View 2 Replies
View Related
Feb 2, 2010
Alright, I'm trying to make these variables pass through as a post, but it's not receiving any posts through the other side. When I use the GET method though, it picks it up.
Code:
xmlhttp.open("POST","script.php",true);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.send(parameters);
[Code]...
View 3 Replies
View Related
Jan 29, 2011
When an image is clicked, I need to generate a variable which is then passed to a .php page. The variable is simply a 3-digit number. I was thinking of something like this:
Code:
<a href="javascript:document.myform.submit()">111<img src="/images/covers/409-pg-01_sm.png" alt="" width="145"></a>
Which I found by googling it, but I don't know what to substitute for the document.myform.submit in my own code. I also don't know how to use the variable.
View 3 Replies
View Related
Feb 15, 2012
I want to make an Twitter like AJAX post viewer like if we click on any link, it opens in a new sliding div like Twitter's.
View 1 Replies
View Related
Apr 16, 2009
here is my perl code from forum post[URL]
#start for todays date
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime (time);
my $day = ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
[code]....
View 2 Replies
View Related
Aug 17, 2005
I want to have multiple small pictures on my site(lats say 9 - box of 3x3). I want to make an interface in which user will be able to select 2 pictures and press the submit button.
So i want to get the numbers of the 2 selected pictures(lets say they have numers representing them 1,2,3,4...) in the POST variable so i can do something with them in my PHP scripts.
View 5 Replies
View Related
Nov 22, 2010
I am trying to write code to allow a person select one photo to be their base image or Front cover image on a photo album. I am using jquery .post to get the form check box values which are the image file names and then use post to throw them to a php file and then update the database.
Now thats cool so far and that part works. Now the problem is that I need the main photo album picture to be replaced once the .post if completed or succeeded. I need to refresh the main image. Right now the only way to do it is to hit the refresh button on your web browser. Yet I want to do this without refreshing the page.
The Image displayed already is in a image html tag with a id named user_main I was thinking is it possible for .post to pass back to javascript a variable that has the image source and is there any way to update that image tag easily like where it says src="path to image" is located.
Would like to know the best way to refresh the image without having to refresh the page.
View 3 Replies
View Related
Aug 15, 2011
I am trying to create a button on a webpage with HTML/JS that upon clicking will 1) pass a single variable into my python script and 2) run the script. The single variable to be passes is already a declarative variable in the html page.
var userid=urlvar['userID'];
I have an instance implemented using cgi-bin that takes some user information from the form (detailed below A) and calls a python script (see below B) to return a new page displaying that information. I am looking for a way to pass the value from var userid as the "form.value" and then use that value for some specific processing objectives already designed (I have no need to return any information to the webpage).
A---In the html page:
<form method="POST" action=http://ip_address/cgi-bin/test_doneButton.py>
<p>Your first name: <input type="text" name ="firstname">
<p>Click here to submit form: <input type="submit" value="Yeah!">
[code].....
View 1 Replies
View Related
Aug 12, 2009
In my application i am using Ajax post like:
The Form id as returned from the Controller side is saved in the variable getformid correctly, But it is not reflected in the savefield ajax post..And it is saving as 0 only even it alerts as the returned Form id..
In addition i am giving here the Code inmy Controller for saveForm:
And my Model saveForms is like:
And my save_form.ctp in my views folder is like:
View 6 Replies
View Related
Jun 9, 2010
I have my ajax create a form which sends its data to a PHP script.
But when i check the PHP script it only gets the $_POST['user'] the $_POST['message'] doesn't come through.
Why might this be ?
My AJAX:
Code:
Focus on:
Now the next part recives it and submits:
Code:
View 4 Replies
View Related
Sep 5, 2011
If someone posts something, and it includes a link, I'd like that link to be able to be clicked and link to the site instead of just showing up as a string. Does anyone know a script that can accomplish this? About an hour of googling has got me nowhere.
View 2 Replies
View Related
Aug 13, 2009
I have this code w/c makes a post request.
Code:
// start ajax code
var http_request = false;
function makePOSTRequest(url, parameters) {
http_request = false;
[Code]...
View 6 Replies
View Related
Oct 26, 2011
In this function, I'm trying to set the value of isValid with the results of $.post:
[Code]...
Unfortunately, isValid never changes from the initial "true". I know that $.post is working correctly because #msg_code reflects the corresponding message.
View 3 Replies
View Related
Oct 9, 2011
I want to know can i make a script from which visitor can post/upload their images with description ?
View 5 Replies
View Related
Sep 21, 2009
How do I pass a variable as a key in a key/value pair in Ajax?
[Code]...
View 2 Replies
View Related
Oct 23, 2010
I can't seem to get a variable declared from within a post callback, so that I could manipulate my script accordingly. I have delete.php, that deletes an id from a mysql db. If it fails, I want the script to stop and display the error. The .php script echos an "ok" if everything went fine, if not - it echos the error.var abort_error; // set the error variable
$.get("delete.php", { delete: $(this).parent().parent().parent().attr('id') },
function(data){
if(data != 'ok') {
[code]...
View 1 Replies
View Related
Jul 3, 2010
<fieldset class="submit" style="padding-left: 200px;">
<?php if ($site_exist >= 1){
echo "<input type="submit" name="submit" value="Update">";
[code]....
View 1 Replies
View Related
Feb 3, 2009
I am using a jQuery AutoComplete plugin which fills in text as you type. I need to find a way when the page is submitted (submit.php) to determine if the user choose a company from the list, or if they typed in their own unique company.
If an option is selected, can i have jQuery post an extra $_POST variable like "new" or "existing" so I can pick it up on the submit.php page? Or when an option is selected, can I have .js write a hidden tag which contains the variable "existing"?
[URL]
index.php
Code HTML4Strict:
<script type="text/javascript">
function findValue(li) {
if( li == null ) return alert("No match!");
[Code].....
The end goal here is to post a variable on the next page if the user selected an option from the autocomplete list.
View 5 Replies
View Related
Aug 29, 2011
I want to make two Dropdown but should be linked with each other.
There value should change after click "go" button.
In other word I want to make one html for Post Code/Pin Codes of my state.
I have made script till here:
View 4 Replies
View Related
May 4, 2010
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript">
var global_var = false;
function test_func() {
$.post("server.php", function(data){
alert("Data Loaded: " + data);
[Code]...
View 2 Replies
View Related
Nov 30, 2010
So I'm currently working on a ASP.NET Webforms site and I've run in to a small problem. On my .cs file I have the following Webmethod
[WebMethod]
public static string IsJobEditable(int jobid){
try{
string isEditable = "false";
JobsBLL jbl = new JobsBLL();
int jobStatusId = jbl.GetJobStatusId(jobid);
//If the jobs is either waiting or being edited it is
okay to edit it
if(jobStatusId ==
Convert.ToInt32(ConstantsUtil.JobStatus.Waiting) || jobStatusId ==
Convert.ToInt32(ConstantsUtil.JobStatus.Edit)){
isEditable = "true";
}return isEditable;
}catch (Exception ex){
throw ex;
}}
This function in this case will ALWAYS return TRUE as a string. On Aspx page I have the following
$(function () {
$.ajax({
type: "POST",
url: "Coordination.aspx/IsJobEditable",
data: "{jobid:" + jobid + "}",
contentType: "application/json; charset=utf-8",
dataType: "text",
success: function (result) {
alert(result);
//This is written out in the alert {"d":"true"}
I want this in a variable as a string so I can do a check on it before I do some other actions. The format is not a String so I cannot split on it to retrieve the "true" part.
},
error: function (err, result) { alert(err); }
});});
As you can see in the comments the value I get back in the Callback method is in to me a weird format. The type is unknown and I need this value to be able to proceed with my entire method surrounding the small portion of the Javascript. Where to access the result variable / data as a var or anything else that will let me put it into a var (as a string).
View 1 Replies
View Related
Nov 16, 2011
My code is this:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="EN" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<head>
[Code]...
In a few words it creates a button which when it is clicked it launches the add_text script. Add text script creates a text element for a form and puts a random value for the textbox. Textbox also takes a name which is of array type name="txt[]". Also form has the post method.
When I press e.g. 4 times the add text field button 4 text boxes are added. But when I click the submit button I get a result of 1 instead of 4 when the print count($txt) is executed. Copy paste the code to see the problem.
View 7 Replies
View Related
Sep 27, 2011
I need a client to be able to add there own url to some code but wanted to separate it, so they can paste it at the top of the code so its clear for them to see. Then reference the variable in the link.
View 3 Replies
View Related
Feb 22, 2010
How to make var newtext2 a hyperlink?
The hyperlink is a php variable.
I've only included this line of code.
View 1 Replies
View Related
Dec 6, 2011
Is it possible to make a variable out of index + 1 (or add a class) in the code below? I would like to put each in separate divs (dynamically) and add some css.$
(
document
)
.
ready
[Code]......
View 6 Replies
View Related