hi,
I have a "Search" field in my website and I was wondering if I can assign my View to the search results, instead of using the default list.
Is this feasible ? How ?
thanks
Is there any way to add words to the suggestions in the soft keyboard?
For a specific Edittext field i would like to add a list of names to the suggestions that pops up on top of the soft keyboard in android 2.0.
Does anyone know if this is possible?
Hi,
what the syntax is in Action Mailer Basics rails guide ?
class UserMailer < ActionMailer::Base
def welcome_email(user)
recipients user.email
from "My Awesome Site Notifications <[email protected]>"
subject "Welcome to My Awesome Site"
sent_on Time.now
body {:user => user, :url => "http://example.com/login"}
end
end
How should i understand the construction, like
from "Some text for this field"
Is it an assignment the value to a variable, called "from" ?
Hello i need to implement in Html/javascript (or php is possible) a script who works like twitter, when the user writes text in a field a label change showing the caracters left.
Can you help me with a simple and easy script example?
I have a table with entries which has a DATE field. Each entry has a distinct date.
I'd like to select all the entries from the last month. How?
I tried SELECT * FROM registries WHERE reg_date = DATE_FORMAT(MAX(reg_date), "%m") without success
thx
I have a model called "Activity" in my django app. in the admin interface, it appears on the screen as "Activitys". how can I override the label on the admin page to make it "Activities" instead?
I see in the archives how to do this for a field, but not for a model itself. thanks!
i need to run this sql query , which give me a list of Id and Dates
i want to click each result and take with me the Id value to the next form
i wrote this query above but i see in the debager that the hidden ID get his value but not pass to the next form
i think i have a problem with the submit() .
where should i put him ?
thanks anat
function ShowAllCarts($user_email) {
$connB = new ProductDAO();
$connB->Connect();
$pro_query = "SELECT * FROM Cart WHERE `Email`='$user_email';";
$db_result = $connB->ExecSQL($pro_query);
$html_result = '<div data-role="content"> <ul data-role="listview" data-theme="b"> ';
$html_result .= '<form action="PreviouscartProduct.php" method="POST"/>';
while($row_array = $db_result->fetch_array(MYSQLI_ASSOC))
{
$Id= $row_array['Id'];
$Date= $row_array['Date'];
//$html_result //
$html_result .="<li><a href='PreviouscartProduct.php'>Cart number: $Id from Date: $Date><input type='hidden' name='Id' value'<?=$Id?>'</input></a></li>'";
$html_result .= '<a onclick="this.form.submit();" </a>;
}
$html_result .= ' </ul> </div>';
$html_result .= '</form>';
$connB->Disconnect();
return $html_result;
}
//display all carts
$func_result = ShowAllCarts($Email);
I am creating an ajax uploader with mootools. When I remove the ajax and simply upload the form I get $_FILES with the file data present. But when I use the ajax version, the $_FILES super global is empty. Every other part of the form is present. It acts as if it does not send the image at all but only in the ajax version. Any help is appreciated.
Thanks!
<form id="uploadphoto_pod" action="upload.php" enctype="multipart/form-data" method="post">
<input type='file' id='uploadphoto' name='uploadphoto'/>
<input type="submit" class="submit" name="add_product" value="Upload" />
</form>
<div id="response"><!-- Ajax Response --></div>
<script type="text/javascript">
window.addEvent('domready', function(){
$('uploadphoto').addEvent('submit', function(e) {
//Prevents the default submit event from loading a new page.
e.stop();
//("this" refers to the $('uploadphoto') element).
this.set('send', {onComplete: function(response) {
$('response').set('html', response);
}});
//Send the form.
this.send();
});
});
</script>
Hi, in C if I have a printf statement containing say "%.2f", it says that the precision is 2 digits after the decimal place. I haven't explicitly specify the width. I have two questions:
Is this good programming practice?;
Is without specifying the width means that the width of the field will get adjusted automatically when printing the number, irrespective of the number of digits it contains?
Thanks a lot...
I have a textarea that when a users pressed enter/return on their keyboard, I want to submit the field to a JavaScript function, just like it works on Twitter.
Ideas?
Thanks
When we have a column that will store a username that will only accept letters and numbers we always do validation on this inputfield using javascript or even server validation from code .. but i want to know if is there any way that can allow me make this validation on the Table column itself even some one try to enter data from any place it don't accept and throw exception ?
I'm using the smartif tag from this snippet (I'm holding on with regards to upgrading to 1.2) in my template for a certain boolean field like so:
{% if payment.extends_membership == "True" %}
{% trans "Yes" %}
{% else %}
{% trans "No" %}
{% endif %}
But whatever the value of extends_membership I get only No as the output. What could be the problem?
Here is my problem.
I need more than one row from the database, and i need the first row for certain task and then go through all the list again to create a record set.
$query = "SELECT * FROM mytable";
$result = mysql_query($query);
$firstrow = //extract first row from database
//add display some field from it
while($row = mysql_fetch_assoc($result)) {
//display all of them
}
Now, how to extract just the first row?
This is my SQL:
SELECT `tbl`.*, 123 AS `test` FROM `tbl` GROUP BY `test`
It works when I run it directly in MySQL. But PDO says:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'test' in 'field list'
Why so? How to cure this problem? I'm using Zend_Db.
I have to create a library with links to existing files. The files is on the FileChange server. I don't know how to create a custom content type, without the file field. Is it possible at all?
P.S. Sorry for my poor English
I'm trying to make an option dropdown menu and I got stuck when I try to show a textbox if the option 'other' is selected.
there's what I have:
<span id="con-country"><label for="country">Country: </label>
<select name="country" required="required">
<option value="usa">United States</option>
<option value="uk">United Kingdom</option>
<option id="other" value="other">Other</option>
</select>
</span>
<span id="con-specify">
<label for="specify">Specify: </label>
<input type="text" name="specify" id="c-specify" required="required"></input>
</span>
CSS:
#con-specify{
margin-left: 50px;
display: none;
}
Simple huh?, the problem is that I don't know how to do the code in jQuery
So, if the user select other in the menu, then the textbox should appear, how can I do that?
I have two table in mysql named rootpath with only one field 'root' and savecatogory with fields brandid,categoryid,name.There is no relation between these two tables.Now how can retrieve root,brandid,categoryid using single query.Please help me.
I did not forget to add name attributes as is a common problem and yet my serialized form is returning an empty string. What am I doing wrong?
HTML/javascript:
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script>
$( document ).ready( function() {
$('#word_form').submit(function(e) {
e.preventDefault();
console.log($(this).serialize()); //returns an empty string
});
});
</script>
</head>
<body>
<div id="wrapper">
<form name="word_form" id="word_form" method="POST">
<input type="image" name="thumbsUp" id="thumb1" value="1" src="http://upload.wikimedia.org/wikipedia/commons/8/87/Symbol_thumbs_up.svg" style="width:50px;height:50px;">
<input type="image" name="thumbsDown" id="thumb2" value="2" src="http://upload.wikimedia.org/wikipedia/commons/8/84/Symbol_thumbs_down.svg" style="width:50px;height:50px;">
</form>
</div>
</body>
Thanks!
I'm wondering if, with the new File API exposed in Chrome (I'm not concerned with cross-browser support at this time), it would be possible to write back to files opened via a file input.
You can see an example of what I'm trying to accomplish here: http://www.grehz.com/ide.
I know I can use server side scripts to dynamically create the files and allow the user to download them normally. I'm hoping that there's a way to accomplish this purely client side. I had read somewhere that you can write to files opened via a file input. I haven't been able to find any examples of this, though I have seen passing references to a FileWriter class.
I would be completely not surprised if this wasn't possible though (it seems likely that there are security issues with this). Just looking for some guidance or resources.
UPDATE:
I was reading here: http://dev.w3.org/2009/dap/file-system/file-writer.html
As I was playing around in Chrome, it looks like FileSaver and FileWriter are not implemented, but BlobBuilder is. I can call getBlob() on the BB object, is there any way I can then save that without FileSave or FileWriter?
I have a SQL Query:
SELECT documents.*, t_rights.rights, documents_list.docs
FROM documents
INNER JOIN t_rights on t_rights.num=documents.type_right
INNER JOIN documents_list on documents_list.num=documents.document1
WHERE code_document=1 or code_document=1
In case if i have fields documents.document1 and documents.document1 with some value all works fine. But if this field empty i get empty query result.
Its possible make query like this with empty fields?
i want to upload an excel file from the client to the server using asp .then it shud check the field name of the file with the oracle database table and then save its content in the database.
can somebody help me with this....??
i have things that requires processing and rarely changes except with certain events to take advantage of memcached. can i store a serial version of an object in a data field quickly?
Hi friends,
I want to some how control the visibility of some columns in my advance data grid. I have a data provider with 115 coumns out of which I want to hide few columns. I know the column index and header field of these columns. Is there some property in Advance data grid where I can specify this directly?
Thanks in advance.
My Windows application GUI is accepting some required application configuration fields from the user. I need to store them of course, but I wanna hide these fields from the user.
I cannot use database to store these configs.
I want to avoid using app.config either. (No app.config encryption)
Any suggestions, Where and in which format i should store fields. (Field example is: Accepting database User credentials, Task Schedule info etc.)