A php script is giving this array (which has been passed through json_encode())
[{name:"a1",path:"b1"},{name:"a2",path:"b2"}]
I use the following function to retrieve the array to jquery:
$.ajax({
type: "POST",
url: "functions.php",
data: "action=" + something,
cache: false,
success: function(response) { alert(response); }
});
The problem is I get the array back as a string:
(new String("[{name:"a1",path:"b1"},{name:"a2",path:"b2"}}]"))
How can I get it to be a javascript array?
Help would be much appreciated.
How to call AS2 method from NextFrame(or any other frame) in Flash?
Say you have Action Frame on frame 3, and another one on frame 4, how do you call methods on frame 4 when you are on frame 3.
I want the validator for password text input.
At least one Upper case letter
At least one numeric character
At least one special character such as @, #, $, etc.
should be there in password how can i give it in action script or mxml.please help me.
Thanks.
Hi All,
I am facing an issue while handling multiple buttons in a form using struts.
I have three buttons add,delete and go .I have made forward as hidden and on click of a button i would get the name of the button.
The problem is with go button on click of that i want to call a javascript and then call the action and return to the same page .
Hello every body:
We are trying to develop an application that send messages to a service, but we only have send message between two applications. We are developing in Delphi 7, Windows XP.
We need the service send back a message to the application, depending on the result of the action that the application sent to do to the service.
I am sorry about my english...
Thanks.
I thought I was being slick by having movieclips that I export for actionscript and then addChild later. I've made this one movieclip that loads html text through as, and it works fine when I drag it to the stage; but if I do
var trackListingBox:trackListingScreen = new trackListingScreen();
addChild(trackListingBox);
it either doesn't run the actionscript, or it's somehow broken. Can children not run their own action script?
Instead of changing my host file I'd like Firefox to think my domain is on my own server while my other browser uses the real IP address. I used to edit my host files but that forces both browsers to change the IP address.
I found change host, but it doesn't appear to use the alternative host file. I also saw a comment asking when it will work on Firefox 6+.
I tried Host Admin and it fails. It works but the alternative IP address must be in your host file already (which I don't want) and it lets you deselect a domain so the host file is ignored which is not what I want.
As the title said, I got a problem! i encountered the "RJS Error:[object error]",the code in my application is
page << "#{hidden_print("#{url_for(:controller => 'tables', :action => 'dispatch', :id => id, :pop => true, :print =>true)}")} "
the method hidden_print is
def hidden_print(url)
"window.parent.headFrame.document.all.iframe_helper.src = '#{url}';"
end
I am working with an insert trigger within a Sybase database. I know I can access the @@nestlevel to determine whether I am being called directly or as a result of another trigger or procedure.
Is there any way to determine, when the nesting level is deeper than 1, who performed the action causing the trigger to fire?
For example, was the table inserted to directly, was it inserted into by another trigger and if so, which one.
Hi,
We render SSRS reports through the Web Services API.
For some reason when I get the HTML back any toggle functionality is missing.
I see that ReportingExecutionService has an option called ToggleItem however I don't see any way of getting the item's ID.
How can I discover toggle items and enable an action to be called on one?
I have this textbox I use to capture keyboard shortcuts for a preferences config. I use a low-level keyboard hook to capture keys and also prevent them from taking action, e.g. the Windows key, but the Alt key still comes through and makes my textbox lose focus.
How can I block the Alt key, so the focus is kept unaltered at my textbox?
In continuation off of this question, what are the PHP statements I need to accomplish this:
curl -is -F 'J:A-login=BTDT::Action::Login' -F 'J:A:F-address-login=EMAILADDRESS' -F 'J:A:F-password-login=PASSWORD' http://hiveminder.com/splash | grep -o 'JIFTY_SID_HIVEMINDER=[0-9a-f]\+'
The flags and fields are still mysterious, and I've not the time presently to swim through docs to figure out how this translates. I do at least understand the | grep ... portion, though.
I need my app to be the default action for opening a particular file type. How do I control this? Also, how can my app access the file being opened?
Thanks.
I have a view controller class (child) which extends from view controller class (parent). In the parent class's loadView() method I create a sub-view (named myButtonView) with two buttons (buttons are horizontally laid out in the subview) and add it to the main view. In the subclass I need to shift these two buttons up by 50pixels.
So, I am shifting the buttonView by calling the setFrame method. This makes the buttons shift and render properly but they do not respond to touch events after this. Buttons work properly in the views of Parent class type. In the child class type view also, if I comment out the setFrame() call the buttons work properly.
How can I shift the buttons and still make them respond to touch events?
Any help is appreciated.
Following is snippets of the code.
In the parent class:
- (void)loadView {
// Some code...
CGRect buttonFrameRect = CGRectMake(0,yOffset+1,screenRect.size.width,KButtonViewHeight);
myButtonView = [[UIView alloc]initWithFrame:buttonFrameRect];
myButtonView.backgroundColor = [UIColor clearColor];
[self.view addSubview:myButtonView];
// some code...
CGRect nxtButtonRect = CGRectMake(screenRect.size.width - 110, 5, 100, 40);
myNxtButton = [UIButton buttonWithType:UIButtonTypeCustom];
[myNxtButton setTitle:@"Submit" forState:UIControlStateNormal];
myNxtButton.frame = nxtButtonRect;
myNxtButton.backgroundColor = [UIColor clearColor];
[myNxtButton addTarget:self action:@selector(nextButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
[myButtonView addSubview:myNxtButton];
CGRect backButtonRect = CGRectMake(10, 5, 100, 40);
myBackButton = [UIButton buttonWithType:UIButtonTypeCustom];
[myBackButton setTitle:@"Back" forState:UIControlStateNormal];
myBackButton.frame = backButtonRect;
myBackButton.backgroundColor = [UIColor clearColor];
[myBackButton addTarget:self action:@selector(backButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
[myButtonView addSubview:myBackButton];
// Some code...
}
In the child class:
- (void)loadView {
[super loadView];
//Some code ..
CGRect buttonViewRect = myButtonView.frame;
buttonViewRect.origin.y = yOffset; // This is basically original yOffset + 50
[myButtonView setFrame:buttonViewRect];
yOffset += KButtonViewHeight;
// Add some other view below myButtonView ..
}
I know that I can assign an onclick action to <input type="button"-style buttons. But is it possible to let it behave like an <a> without using JavaScript? I ask because I'm in a situation where technically I'm better off using <a>'s, but buttons look nicer.
I need to add one parameter to the default REST route for the show action for SEO purposes:
resources :neighborhoods, :only => [:index, :show]
neighborhood_url(neighborhood) # => /neighborhoods/lower-east-side
I want something like the following:
neighborhood_url(city, neighborhood) # => /neighborhoods/manhattan/lower-east-side
What would be the easiest way to do this without using nested routes and without breaking Rails REST conventions?
<form enctype="multipart/form-data" method="post" action="mailto:[email protected]" accept-charset="UTF-8">
Is there a problem if mails are sent this way .. i wanna avoid using PHP codes..
assuming i create a method which is passed an object, and that method would perform an action depending on the object passed. how should i identify the object?
i thought of using the class name to identify the object, but may be impractical since i could easily change the class name of objects, and generate headaches during future development. am i right?
Hello
I'm trying to be able to check if a selector have a certain sets of classes.
.hasClass() can only check if the selector has one class. And the .is() selector can look for multiple classes but will return true if the selector have at least one of the classes.
But I wan't to achieve a way to check if a selector have both of the classes, and only if it has both of the classes do action.
Any pointers?
Hi, I need replace the same value for variables {place} and {other_place} in the record op.
#op{
action = [walk, from, {place}, to, {other_place}],
preconds = [[at, {place}, me], [on, floor, me],
[other_place, {place}, {other_place}]],
add_list = [[at, {other_place}, me]],
del_list = [[at, {place}, me]]
}
But erlang don´t share variables. Is there any data type for that?
After the following comment on my last question, I'm thinking about upgrading my RAM:
I got a 160 GB Scorpio Blue a couple
months ago for my 1501. It's nice.
That + 2 GB Crucial RAM have rather
revived my notebook (meaning a very
nice speed and storage boost). I was
outgrowing it... – Nathaniel
What would be the best choice to add more RAM? I've already got 2 GB, but I'm not sure what their speed is. What are the size, type and speed limitations for RAM on my particular laptop?
I use a lot word with in outline view.
In that view it is not possible to see images (while it was possible in 2007).
When I paste an image in structure view it automatically changes the view to Print Preview.
Is this a limitation introduced in 2010?
If not how to get rid of it? I tried to read all the options, but I didn't find a matching checkbox.
NOTE FOR BOUNTY:
I started a bounty because this problem is really annoying for me. Please read the existing answer(s) and comment(s) before answering. Thanks.
I somehow cannot achieve that the a-tag looses its default action when clicking it:
<a href="#" class="button dismiss">dismiss</a>
$(document).ready(function() {
$('.dismiss').click(function(e) {
e.preventDefault();
$('#output').empty();
$('#MyUploadForm .button').show();
});
});
When I click the button, the browser window scrolls to the top. What is wrong here?