I am returning a simple javascriptResult that unhides a div. When I do this, other click events that post ajax will now post twice when clicked. What could be causing this?
I'm a bit fed up with the current navigator (TomTom) as it turned to adware after six months of use. "Please buy new maps at www.tomtom.com, click this button to see what you wanted to do".
Is there any (good) OSS navigation software with support for proprietary hardware? I'm perfectly happy to purchase separate maps and hardware for the software as long as I don't have to give my money to TomTom or Navigon.
I'm using Edittext and it has images and texts.
Then, I add image file on Edittext and I click Edittext, IME window shows, naturally.
( * At that time cursor is located at right-bottom corner of added image file.)
The problem is IME window overlap cursor, so users complain that 'where is my cursor?'
How to prevent that IME window overlap cursor?
I have created a asp:TextBox. its disabled. but its values is changed via javascript. When i click a button to get the updated value in that textbox it always show me empty ("").
In my Page_Load i am doing everything in if(!Page.IsPostBack) so there is no chance of updating TextBox value on postback in Page_Load.
Where i could be wrong? how can i get updated value?
I'm new to jquery, i write a simple snippetto toggle menu . But the problem is : when I scroll at the bot of page and click menu to toggle. It go top unexpectedly .
Thanks for reading .
I have one website and few mp3 in one folder fro user to download.
Is there any flash or php script which shows the content of folder in nice gui way so that user can click on them and download them
Hi All,
I'm trying to code a split panel, Left and right. Each will have a button which you can click on and it will toggle that panel, while expanding the other.
I am clueless as to where to start off? Is there an example that already does this?
Can someone help me out.
Thanks
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
hey guys
i made a script inspired by wordpress widgets'page to drag&drop blocks of my sites
but problem is in saving the position after droping
this is jquery code , i used to do the above target :
<script type="text/javascript" >$(function(){
$('.widget')
.each(function(){
$(this).hover(function(){
$(this).find('h4').addClass('collapse');
}, function(){
$(this).find('h4').removeClass('collapse');
})
.find('h4').hover(function(){
$(this).find('.in-widget-title').css('visibility', 'visible');
}, function(){
$(this).find('.in-widget-title').css('visibility', 'hidden');
})
.click(function(){
$(this).siblings('.widget-inside').toggle();
//Save state on change of collapse state of panel
updateWidgetData();
})
.end()
.find('.in-widget-title').css('visibility', 'hidden');
});
$('.column').sortable({
connectWith: '.column',
handle: 'h4',
cursor: 'move',
placeholder: 'placeholder',
forcePlaceholderSize: true,
opacity: 0.4,
start: function(event, ui){
//Firefox, Safari/Chrome fire click event after drag is complete, fix for that
if($.browser.mozilla || $.browser.safari)
$(ui.item).find('.widget-inside').toggle();
},
stop: function(event, ui){
ui.item.css({'top':'0','left':'0'}); //Opera fix
if(!$.browser.mozilla && !$.browser.safari)
updateWidgetData();
}
})
.disableSelection();
});
function updateWidgetData(){
var items=[];
$('.column').each(function(){
var columnId=$(this).attr('id');
$('.widget', this).each(function(i){
var collapsed=0;
if($(this).find('.widget-inside').css('display')=="none")
collapsed=1;
//Create Item object for current panel
var item={
id: $(this).attr('id'),
collapsed: collapsed,
order : i,
column: columnId
};
//Push item object into items array
items.push(item);
});
});
//Assign items array to sortorder JSON variable
var sortorder={ items: items };
//Pass sortorder variable to server using ajax to save state
$.post('updatePanels.php', 'data='+$.toJSON(sortorder), function(response){
if(response=="success")
$("#console").html('<div class="success">Saved</div>').hide().fadeIn(1000);
setTimeout(function(){
$('#console').fadeOut(1000);
}, 2000);
});
}
</script>
and a simple php file
but problem is its not sending data to target php file
is there anything wrong with my code ?
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 all,
Im writing an application that needs to get notified when a control in another application is clicked\invoked. How can i catch the click from my application?
Here are some more related questions :
Is UIAutomation can be a solution? is it working on unmanaged applications also?
Is the Spy++ solution works also on managed applications?
i'll be happy with any help.
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...
I am sending push notifications from php job application to iphone. I am sending push notifications regarding new jobs. Is this possible that when user click on the view of push notification pop up , then user redirect to the particular job in the device.
I mean I wanted to know can I send any custom data with push notification like jobId,something else....so that Iphone end Can retrieve and show the particular job ?
Thanks.
Hi,
I have 4 years experience on DotNet, not much.
I now learned developing for IPad.
I made a new project and opened the MainWindow.xib by double click in the interface builder. Not I put there a label, a textbox and a button.
But how to make the button event?
I am right now trying to hide six divs while showing only one of the divs. I've tried JavaScript and in jQuery, but nothing seems to work! Click here to get to the website.
I would like to know if it has to do with my CSS, jQuery, or the HTML. Or is there an easier way of doing this?
HTML:
<div id="resourceLinks">
<a href="#" name="resource" id="resource1">General Information</a><br />
<a href="#" name="resource" id="resource2">Automatic 401(k)</a><br />
<a href="#" name="resource" id="resource3">Consumer Fraud</a><br />
<a href="#" name="resource" id="resource4">Direct Deposit</a><br />
<a href="#" name="resource" id="resource5">Diversity</a><br />
<a href="#" name="resource" id="resource6">Women</a><br />
<a href="#" name="resource" id="resource7">Young Adults (20s - 40s)</a>
</div>
<div id="resource1></div>
<div id="resource2></div>
<div id="resource3></div>
<div id="resource4></div>
<div id="resource5></div>
<div id="resource6></div>
<div id="resource7></div>
CSS:
#resource1, #resource2, #resource3, #resource4, #resource5, #resource6, #resource7 {
position: absolute;
margin-left: 400px;
margin-top: -10px;
width: 300px;
padding-bottom: 120px;
}
#resourceLinks {
position: fixed;
margin-left: -450px;
z-index: 3;
margin-top: 180px;
font-size: 16px;
}
jQuery:
$(document).ready(function(){
$('#resourceLinks a').click(function (selected) {
var getName = $(this).attr("id");
var projectImages = $(this).attr("name");
$(function() {
$(".resource").hide().removeClass("current");
$("#" + projectImages ).show("normal").addClass("current");
});
});
});
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
}
}
What does the following code mean -
<a href="javacsript:;" onClick="addItem(160)">some link</a>
My basic doubt is which script is run when we click on the link
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
Am using this AS 2.0 Code on a button in flash CS3 :
on(press, release) {
getURL("http://somethinghere...","_top");
}
unfortunately, it doesnt work.
However, when i Ctrl+Enter in flash and click the button, it does.
it doesnt work after embedding the SWF movie in the webpage/browser.
any ideas?
In a new app, I plan to let users download their own files and stored them inside iPhone. The process is typically:
iPhone present a web page by UIWebView, in which there are several links to .zip files
the user browser the page and click on one of the .zip file link
iPhone downloads the file into the iPhone document folder, closes WebView, acknowledges the user when download is complete
How can that be done? Thanks
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]
I have followed answer given by CMS in relation to getting a menu to stay in one place on the page whilst you scroll the page as per this original question and it works very well but I also have a number of images on the page where I'm using the jquery fancylink plugin to show an enlarged image on click. The problem is when you then close the fancylink popup and scroll to the top of the page the static DIV then decides to stick to the very top of the page. Any ideas or help would this would be greatly appreciated.
Hi I am using the Development Provisioning Assistant
At Step 3: Verify your private and public keys in Keychain Access, I have the "iPhone Developer: XXXXXXX" certificate in the Keychains-login, but I can't find any keys. If I click Category-Keys I see nothing.
What should I do to make it has the private key and public key there?
I would like to use impress.js in order to make a website, with a navigation bar.
In each slide, the corresponding anchor or div must have an "active" class, in order to achieve a different link appearance.
I have followed all instructions provided here:
https://github.com/Ralt/impress.js/commit/f88feb8cae704ce27bd2168bdb77768f516ac2da#L2R605
but the "active" class on the correct menu must be added.
This is the code that generates the menu items. How can I add for example the "active" class in the first link?
/* ************************ MENU ***************************** */
// Capitalize first letter of string
// @see http://stackoverflow.com/a/1026087/851498
var capitalize = function( str ) {
return str.charAt(0).toUpperCase() + str.slice(1);
}
// `showMenu` API function creates the menu
// It defines the names of each entry by the id capitalized.
var showMenu = function() {
// Create the menu wrapper and the element that will be cloned
// for each entry.
var menu = document.createElement('div'),
el = document.createElement('div');
// Apply some classes
menu.className = 'menu';
el.className = 'menu-item';
// Create an element that will be the "button" and append it
// to the menu
var button = document.createElement('div');
button.className = 'menu-button';
button.textContent = 'Menu';
menu.appendChild(button);
// Now, for each div in #impress, add an entry to the menu
[].forEach.call(byId('impress').firstElementChild.children,
function( child, index ) {
var newEl = el.cloneNode(),
i = index + 1,
text = i + '. ' + capitalize(child.id);
// Set the text of the new element
newEl.textContent = text;
// Add an onclick event to the new element
// We need to use a closure to make sure the index is correct
(function( index ) {
newEl.addEventListener('click', function() {
goto(index);
});
}( index ));
// And append the new element to the menu
menu.appendChild(newEl);
});
// And append the menu to #impress
document.body.appendChild(menu);
};
Then, in each click it must be removed the active class on the current, and add it to the clicked element.
// Remove the active class from the current active
document.querySelector( '.active' )[ 0 ].classList.remove( 'active' );
// And add it to the clicked index
byId('impress').firstElementChild.children[ index ].classList.add( 'active' );
Where do I have to apply this code?
Thank you!