I use this code for drawing text in a panel:
Graphics g = panel1.CreateGraphics();
g.DrawString(...);
So I want to know how many pixels the input text will take in the panel?
Hi all,
I have got a simple HTMl form with one field as follows:
<input type="text" name="data['User']['user_id']" id="data['User']['user_id']" value="1">
$(document).ready(function(){
$("#data['User']['user_id']").mouseover(function(){
alert("hello");
});
});
The code couldn't work,
I think it may be the name of the Input text field that caused the problem,
but I don't know how to alter it
because this is the naming convention in CakePHP.
I'm using twitter bootstrap in my application. i gave e.preventDefault for link button in $(document).reday(), but it is not working.
Here is my code:
Master page:
<a id="lnkLogout" href="javascript:void(0);" onclick="PageLogout();"><i class="icon-off">
</i>Logout</a>
<script type="text/javascript" language="javascript">
$(document).ready(function () {
$('#lnkLogout').click(function (e) { e.preventDefault(); });
});
function PageLogout() {
//Code for logout from the application....
}
</script>
SampleDefaultPage.aspx :
<div class="row-fluid">
<div class="form-horizontal">
<h4 class="header blue bolder smaller">
Contact</h4>
<div class="control-group">
<label for="form-field-email" class="control-label">
Email</label>
<div class="controls">
<input type="text" style="width:200px;" data-val="true" data-val-required="Mobile Number is required." id="txtEmail">
<div class="space-3">
</div>
<span data-valmsg-replace="true" data-valmsg-for="txtEmail" class="field-validation-valid text-warning red"></span>
</div>
</div>
<div class="control-group">
<label for="form-field-website" class="control-label">
Phone Number</label>
<div class="controls">
<input type="text" style="width:200px;" id="txtPhno">
</div>
</div>
</div>
I have given txtEmail as mandatory field. if i left that field blank and click on Logout button in Master page, it says txtEmail is required. i dint do any validation in Logout onclick event. I have given preventDefault for Logout link. But still facing an issue. I should be able to logout even though txtEmail is left blank.
Thank you all in advance for your response.
I need to get a list of tags in a text, make their contents bold, and remove them. Can't figure out how to make it.
E.g. with the following input:
foo [b]bar[/b]
The result should be:
foo bar
I use the following code to extract the tags:
Dim matches = Regex.Matches(OriginalRich.Text, String.Format("(\[{0}\])(.*?)(\[/{0}\])", tag), RegexOptions.IgnoreCase Or RegexOptions.Compiled)
Any help would be appreciated.
The ones they use with grouped table view.
I'm using a table view that links to another view that has text on it. To make it look less 'plain' I wanted to add that striped background and then put something like a white 'text box' on that.
Do they allow it to be used?
Hello,
I have the following code working fine but the problem is that it always submits the first div (article) even though it's hidden. My question is how do I submit the form and the elements in the form in the div that's shown? (if I select Music radiobutton, I want to submit the input elements of the Music Div not the Article div. Thanks.
$(document).ready(function(){
$("input[name$='itemlist']").click(function() {
var selection = $(this).val();
$("div.box").hide();
$("#"+selection).show();
});
});
<!--radio buttons-->
<div id="articleselection"><input name="itemlist" type="radio" value="article" /> Article/Book </div>
<div id="musicselection"><input name="itemlist" type="radio" value="music" /> Music</div>
<!--article div starts-->
<div id="article" class="box">
<table class="fieldgroup">
<tr><td>Journal Title: <input id="JournalTitle" name="JournalTitle" type="text" size="60" class="f-name" tabindex="1" value="JournalTitle">
</table>
<table class="fieldgroup">
<tr><td>Article Author: <input id="ArticleAuthor" name="ArticleAuthor" type="text" size="40" class="f-name" tabindex="2" value="<"ArticleAuthor"></td></tr>
</table>
</div>
<!--music div starts-->
<div id="music" class="box">
<table class="fieldgroup">
<tr><td>Music Title: <input id="Music Title" name="Music Title" type="text" size="60" class="f-name" tabindex="1" value="Music Title">
</table>
<table class="fieldgroup">
<tr><td> Music Author: <input id="MusicAuthor" name="Music Author" type="text" size="40" class="f-name" tabindex="2" value="<"MusicAuthor"></td></tr>
</table>
</div>
I'm working with a CMS system where I cannot control database column names. And I've got two related tables:
Table: content
+------------+----------+----------+----------+----------+
| content_id | column_1 | column_2 | column_3 | column_4 |
+------------+----------+----------+----------+----------+
| 1 | stuff | junk | text | info |
| 2 | trash | blah | what | bio |
+------------+----------+----------+----------+----------+
Table: column_names
+------------+-------------+
| column_id | column_name |
+------------+-------------+
| 1 | good_text |
| 2 | bad_text |
| 3 | blue_text |
| 4 | red_text |
+------------+-------------+
What I'd like to do here is select from the first table, but select the columns AS the column_name from the second table. So my result would look like:
+------------+-----------+----------+-----------+----------+
| content_id | good_text | bad_text | blue_text | red_text |
+------------+-----------+----------+-----------+----------+
| 1 | stuff | junk | text | info |
| 2 | trash | blah | what | bio |
+------------+-----------+----------+-----------+----------+
Can anyone help me? I want to create a search button that will search a word in more than one text file stored on the disk and want to dispaly the corresponding text file in a jsp page.
This code gets the text that's in a certain column of a table row:
var keyA = $(a).children('td').eq(column).text().toUpperCase();
Q: How do I rewrite this to get the value of an input tag that's in the table cell?
var keyA = $(a).children('td').eq(column).('input').val().toUpperCase();
Hi,
I have a text box where the value the result of a calculation carried out in jQuery. What I would like to do, using jQuery, is to display brackets around the number in the text box if the number is negative.
The number may be used again later so I would then have to remove the brackets so further calculations could be carried out.
Any ideas as to how I could implement this?
Thanks
Zaps
Hello,
How to set GtkComboBox default selectio?
How to Adjust X, Y location of Drop Down menu of GtkComboBox?
I want to display Drop Down menu at the lower edge of GtkComoBox.
Also I want to set text color of Selected text in combo box to white.
Thank,
PP.
showDescriptionPath is being passed from the previous Tableview. The text shows up, but the entire path prints in the UITextField instead of just the value of "Description" in my plist.
NSString *DescriptionPath = [[NSBundle mainBundle] bundlePath];
NSString *DescriptionInfoPath = [DescriptionPath stringByAppendingPathComponent:showDescriptionInfo];
showDescription.text = [[NSString alloc] initWithFormat:@"%@",DescriptionInfoPath];
i am using this ternary operator for the display the value but it always says that Input string is not in correct format .
<asp:TextBox ID="txtPerOfBase" runat="server" Style="text-align: right;" Text='<%# decimal.Parse(Eval("CommissionableAmountBase").ToString()) == 0 ? Eval("CommissionablePercentBase","{0:N2}"): Eval("CommissionableAmountBase","{0:N2)")%>'
Width="80px"></asp:TextBox>
Hi,
I have Application X with Subform x1, x2, x3.
The Subform has, because its multi-language, not a static text in it, neither a specific window header text or something.
What can I do to find this window in my code an react when its open, e.g. with a messagebox?
I'd like to write small scripts which feature incremental search (find-as-you-type) on the command line.
Use case: I have my mobile phone connected via USB, Using gammu --sendsms TEXT I can write text messages. I have the phonebook as CSV, and want to search-as-i-type on that.
What's the easiest/best way to do it? It might be in bash/zsh/perl/python or any other scripting language.
Thanks!
Please help me, i'm having a hard time with it. here is how should my program be. In first frame, there is a textfield1 where a user input text and when he press a button, a new frame will be display with a textfield2 that displays the inputted text from the textfield1
i would like to force the textbox to immediately change the text to UCASE as soon as the user moves away from the field. is this possible?
the important thing is that this text will be used in a SQL query to update a table.
I'm familiar with VB.NET, but VBA in excel has me stumped.
With my best attempt, I get a "Type mismatch" error:
Sub AddQuotes()
For Each x In Range("List").Cells
x.Text = "*" * " & x.text & " & "*"
Next
End Sub
i have a click event for $('#blah div'). div has text inside of it (not inside a div, span, p, etc) and has a textarea in it. The textarea is triggering the event as well, how do i make it only trigger when i click the text and ignore the textarea?
This is my code for downloading html to parse:
HttpWebResponse response = (HttpWebResponse)req.GetResponse();
var obj = response.GetResponseStream();
StreamReader reader = new StreamReader(obj);
tmp = reader.ReadToEnd();
(tmp is a string) and when writing it to a text file to look through, I'm noticing that responseStream is stripping out the very text that I'm actually looking to parse. Is there any other way to download raw HTML for future parsing or am I simply out of luck?
Supposed I have the following string:
string str = "<tag>text</tag>";
And I would like to change 'tag' to 'newTag' so the result would be:
"<newTag>text</newTag>"
What is the best way to do it?
I tried to search for <[/]*tag but then I don't know how to keep the optional [/] in my result...
Hi!
I have an Android TextView where the view itself is limited to four lines. If the text exceeds this limit I want the end of the view to end with something like .. <-- to notify that there is more text here so you can click and open in fullscreen for example. Not just suddenly stop in the middle of a sentence. Is there a quick fix for this?
can I add BehaviorID attribute for asp.net textbox and use it to be recognize by java script??
On other word, I want to to apply some java script function on asp.net text box and I want to let the java script find the asp.net text box by the BehaviorID.
I am trying to create a table of 100 random numbers, the random numbers are from 0 to 100. I need to display the 100 random numbers as a 10 by 10 matrix in HTML, using JS and jQuery. The code that I have been working on displays the last array 10 times. Here is the code:
<html>
<head>
<title>My Web Page</title>
<script type = "text/javascript" src = "http://code.jquery.com/jquery-1.8.2.min.js" />
</script>
</head>
<body>
<h1 id = "randData">Randomize Data</h1>
<button id = "myRandomizeBtn">Randomize</button>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
</body>
<script type="text/javascript">
$("#myRandomizeBtn").bind("click",randomizeHandler);
function randomizeHandler(evt)
{
var n = 10;
var data = new Array();
for (var i = 0; i < n; i++)
{
for (var j = 0; j < n; j++)
{
data[i,j] = Math.floor(100*Math.random());
$("p").text(data);
}
$("br").text(data);
}
}
</script>
</html>
SELECT COUNT(*) AS Expr1
FROM Book
INNER JOIN Temp_Order ON Book.Book_ID = Temp_Order.Book_ID
WHERE (Temp_Order.User_ID = 25)
AND (CONVERT (nvarchar, Temp_Order.OrderDate, 111) = CONVERT (nvarchar, GETDATE(), 111))
In here i want to change my User_ID to get from a label.Text
this Sql Statement is in a DataView. so in the Wizard it not accepting a text box values or anything.
can someone please help me to solve this