Hi friends, I'm having a dropdown list in my web page. And it contains two lists. 1. Yes 2.No. If we select yes then the desired text box and label will visible, else it won't be visible. So hw to do this?
Hello!
How can I draw a String in Java (using Graphics2d) in monospace mode? I have a font that looks like LCD screen font, and I want to draw something like LCD label.
I am using Digital 7 Mono font.
Do you know where I can find another font that will be monospace and lcd (I wan to type only digitals)?
Hi,
i have this page.
login: [email protected] password: m
You can see two selects in the filter for which i have this rule in gente.css:
td.select label{
margin-left:12px;
}
The problem: the rule is applied but doesn't appear in the Style tab of Firebug.
Any idea?
Regards
Javi
how can i calculate the total disc space available + free space + used space in the DVD/CD inserted in f-drive.. and display the result on the label...
Why System.Web.UI.WebControls.HyperLink doesn't inherit System.Web.UI.ITextControl?
But System.Web.UI.WebControls.Label, System.Web.UI.WebControls.Literal, System.Web.UI.LiteralControl, etc -- does? How can it be?
I'm trying to upload a file using "AJAX", process data in the file and then return some of that data to the UI so I can dynamically update the screen.
I'm using the JQuery Ajax Form Plugin, jquery.form.js found at http://jquery.malsup.com/form/ for the javascript and using Django on the back end. The form is being submitted and the processing on the back end is going through without a problem, but when a response is received from the server, my Firefox browser prompts me to download/open a file of type "application/json". The file has the json content that I've been trying to send to the browser.
I don't believe this is an issue with how I'm sending the json as I have a modularized json_wrapper() function that I'm using in multiple places in this same application.
Here is what my form looks after Django templates are applied:
<form method="POST" enctype="multipart/form-data" action="/test_suites/active/upload_results/805/">
<p>
<label for="id_resultfile">Upload File:</label>
<input type="file" id="id_resultfile" name="resultfile">
</p>
</form>
You won't see any submit buttons because I'm calling submit with a button else where and am using ajaxSubmit() from the jquery.form.js plugin.
Here is the controlling javascript code:
function upload_results($dialog_box){
$form = $dialog_box.find("form");
var options = {
type: "POST",
success: function(data){
alert("Hello!!");
},
dataType: "json",
error: function(){
console.log("errors");
},
beforeSubmit: function(formData, jqForm, options){
console.log(formData, jqForm, options);
},
}
$form.submit(function(){
$(this).ajaxSubmit(options);
return false;
});
$form.ajaxSubmit(options);
}
As you can see, I've gotten desperate to see the success callback function work and simply have an alert message created on success. However, we never reach that call. Also, the error function is not called and the beforeSubmit function is executed.
The file that I get back has the following contents:
{"count": 18, "failed": 0, "completed": 18, "success": true, "trasaction_id": "SQEID0.231"}
I use 'success' here to denote whether or not the server was able to run the post command adequately. If it failed the result would look something like:
{"success": false, "message":"<error_message>"}
Your time and help is greatly appreciated. I've spent a few days on this now and would love to move on.
In R, I'm wanting to create a graph with x axis label expression(varname), where varname is a character object. For example:
varname <- "beta[1]"
hist(rnorm(20),xlab=expression(varname))
But that gives me a graph with xlab="varname" rather than xlab=expression(beta[1]). How to I convince expression() to evaluate the variable?
I have a page that needs to create dynamic form fields as often as the user needs, and I am trying to use Ajax to tie it in to my database for faster form entry and to prevent user typos.
So, I have put my Ajax returned data into popup div, the user selects, then the form field is filled in. The problem comes on the cloned fields. They don't seem to want to bring up the popup div when focused. I am thinking it is something to do with when they get created/added to the DOM.
Here is my JS that creates the clones:
$(document).ready(function() {
var regex = /^(.*)(\d)+$/i;
var cloneIndex = $(".clonedInput").length;
$("button.clone").live("click", function(){
$(this).parents(".clonedInput").clone()
.appendTo("#course_container")
.attr("id", "clonedInput" + cloneIndex)
.find("*").each(function() {
var id = this.id || "";
var match = id.match(regex) || [];
if (match.length == 3) {
this.id = match[1] + (cloneIndex);
}
});
cloneIndex++;
numClones=cloneIndex-1;
//alert("numClones "+numClones);
});
Here is where I expect to be able to get focus on the correct cloned field and call the popup. The baker_equiv0 id is original code, whereas baker_equiv1 is the first clone.
$('#baker_equiv0').focus(function() { \\ THIS CODE WORKS
$('.popup').fadeIn(500);
$('#results').empty();
// document.enter_data.baker_equiv1.value="test"; THIS LINE WORKS
//alert("numClones "+numClones);
});
$('#baker_equiv1').focus(function() { // THIS DOESN'T EVER FIRE
alert("numClones "+numClones);
$('.popup').fadeIn(500);
$('#results').empty();
});
Here is the HTML with the form:
<label for="baker_equiv" class="">Baker Equivalent: <span class="requiredField">*</span></label>
<input type="text" class="cinputsa" name="baker_equiv[]" id="baker_equiv0" size="8" ONKEYUP="get_equiv(this.value);">
If I put this in the HTML code above, it works fine: onfocus="alert(this.id)"
I'd also be interested in how to adjust the JS code to work based on the id array created rather than having to copy code for each potential set of fields clones, i.e., baker_equiv[] rather than baker_equiv0, baker_equiv1, etc.
Thanks all!
Hello everyone! I have created a function (see below) that calculates a 7.5% sales tax. Now I need help doing the following:
Have totalTax() take in 2 arguments
one for the price and one for the
tax.
On submit (use the onSubmit event
handler to call this function) have
the function process the price and
the tax by manipulating the arguments
you passed in.
Have the sales tax on the page update
dynamically with what ever the sales
tax is that you defined for the
function
7.5 percent sales tax:
Instead of using .innerHTML use
jQuery to access these document
elements and write to them:
document.getElementById('requestedAmount' ).innerHTML = priceInput;
document.getElementById('requestedTax' ).innerHTML = salesTax;
document.getElementById('requestedTotal' ).innerHTML = totalAmount;
Original Code:
<script type="text/javascript">
$().ready(function() {
// validate the comment form when it is submitted
$("#inputForm").validate();
$("#priceInput").priceFormat({
prefix: '',
limit: 5,
centsLimit: 2
});
});
function totalTax(){
var priceInput = document.getElementById( 'priceInput' ).value;
var salesTax = Math.round(((priceInput / 100) * 7.5)*100)/100;
var totalAmount = (priceInput*1) + (salesTax * 1);
document.getElementById( 'requestedAmount' ).innerHTML = priceInput;
document.getElementById( 'requestedTax' ).innerHTML = salesTax;
document.getElementById( 'requestedTotal' ).innerHTML = totalAmount;
}
</script>
<body>
<form class="cmxform" id="inputForm" method="get" action="">
<p>
<label for="priceInput">Enter the price: </label>
<input id="priceInput" name="name" class="required"/>
</p>
<p>
<input class="submit" type="submit" value="Submit" onclick="totalTax();"/>
</p>
</form>
<div>Entered price:
<p id="requestedAmount"></p>
</div>
<div>7.5 percent sales tax:
<p id="requestedTax"></p>
</div>
<div>Total:
<p id="requestedTotal"> </p>
</div>
How can I print (for example in a label) the text into a GtkTextView?
For GtkLabel and GtkEntry there are gtk_label_get_text() and gtk_entry_get_text(), but for GtkTextView?
hello
is there any way to get the selected item in a qmenu ?
i want to bind all items in that list to one function and get the item once user click it .
i've been looking for a way to get the item's label or index for 3 days , but couldn't find it .
any ideas ?
thanks in advance
I want to prevent my application from restarting when orientation of device changes. I have lock the app orientation as per below code but it doesn't help for the same.
<activity android:name=".CheckMemory"
android:screenOrientation="portrait"
android:theme="@style/customTheme"
android:label="@string/app_name">
</activity>
Hi All
I have seen many other samples out there that draw smooth text on glass. But I can't use them. I need every single label that gets added at runtime to be smooth. I can't just "draw" text onto the screen.
Is this at all possible, and are there and sources around?
Thank you
I have a simple tray icon using PyGTK's gtk.StatusIcon:
import pygtk
pygtk.require('2.0')
import gtk
statusIcon = gtk.StatusIcon()
statusIcon.set_from_stock(gtk.STOCK_EDIT)
statusIcon.set_tooltip('Hello World')
statusIcon.set_visible(True)
gtk.main()
How can I add a text label (one or two characters; basically, unread count) to the tooltip - without creating separate images for set_from_file?
Hello Again, I posted a question on here and got an answer within minutes I'm hoping the wizards on here can help me again.
Okay so I'm using a script I found online to try and add this function to a shopping cart form.
Here's the setup.
I have a payment method dropdown with Visa, Mastercard and Bank Withdrawal as the options.
For the credit cards I have one hidden div with a certain set of fields, and for the bank I have another hidden div. Each of the divs have named ID's - #payCredit and #payBank
The css for both have margin: 0px and display: none;
Here's a peice of javascript I used successfuly on a shipping address checkbox
`function toggleLayer( whichLayer )
{
var elem, vis;
if( document.getElementById ) // this is the way the standards work
elem = document.getElementById( whichLayer );
else if( document.all ) // this is the way old msie versions work
elem = document.all[whichLayer];
else if( document.layers ) // this is the way nn4 works
elem = document.layers[whichLayer];
vis = elem.style;
// if the style.display value is blank we try to figure it out here
if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}`
I was hoping I could change it slightly to meet my needs.
Here's the dropdown
<label>Payment Method:</label>
<select name="payment" id="payment" class="dropdown3" style="width:8em">
<option selected="selected">Select</option>
<option value="Visa" onclick="javascript:toggleLayer('payCredit');">Visa</option>
<option value="MasterCard" onclick="javascript:toggleLayer('payCredit');">Mastercard</option>
<option value="Direct" onclick="javascript:toggleLayer('payBank');">Direct Withdraw</option>
</select></li>
The current result is that it kinda works.
I can open the dropdown and select Visa and it appears, if I select Visa again it disappears, if I select Visa and then select bank, both appear.
You can see what i'm working on here - http://test.sharevetcare.com/bestfriends/cart3.html
I am going to develop an Iphone application which will parse the RSS feeds and display the items in my custom cell.(Cell containing the image, label, description, etc).
Can somebody please help me?I would be sooo happy if somebody can help me!! Thanks so much!
if user enter string value in the textbox and press button, i should see error message in label about entered string value.. How can i do that? and what is the code?
Hi! Im trying to call some windows forms code (like setting label.visible = true in some event code, everything compiles ok, but form does not react to change! What could be the problem?
Problem is in lines:
labelNewCall.Visible = true;
timerNewCall.Enabled = true;
code : http://pastebin.com/gV28PN4P
also other code did not work, until i reordered some of if (order is not important but it did not work otherwise... )
I am writting a application to detect the change of system disks.
for example, if user insert a disk, the application can detect this event.
If user change the volume label, I can receive the message.
Is there any APIs to detect this kind of event?
Many Thanks!
I've created a custom class inheriting from UILabel. I placed a UILabel in my nib and set the class of the label to my custom class. However, when the viewDidLoad method is called, the view is of the class UILabel instead of my custom class.
Any ideas?
Hi im having a few problems rotating a string, i found that you need graphics.rotate() but when i change the rotation, i cannot even see the string. It appears the pivot point has completely thrown me. Also i saw an example with transform but i decided i did not need this?
If my string was a graph label, reading top to bottom and i needed to rotate it 180 degrees so that it read bottom to top, how would i do this?
Thanks in advance
Hi,
How do I access a model's parent's attribute in a form? For example, for the following form for answer, I want to access answer.question.text and use that for the question - how do I do this?
Thanks!
<% form_for :answers do |ans| %>
<%= ans.label :question, "Question" %>
<%= ans.text_field :value %>
Is it possible to change a itemize font size after including
enumitem package?
I had:
\setbeamerfont{itemize/enumerate body}{size=\small}
\setbeamerfont{itemize/enumerate subbody}{size=\scriptsize}
\setbeamerfont{itemize/enumerate subsubbody}{size=\scriptsize}
but after I included the enumitem package the font size for
itemize became default, as far as I see.
\usepackage{enumitem}
\setlist{label=\tiny\textbullet, leftmargin=1em, labelsep=*, labelwidth=0.2em, noitemsep, labelindent=\parindent, nolistsep}
I cannot find anything related in enumitem documentation.
I have a custom tableviewcell with a label and a textfield. Right now if I click on the cell to exit the textfield, it only focuses on it if I click within the bounds of the textfield. Is there a way for me to click anywhere in the cell and immediately have it focus on the textfield?
Thanks