Hi All,
The autocomplete for a textbox is working when i am using the keyboard but it is not working for the button.[Userdefine keyboard for touch screen].
Geetha.
my controller uses code like this:
if params[:commit] == "Submit"
this used to work fine when I just had buttons. however, now I am using images as buttons like below:
<%= image_submit_tag 'butons/Add-08.png', :class => 'image-button-submit' %>
How can I pass the commit variable with value Submit along with this image_submit_tag?
I have a UITabBarControllerDelegate method that determines the title of the UITabBarItem and does something accordingly. This works well for items in my UITabBar but when I click on the More button the rest of my UITabBarItems are in a UITableView. How can I determine the title in the More section?
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
{
if ([self.tabBarController.selectedViewController.title isEqualToString:@"All"]) {
//do something
}
}
I have a javascript action on a div (asp.net panel) as an onkeypress attribute. This is the default action button on an asp.net Panel control. It contains the following:
onkeypress="javascript:return WebForm_FireDefaultButton(event, 'ctl00_cp1_ucInvoiceSearch_btnSearch')"
For some reason when I change my textbox to a jQuery textbox clicking enter no longer fires this div. Why and how can I hook it back up so when I enter text in the textbox and click enter it fires?
Lloyd
I had a beautiful pure HTML mockup for a webpage that I am now recreating in GWT. I'm attempting to use the same css in my GWT app, but that's not working well for me. GWT styles seem to override mine. I know I can completely disable the GWT styles, however I would prefer to have the styling for the GWT components that I'm adding (tab panel, button, etc). Is there a way to disable GWT styling, and only enable it for components that I choose?
hi guys! can you help me with these codes: http://pastie.org/908345, its two sortable lists and I need to get the serialize parameter of those lists to be passed when I click the submit button but I always get "(an empty string)" on "console.log". I'm using jquery-ui for this functionality. thanks!
I am using very simple code where I have a update panel with some panels inside and a submit button.
On submit, i hide one of the panels using this code:
panel.Style.Add("display", "none");
I am also using a UpdateProgress which works great in all but this case. When i set the display to none using this code, the UpdateProgress template does not disappear! remove the line, all is well ....
No idea why...
I've designed a training program and Html texts and image put into training.
I want to address my html file by an activity to sent another activity.
This is MainActivity
/*
* ListView item click listener. So we'll have the do stuff on click of
* our ListItem
*/
listViewArticles.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
switch (position) {
case 0:
Intent newActivity0 = new Intent(TrickPage.this,a_Dotted_Lines.class);
startActivity(newActivity0);
break;
case 1:
Intent newActivity1 = new Intent(TrickPage.this,TutorialsPage.class);
startActivity(newActivity1);
break;
case 2:
Intent newActivity2 = new Intent(TrickPage.this,TutorialsPage.class);
startActivity(newActivity2);
break;
case 3:
Intent newActivity3 = new Intent(TrickPage.this,TutorialsPage.class);
startActivity(newActivity3);
break;
default:
// Nothing do!
}
and this SecondActivity (show WebView)
public class a_Dotted_Lines extends Activity {
private WebView webView;
@SuppressLint("SetJavaScriptEnabled")
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.a_dotted_lines);
// Button HOME
ImageButton ImageButton_home = (ImageButton) findViewById(R.id.ImageButton_home);
ImageButton_home.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.setClass(a_Dotted_Lines.this, Main.class);
startActivity(intent);
overridePendingTransition(R.anim.fadein, R.anim.fadeout);
}
});
//Button Previous
ImageButton ImageButton_previus = (ImageButton)
findViewById(R.id.ImageButton_previus);
ImageButton_previus.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//Closing SecondScreen Activity
finish();
}
});
webView = (WebView) findViewById(R.id.webview_compontent);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("file:///android_asset/html/article.htm");
}
}
I want Send "file:///android_asset/html/article.htm" or other addres from MainActivity
Is it possible?
Sorry My English is not good
Hi,
I wanted to know how to display a webpage of a predefined url in blackberry. I would also like to get help in displaying map of a predefined location on button click. Can anyone plz help me out in determining how to do it...
History of the problem
This is continuation of my previous question
How to start a thread to keep GUI refreshed?
but since Jon shed new light on the problem, I would have to completely rewrite original question, which would make that topic unreadable. So, new, very specific question.
The problem
Two pieces:
CPU hungry heavy-weight processing as a library (back-end)
WPF GUI with databinding which serves as monitor for the processing (front-end)
Current situation -- library sends so many notifications about data changes that despite it works within its own thread it completely jams WPF data binding mechanism, and in result not only monitoring the data does not work (it is not refreshed) but entire GUI is frozen while processing the data.
The aim -- well-designed, polished way to keep GUI up to date -- I am not saying it should display the data immediately (it can skip some changes even), but it cannot freeze while doing computation.
Example
This is simplified example, but it shows the problem.
XAML part:
<StackPanel Orientation="Vertical">
<Button Click="Button_Click">Start</Button>
<TextBlock Text="{Binding Path=Counter}"/>
</StackPanel>
C# part (please NOTE this is one piece code, but there are two sections of it):
public partial class MainWindow : Window,INotifyPropertyChanged
{
// GUI part
public MainWindow()
{
InitializeComponent();
DataContext = this;
}
private void Button_Click(object sender, RoutedEventArgs e)
{
var thread = new Thread(doProcessing);
thread.IsBackground = true;
thread.Start();
}
// this is non-GUI part -- do not mess with GUI here
public event PropertyChangedEventHandler PropertyChanged;
public void OnPropertyChanged(string property_name)
{
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(property_name));
}
long counter;
public long Counter
{
get { return counter; }
set
{
if (counter != value)
{
counter = value;
OnPropertyChanged("Counter");
}
}
}
void doProcessing()
{
var tmp = 10000.0;
for (Counter = 0; Counter < 10000000; ++Counter)
{
if (Counter % 2 == 0)
tmp = Math.Sqrt(tmp);
else
tmp = Math.Pow(tmp, 2.0);
}
}
}
Known workarounds
(Please do not repost them as answers)
Those two first are based on Jon ideas:
pass GUI dispatcher to library and use it for sending notifications -- why it is ugly? because it could be no GUI at all
give up with data binding COMPLETELY (one widget with databinding is enough for jamming), and instead check from time to time data and update the GUI manually -- well, I didn't learn WPF just to give up with it now ;-)
and this is mine, it is ugly, but simplicity of it kills -- before sending notification freeze a thread -- Thread.Sleep(1) -- to let the potential receiver "breathe" -- it works, it is minimalistic, it is ugly though, and it ALWAYS slows down computation even if no GUI is there
So... I am all ears for real solutions, not some tricks.
I want to write JavaScript code that would, when I close the current HTML page, display an alert message like "Are you sure?"
I want to take the value of the button from the alert message, whatever the user pressed. How can I do this?
Hi guys, I keep getting duplicate entries in my database because of impatient users clicking the submit button multiple times.
I googled and googled and found a few scripts, but none of them seem to be sufficient.
How can I prevent these duplicate entries from occurring using javascript or preferably jQuery?
Thanx in advance!
I am trying to create something on a webpage that allows my users to create a desktop shortcut. Because my users are NOT technically savvy, I would like to avoid having them try to drag and drop. Is there a way that I could create a button on a webpage (either using JavaScript or .Net) that automatically creates a desktop shortcut for the user?
If you have follow up questions, please let me know. Thanks
As My Screen shot show that i am working on word matching game.In this game i assign my words to different UIButtons in Specific sequence on different loctions(my red arrow shows this sequence)and of rest UIButtons i assign a one of random character(A-Z).when i Click on any UIButtons its title will be assign to UILabel which is in Fornt of Current Section:i campare this UILabel text to below UILabels text which is in fornt of timer.when it match to any of my UILabels its will be deleted.i implement all this process already.
But my problem is that which is show by black lines.if the player find the first word which is "DOG". he click the Two UIButtons in Sequence,but not press the Third one in Sequence.(as show by black line).so here i want that when player press the any UIButtons which is not in Sequence then remove the previous text(which is "DO") of UILabel and now the Text of UILabel is only "G" .
Here is my code to get the UIButtons titles and assign it UILabel.
- (void)aMethod:(id)sender
{
UIButton *button = (UIButton *)sender;
NSString *get = (NSString *)[[button titleLabel] text];
NSString *origText = mainlabel.text;
mainlabel.text = [origText stringByAppendingString:get];
if ([mainlabel.text length ]== 3)
{
if([mainlabel.text isEqualToString: a]){
lbl.text=@"Right";
[btn1 removeFromSuperview];
score=score+10;
lblscore.text=[NSString stringWithFormat:@"%d",score];
words=words-1;
lblwords.text=[NSString stringWithFormat:@"%d",words];
mainlabel.text=@"";
a=@"tbbb";
}
else if([mainlabel.text isEqualToString: c]){
lbl.text=@"Right";
[btn2 removeFromSuperview];
score=score+10;
lblscore.text=[NSString stringWithFormat:@"%d",score];
words=words-1;
lblwords.text=[NSString stringWithFormat:@"%d",words];
mainlabel.text=@"";
c=@"yyyy";
}
else
if([mainlabel.text isEqualToString: d]){
lbl.text=@"Right";
[btn3 removeFromSuperview];
score=score+10;
lblscore.text=[NSString stringWithFormat:@"%d",score];
words=words-1;
lblwords.text=[NSString stringWithFormat:@"%d",words];
mainlabel.text=@"";
d=@"yyyy";
}
else {
lbl.text=@"Wrong";
mainlabel.text=@"";
}
}}
Thanx in advance
Hi.In my WinApp I am using DataGridView in tab control.When I am adding to table in another tab ,it does not update datagridview. After closing and re-opening app it shows new value.I connected my table with wizard to datagridview. And in my Button action after adding new value to data base I used
this.BindingContext[this.dataGridView1.DataSource].EndCurrentEdit();
this.dataGridView1.Refresh();
this.dataGridView1.Parent.Refresh();
but it is not working.I am using mysql.
In the Visual Studio output window, you can double click a line that contains a file path and line number and it automatically takes you to that location. In my program, I need to mimic this behavior and be able to click something (a button for example) and do go to a specific file and line number that I tell it to go to. Any help/suggestions would be appreciated.
I am working in C#.
Question How can I change <s:submit> to <s:a> in struts tag?
I want to send parameters to next page(action) by post (not get)
<s:form action="products" method="post" theme="simple">
<s:hidden name="code" value="%{code}"/>
<s:submit type="button" method="selectSale" value="see"/>
</s:form>
I wish to get the tweeter usename of a visitor to my site.
I do not wish to post statuses or access any other information.
I'd be happy to use OAuth, possibly with a 'Sign in with Twitter' button, but this then takes the user to a page which requests authorization for the application, that I wish to avoid.
Is there a way to get the username without authorization?
Thanks,
Daniel
Hi,
I am using modal dialog to validate server credentials.
After clicking on submit button it pops up new window.
Further i want call a servel. But its get called in the same pop up window.
I want to call it in the parent window by closing the pop up window.
How to achieve this?
I currently have a PHP form that uses AJAX to connect to MySQL and display records matching a user's selection (http://stackoverflow.com/questions/2593317/ajax-display-mysql-data-with-value-from-multiple-select-boxes)
As well as displaying the data, I also place an 'Edit' button next to each result which displays a form where the data can be edited. My problem is editing unique records since currently I only use the selected values for 'name' and 'age' to find the record. If two (or more) records share the same name and age, I am only able to edit the first result.
I want to display a website embedded in my own site and modify the DOM (e.g. change a button's color/size), similar to what Firebug is capable of.
I'm aware of the security issues that arise - my plan is to use this approach to do live website usability testing (A/B style).
I'm not limited to any specific RIA framework (yet would prefer Flex) - but it has to work without installing anything (so no AIR).
Cheers :-)
Hi All,
In my project i using LibXml to parse data, when i select a row in first controller i will take to next conttroller where i will get data using libxml if i click on the back button while loading the page i am getting exception. if i click afetr loading is completed it is working fine ca any one help me.
the exception is showing here
(void)connection:(NSURLConnection *)connection
didReceiveData:(NSData *)data {
// Process the downloaded chunk of data.
xmlParseChunk(_xmlParserContext, (const char *)[data bytes], [data length], 0);
}
Thank You
Hi i am developing an app for my QA department. I need to programically get how many phone numbers are there in the entire address book. No user input. Just click a button and then get how many phonenumbers are there in the ENTIRE addressbook.
Please email me at [email protected]