I'm upgrading a rails app 2.1 to 2.3.5.
After upgrading i got the error in the views
undefined method `relative_url_root' for #<ActionController>
any suggestions??
Can I copy only the error message from Eclipse Problems with instead of this entire message:
Severity and Description Path Resource Location Creation Time Id
1120: Access of undefined property sort. clientApp/src Filters.mxml line 36 1270460218964 798
thanks
Adding a validator to my form:
jQuery.validator.addMethod('whatever', function(val, el) {
// whatever goes here
}, 'A maximum of ' + $('#my_id_here').val() + ' categories can be selected.');
This doesn't fly. I always get undefined. Is this a good, simple way to do this?
Thanks
I'm using jquery 1.3 and is trying to duplicate the 1.4 .has functionality.
I need to check if the .page element contains the image, and if it doesn't, append it.
Is it something like:
var imageid = thirdimage;
if ($('#page:has(#'+imageid+')') === undefined) {
$('#page').append($('#'+imageid));
}
Thanks.
ie6 isn't playing nice with my jquery snippet, why is this throwing a syntax error in IE6
if(typeof isIE6 !="undefined"){
$("#dropdown-list li").hover(
function(){ $(this).addClass("hover"); },
function(){ $(this).removeClass("hover"); },
);
};
hi every one, this may be a basic thing, but i couldn't find an answer by serching internet.
I have created a simple button - Istance name = "btnsample"
and there are two layers
layer 0- button design with rollovers -
layer 1- dynamic text field - instance name = "txtbtnlabel"
btnsample.txtbtnlabel.text = "new button label;
but it's giving followin error :-119:Access of possible undefined propety txtbtnlabel through a reference with static type flash.display:simpleButton.
how to solve this problem?
Hi everyone im new to a PHP framework codeIgniter, I am going over the user guide iv ran in to a problem, I am on the part where you load helper file but for some reason my code just isnt working I keep getting this error:
Fatal error: Call to undefined function anchor() in /home/fresherd/public_html/CI/system/application/views/blogview.php on line 17
now im not 100% sure that it is loading the helper file this could be causing the but I am not sure how to detect the file has been loaded
any advice will help many thanks, Alan
For some reason, my project won't compile when I try to create a wstringstream:
std::wstringstream stringstream;
This causes error C2079:
'stringstream' uses undefined class
'std::basic_stringstream<_Elem,
_Traits, _Alloc with [_Elem=wchar_t, _Traits=std::char_traits, _Alloc=std::allocator'
What am I doing wrong?
Event.DISPLAYING
Why this event wont work when i try to compile the flashe (CTRL+ENTER)
Flash gives me error
1119: Access of possibly undefined property DISPLAYING through a reference with static type Class.
Hi so say I have this code:
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle: @"Yay"
message: msg
delegate: self
cancelButtonTitle: @"Proceed..."
otherButtonTitles: @"1", @"2", nil];
How do I control the other buttons "1" and "2"? (Suppose all other necessary code is in place, such as the undefined variable msg)
Thanks!
i am going mad with this problem now - if u goto http://talll.com and start clicking around on the menu items like news, economics etc., u will find that the page title says "undefined" - i just want to set the page title to some value thats all - HELPPPPPP!!!
I want to rename a table... (any table.)
I tried this line of code:
ActiveRecord::ConnectionAdapters::SchemaStatements.rename_table(old_name, new_name)
Here's the weird thing. I know I got it working the first time, but now I get this error: undefined method `rename_table' for ActiveRecord::ConnectionAdapters::SchemaStatements:Module
Was there something I need to set? Or am I going blind here..
Thanks!
Hi!
I'm writing a static page controller.
I get the menuname in the routes.rb and it's call the static controller show method.
match '/:menuname' = 'static#show'
And static_controller.rb:
@static=Staticpage.where("menuname =
?", params[:menuname])
But if I want print @static.title in the view, I get this error:
undefined method `title' for #
Whats wrong?
the SQL query looks good:
SELECT staticpages.* FROM staticpages WHERE (menuname = 'asd')
Hi All,
I am using <script> inside the body tag.
<script type="text/javascript" language="javascript">
$('#audioVolume').text($('#audioVolume').text(Math.round((document.mediaPlayer.Volume + 2000) / 10) + "%"));
</script>
Error: Microsoft JScript runtime error: 'undefined' is null or not an object.
Need: I want to access the html elements in <script inside the body tag.
The following function doesn't work for some reason. Can someone see what the problem is?
function checkMaxLen(txt, maxLen) {
var actualLen = txt.value.length;
var remain = maxLen - actualLen;
document.getElementById('remainChar').Value = remain;
}
<input type="text" id="remainChar" runat="server" value="500"/>
Whenever I try to run the function, I get this error:
Microsoft JScript runtime error: Unable to set value of the property 'Value': object is null or undefined
This is probably a really simple question, but how do I go about getting the right offset of an element in jQuery?
I can do:
$("#whatever").offset().left;
and it is valid.
But it seems that:
$("#whatever").offset().right
is undefined.
So how does one accomplish this in jQuery?
Thanks!!
I'm trying to make has_many relation with dynamic class_name attribute
class Category < ActiveRecord::Base
has_many :ads, :class_name => ( lambda { return self.item_type } )
end
or
class Category < ActiveRecord::Base
has_many :ads, :class_name => self.item_type
end
But i got errors:
can't convert Proc into String
or
undefined method `item_type' for #<Class:0xb62c6c88>
Thank you for any help!
There is jquery on the page my script is trying to access, and the code I am trying to execute runs fine in console.
However, when I use chrome.tabs.executeScript on that single tab, it says that $ is undefined.
How can I fix this?
Thanks for the help!
In my ruby on rails project
in model, I have some of definition.
class PlaySport < ActiveRecord::Base
belongs_to :user
belongs_to :sport
def self.getLevel
end
def self.check_play_sport(cuser_id,sport_id)
end
def current_playing_sport
end
def all_played_sports
end
end
I catch for this relation like this
current_user.play_sports.current_playing_sport
But I get the undefined method error "current_playing_sports"
What is wrong
Activerecord seems to be peeking at my sql and getting it wrong. I am finding that this:
sql = "
select etn.*
from edittree_name etn where id = #{id}"
Name.find_by_sql(sql)
works, but this:
sql = "
with pp as ( select * from dual)
select etn.*
from edittree_name etn where id = #{id}"
Name.find_by_sql(sql)
Gives me a "undefined method `each' for 1:Fixnum".
Any clues? Is there a "find_by_raw_sql (and don't try to understand it yourself)" method?
Hi
I am trying to add a filter to a controller that is based on a certain role (using role_requirement) and then on the company_id that each user has.
So basically I need something like this:
require_role "company" ** This is working fine
before_filter :company_required
def company_required
unless current_user.company_id == Company.find(params[:id])
end
end
The error I am receiving
undefined method `company_id' for nil:NilClass
I would appreciate any guidance. Thanks
I have a initApp.as which instantiates a class which needs to access the "currentState" property and the States array as well. However we cannot get this to work as we cannot see how we can access this information.
Within initApp.as currentState is accessed via "this.currentState". This does not work in the class which is instatiated within initApp.as. The following error is thrown:
"Access of undefined property currentState."
Anyone know how this can be solved?