It seems that javascript only can ready inline css if i want to check if element is display:hidden getting it with:
el.style.display
But how to check if display:none is placed inside external CSS file?
Im using a couple of JSON calls to render data, etc etc. In order to keep the proper key value, I am storing it in a tag.
I have this in several places in my code, none of which cause an issue like this one is. Here is the jQuery:
The call that "sets" the value:
$("a[id^='planSetupAddNewPlan']").live('click', function() {
var x = $(this).attr('id');
x = x.substring(19);
$("#hidPlanSetupCurrentGroupKey").val(x);
$.getJSON("/GroupSetup/PlanSetupAddNewList", { GroupKey: x }, function(data) {
$("#planSetupAddNew").html('' + data.TableResult + '');
alert('First Inside 2 ' + x);
$.blockUI({ message: $("#planSetupAddNew") });
});
});
The call that "gets" the value:
$("#ddlPlanSetupAddNewProduct").live('change', function() {
var a = $("#hidPlanSetupCurrentGroupKey").val();
var prod = $(this).val();
alert(a);
$.getJSON("/GroupSetup/PlanSetupChangePlanList", { GroupKey: a, Product: prod }, function(data) {
if (data.Message == "Success") {
$("#planSetupAddNewPlan").html('' + data.TableResult + '');
} else if (data.Message == "Error") {
//Do something
}
});
});
Here is the html in question:
<div id="planSetupAddNew" style="display:none; cursor: default;">
<input type="hidden" id="hidPlanSetupCurrentGroupKey" />
<div id="planSetupAddNewData">
</div>
</div>
In the first section, the alert ('First Inside 2 ' + x) returns what I expect (where x = the key value), and if I add a line to display the contents of the hidden field, that works as well:
ie.
var key = $("#hidPlanSetupCurrentGroupKey").val();
alert(key);
In the "alert(a);" call, I am getting "undefined". I have looked at the other code in the same view and it is the same and it works. I must be missing something, or have some sort of mistype that I havent caught.
Just an overview of the controller events:
The first call (/GroupSetup/PlanSetupAddNewList) will return an html string building a "form" for users to enter information into.
The second call (/GroupSetup/PlanSetupChangePlanList) just changes a second dropdown based on the first dropdown selection (overwriting the html in the div).
If you need more info, let me know!
Any thoughts/tips/pointers/suggestions?!?!
Thanks for all your help :)
I'm using Bootstrap-Switch and the documentation says that options can be passed as an object on initialization. enter link description here
And here is a list of options: enter link description here
So my code looks like this:
var options = {
onText: "Yes",
onColor: 'primary',
offColor: 'danger',
offText: "No",
animate: true,
};
$("[name='radioGroup1']").bootstrapSwitch(options);
And it all switch works fine, but none of the defaults are overwritten by the options.
Anybody got any examples of how this might work?
Thanks
The scenario is I want to get the users who has more than 2 photos.
There are two table:
[Users] (UserId, UserName)
[UserPhotos] (PhotoId, PhotoName, UserId) and UserId is a Foreign Key.
A user may have none photo in the [UserPhotos] table.
How to use Linq To Sql to get List who has more than 2 photos?
I have a dict object. I dumped the data using this:
for alldata in data: # print all data to screen
print data[alldata]
Each field had brackets [] and 'None' values for NULLS and date.datetime for date values.
How do I dump this dict to MySQL table? Thank you!
I am using XAMPP on windows vista.
In my development, I have http://127.0.0.1/test_website/
Now I would like get this http://127.0.0.1/test_website/ with php.
I tried something like these, but none of them worked.
echo dirname(__FILE__)
or
echo basename(__FILE__);
etc.
I will appreciate any help.
Thanks in advance.
Unless I'm missing something, it seems that none of the APIs I've looked at will tell you how many objects are in an S3 bucket / folder(prefix). Is there any way to get a count?
When i export WebProject (Struts Portlet) as war from RAD 7.5 it creates war, but that war file does not have my Class files. ie. Action Classes, Actionforms, validations, etc. none of the .java files class added in war. what is the issue. urgent
I have implemented UISegmentedControl in my application. None of the button is selected in normal state. I want to implement button click event when first segment is selected and another event when another button is clicked. Thanks in advance.
How to make this css code cross browser compatible using jquery. this code only works on firefox and IE8. i wan to use in IE6 and 7 also.
ol {list-style-type: none;}
li:before {content: "(" counter(section, lower-alpha) ") ";}
li { counter-increment: section;}
sifr3 text doesn't load many time first time on FF 3.5? I haven't checked on other browser.
If i reload page again then it loads properly.
this is my code
sIFR.replace(futura, {
selector: '#Homepage h1', ratios: [6, 1.24, 9, 1.13, 10, 1.15, 16, 1.09, 21, 1.06, 22, 1.07, 25, 1.04, 26, 1.06, 29, 1.03, 30, 1.05, 31, 1.03, 32, 1.05, 41, 1.04, 58, 1.03, 97, 1.02, 1.01],
wmode: 'transparent',
css: '.sIFR-root { background-color: none; color: #ffffff; }'
});
Im trying to achieve current page highlights on wordpress similar to this site
Alex Soth.
I'm very nearly there with my css.
At present i have current page highlights on pages, ie. home,calendar, projects. However when it come to current page highlights on child pages i have a problem.
the indented child page list appears on hover when selecting a child page, but after page selection the menu reverts back to the standard pages menu with no visible child menus? unlike the link to the Alex Soth site where the extended menu stays and current page is highlighted
I know that the answer will be a simple piece of css involving current_page_item and possible position:relative to obtain the menu staying visible after selection. But i can for the life of me work it out.
Any ideas Ive attached my relivant pieces of css below??
thanks
/* =Link Styles
------------------------------------------------------------------*/
input#submit {
cursor: pointer;
}
input#searchsubmit {
background: url(images/search.png) no-repeat center;
}
input#searchsubmit:hover {
background: url(images/search.png) no-repeat center #3399FF !important;
cursor: pointer;
}
.navigation a:hover, input#submit {
background: #3399FF;
color: #3399FF !important;
}
a {
color: #666;
}
a:hover, a:hover span {
color: #c11501 !important;background-color: #fae100;
}
.entry sup a,
#main_nav .current_page_item a,
#main_nav .current_page_ancestor a
{
color: #666 !important;
}
#main_nav h1.masthead a {
color: #666;
}
#main_nav h1.masthead a:hover {
border-right: none;
}
h2 a, #main_nav a {
color: #3399FF;
}
img a, img a:hover {
text-decoration: none;
}
.post a, .navigation a {
font-weight: bold;
color: #000;
}
.navigation a {
background: #EEE;
color: #666;
font-weight: normal;
padding: 3px 0px;
border-radius: 0px;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
}
.post sup {
font-size: 11px;
color: #aaa;
}
.post sup a {
border: 0;
margin: 0;
font-weight: normal;
font-size: 10px;
}
#supplementary .post_nav ul.about_nav li a, #supplementary .post_nav ul.single_post_meta a, #supplementary ul.contact_key li a {
color: #888888;
border-bottom: 0;
}
/* =Main Menu
------------------------------------------------------------------*/
#main_nav ul.menu li {
position: relative;
}
#main_nav ul.menu li:hover ul.sub-menu,
#main_nav ul.menu li:hover ul.children {
display: block;
}
I'm trying to do a sparse checkout of a folder containing externals, but none of the externals are being checked out. This issue seems to indicate that this behavior may be by design, or at least that it isn't clear what the behavior should be. From my point of view, the obvious behavior is that externals are treated just as any other directory, and checked out following the same sparse checkout rules.
Is there a way to work around this except manually checking out the externals?
why we using double pointer like char **p;
are there any purpose ,if there is please tell me
i read some books but none of them tells purpose(s) of pointer to pointer
if we can write char *p; and char **p;
i think we may write char ***p; or char ****p; am i wrong
Hi. I'm writing a game in C++, and I'm trying to get it to recognize keyboard and mouse events. Google tells me that boost.signal is suitable for event handling, but none of the code samples or tutorials I've found tell me how to associate a keypress or mouseclick with a function. Can anyone shed any light on this?
Hi,
I have created a user control ( custom data grid view control). I have used the code specified at MSDN [site][1]
[1]: http://support.microsoft.com/kb/316574 to set the border style .
I am able to see the selected border style in designer. Like None, FixedSingle or Fixed3D.
But when I set the border style to FixedSingle, the border does not appear at runtime. Do I need to draw it manually in the OnPaint method?
hi,
I don't understand why I have this blue border around the links images in my page.
I've set outline:none border:0 but still it is there (only in Firefox and IE)... it is very strange.
http://www.alimdardesign.com/fabulicious/features.html
Thanks
hi folks,
Am trying to hide a div when the user doesn't click any button on it for 15 seconds.
I know how to hide and display the div by using element.style.display = 'none'; but am not able to understand how to calculate the time after last activity on the div.
Regards,
Snell
Hello, I'm having a problem similar to the one described here (without a resolution):
http://stackoverflow.com/questions/2467745/ie7-float-and-clear-on-the-same-element
The following HTML renders as intended in Firefox but not in (both) IE7 and IE8:
<html>
<head>
<style>
ul {
list-style-type: none;
}
li {
clear: both;
padding: 5px;
}
.left {
clear: left;
float: left;
}
.middle {
clear: none;
float: left;
}
.right {
clear: right;
float: left;
}
</style>
</head>
<body>
<ul>
<li>1</li>
<li class="left">2</li>
<li class="right">3</li>
<li class="left">4</li>
<li class="middle">5</li>
<li class="right">6</li>
<li>7</li>
</ul>
</body>
</html>
This is a form layout, and in Firefox the results appear like:
1
2 3
4 5 6
7
That's what I'm going for. In IE7 and IE8 however, the results are:
1
2 3 5 6
4
7
[Note: I don't want to float anything to the right because I want the fields on my form to left-align correctly, without a giant space in-between the floated fields to account for the parent container's width.]
Apparently I need a full clear, and can probably add an empty list-item element to the list to force clearing, but that seems like a dumb solution and sort of defeats the purpose.
Any ideas? I've spent a few hours reading and trying different options without success.
Hi,
When I use this to write to my app.config file:
Configuration config =ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings["Wachtwoord"].Value = "Test";
config.Save();
ConfigurationManager.RefreshSection("appSettings");
I can read it again. But when i close and restart the program, the value of "Wachtwoord" has changed again to the old value.
Does anybody how I could fix this?
Thanks
I use solr+django-haystack
I set settings.HAYSTACK_INCLUDE_SPELLING = True
and rebuild index
I'm trying to get any suggestion using:
SearchQuerySet().auto_query('tryng ani word
her').spelling_suggestion()
But I always get None
What should I do to get at least one working suggestion ? may be I
need add some configuration into solr config or have some specific
data indexed ?
I'm looking for a good example of reading and writing to the Windows Registry using VB6.
Yes, I know there are lots of mediocre examples. I spent an hour googling and testing. Some were incredibly complex, others had only some of the functions, and almost none of it had been vetted in any way (voted on).
Since Stack Overflow is intended to the canonical location for answers to programming questions, it seems reasonable to post it here.
Is there a .deb for Maven2 on Karmic Koala? I see maven2, but it has 100+MB of dependencies (!). Is there a package that is only mvn and none of those dependencies?
Anybody have problem with their existing app not working in the iPad simulator?
I have a iPhone app which is a navigation-based app with tab bar and multiple tableviews -- and none of the table is showing up.
Any ideas?