I am trying to append an image after the last input field in a div, any ideas as to why this won't work?
$('<img src="img/loading.gif" id="loading_img" />').appendTo($(form).find('input:last'));
I have tried a few options, none of which seem to work (if I have a simple multipart form with a named field, it works well, but when I don't know the name I can't just grab all files in the request...).
I have looked at http://stackoverflow.com/questions/81451/upload-files-in-google-app-engine and it doesn't seem suitable (or to actually work, as someone mentioned the code snipped it untested).
I have logic on a CheckBox's OnCheckedChanged event that fires on form load as well as when user changes check state. I want the logic to only execute upon user action.
Is there a slick way of detecting user vs programmatic change that doesn't rely on setting/checking user variables?
I have an issue in Expression Engine using the Champagne Extension where it won't allow me to send out campaigns. This extension utilizes https://www.campaignmonitor.com/ api to send out mass emails.
The Error I get is "HTML Content URL Required" when I try to send out campaigns form the back end of the Expression Engine Install.
What could be causing this issue that relates to the expression engine install?
I have a database that worked fine until I decided to add a log onto the page. here is what I have now:
<body>
<?php
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
require("serverInfo.php");
mysql_query("UPDATE `cardLists` SET `AmountLeft` = `AmountLeft` + ".mysql_real_escape_string($_POST['Add'])." WHERE `cardID` = '".mysql_real_escape_string($_POST['Cards'])."'");
echo "\"" .$_POST['Add'] ."\" has been added to the inventory amount for the card \"". $_POST['Cards']. "\"";
mysql_query("INSERT INTO `log` (`changes`, `amount`, `cardID`, `person`, Date)VALUES('ADDED','$_POST['Add']','$_POST['Cards']', '$_POST['Person']', NOW())");
mysql_close($link);
}
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<?php require("serverInfo.php"); ?>
<?php
$res = mysql_query("SELECT * FROM cardLists order by cardID") or die(mysql_error());
echo "<select name = 'Cards'>";
while($row=mysql_fetch_assoc($res)) {
echo "<option value=\"$row[cardID]\">$row[cardID]</option>";
}
echo "</select>";
?>
Amount to Add: <input type="text" name="Add" maxlength="8" />
Changes Made By: <select name="Person">
<option value="justin">Justin</option>
<option value="chris">Chris</option>
<option value="matt">Matt</option>
<option value="dan">Dan</option>
<option value="tim">Tim</option>
<option value="amanda">Amanda</option>
</select>
<input type="submit" name ="submit" onClick= "return confirm(
'Are you sure you want to add this amount?');">
</form>
<br />
<input type="button" name="main" value="Return To Main" onclick="window.location.href='index.php';" />
</body>
</html>
it works fine until I added the:
mysql_query("INSERT INTO `log` (`changes`, `amount`, `cardID`, `person`, Date)VALUES('ADDED','$_POST['Add']','$_POST['Cards']', '$_POST['Person']', NOW())");
mysql_close($link);
Can anyone see what is going on?
Hi All,
i have the following code .
and in Form is have property called isActive of type char ,how would i get the checked value of it ,i am getting some symbols like 'o' if checked.
I am using userform.getIsActive() ,where i am going wrong .I want 'y' or 'n' values
Hi,
I have a small question regarding rails. I have a search controller which searches for a name in database, if found shows the details about it or else I am redirecting to the new name page. Is there anyway after redirection that the name searched for to automatically appear in the new form page?
Thanks in advance.
I'm posting two forms - one in c# and one in delphi. But the result string seems to be different:
c# returns: ¤@@1@@@@1@@@@1@@xsm˱Â0Ð...
delphi returns: #$1E'@@1@@@@1@@@@1@@x'#$009C...
and sice both are compressed streams I'm getting errors while trying to decompress it... The C# is 'correct' - ie. extracts. I'm not an expert on delphi - I just need to convert some piece of code from c# to delphi.
c# code:
string GetData(Hashtable aParam, string ServerURL)
{
string Result = "";
WebRequest Request = HttpWebRequest.Create(ServerURL);
Request.Method = "POST";
Request.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
UTF8Encoding encUTF8 = new System.Text.UTF8Encoding(false);
StreamWriter writer = new StreamWriter(Request.GetRequestStream(), encUTF8);
foreach (DictionaryEntry element in aParam)
{
writer.Write(element.Key + "=" + element.Value + "&");
}
writer.Close();
writer.Dispose();
WebResponse Response = Request.GetResponse();
StreamReader Reader = new StreamReader(Response.GetResponseStream(), System.Text.Encoding.Default);
Result = Reader.ReadToEnd();
Reader.Close();
Response.Close();
Reader.Dispose();
return Result;
}
delphi code:
function GetData(aParam:TStringList; ServerURL:string):string;
var
req: TIdHTTP;
res: string;
begin
req := TIdHTTP.Create();
with req do
begin
Request.ContentType := 'application/x-www-form-urlencoded; charset=UTF-8';
Request.Method := 'POST';
Request.CharSet := 'utf-8';
Request.AcceptCharSet := 'utf-8';
res := Post(ServerURL, aParam);
end;
Result := res;
req.Free;
end;
-edit-
I'm using delphi 2010
i have a simple form and when user enters all the information and hits the submit botton than a panel should open just a width of 200px and height of 100px inside the same window. which should have two fields one is captcha image and a text box and a check botton and if captcha code is right than panel should automatically close and redirect to another page just like facebook .
all the details of the panel is saved on another php file.
Hi,
I have some windows command line applications, in binary form (I do not have the source code) which I use frequently. Sometimes I need to run them in Linux machines, and it works perfectly under wine (wine is not an emulator). The problem I'm facing now is that I need to work on a cluster which has not wine installed on it. I wonder if it is possible to create in another similar linux machine kind of a static executable or so, so i can run this windows program on the cluster
Thanks
Whenever i am updating UI in windows form using delegate it gives me cross thread exception
why it is happening like this?
is there new thread started for each delegate call ?
void Port_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
//this call delegate to display data
clsConnect(statusMsg);
}
protected void displayResponse(string resp)
{
//here cross thread exception occur if directly set to lblMsgResp.Text="Test";
if (lblMsgResp.InvokeRequired)
{
lblMsgResp.Invoke(new MethodInvoker(delegate { lblMsgResp.Text = resp; }));
}
}
I've made a database using phpMyAdmin , now I want to make a register form for my site where peaple can register .I know how to work with input tags in HTML and I know how to insert data into a database but my problem is that I don't know how I can connect to the database that is already made in phpMyAdmin.
I've just inherited a java application that needs to be installed as a service on XP and vista. It's been about 8 years since I've used windows in any form and I've never had to create a service, let alone from something like a java app (I've got a jar for the app and a single dependency jar - log4j). What is the magic necessary to make this run as a service? I've got the source, so code modifications, though preferably avoided, are possible.
I want to be able to take a shortened or non-shortened URL and return its un-shortened form. How can I make a python program to do this?
Additional Clarification:
Case 1: shortened -- unshortened
Case 2: unshortened -- unshortened
e.g. bit.ly/silly in the input array should be google.com in the output array
e.g. google.com in the input array should be google.com in the output array
Thanks for the help!
I'd like to script p4 a little. Unfortunately, some of the filenames that we're tracking have "@" in the filename.
The filenames are in the form[email protected]. If I try to do something like p4 sync a\@b.xml on a mac (or p4 sync [email protected] on windows) it gives the error:
Invalid changelist/client/label/date '@b.xml'
Is there another way to escape it that perforce will recognize?
Hello,
I have simple from written on C/gtk+ and i have function in this appliction. I need to run this function in a separate thread from gui form. Where can i see example?
Thank you.
Hello,
I am trying to understand what is a chain matrix multiplication and how it is different from a regular multiplication. I have checked several sourcers yet all seem to be very academically explained for me to understand.
I guess it is a form of dynamic programming algorithm to achieve the operation in an optimised way but I didn't go any further.
Thanks
Hi,
is it possible to trigger Parent's page load event from a popup.When i use javascript function window.parent.document.form.submit,this creates a postback.I want a function which creates "reload" for page because some of my functions work in the "if not postback" statement.
I Had created a detailed form in Django having some mandatory fields .I want to save page as Draft option without exception if mandatory fields are not set that time. How can I do it?
I'm using jQuery.serialize to retrieve all data fields in a form.
My problem is that it does not retriev checkboxes that is not checked.
It includes this:
<input type="checkbox" id="event_allDay" name="event_allDay" class="checkbox" checked="checked" />
but not this
<input type="checkbox" id="event_allDay" name="event_allDay" class="checkbox" />
How can I get "values" of checkboxes that is not checked?
I have two unmanaged pointers in the form of IntPtr and want to copy data between them. How can I do this? I know the method Marshal.Copy, but it can only copy between unmanaged and managed.
And the second part: Is copying unmanaged data from C# slower than doing it in unmanaged C/C++ using memcopy?
When I am concatenating object values together to form a string in VB.NET, is there a difference in performance or a recommended best practice between using the & concat or the + concat with calls to .ToString() on each object?
Example (which is faster or best practice):
Dim result1 As String = 10 & "em"
Dim result2 As String = 10.ToString() + "em"