I'm using twitter bootstrap in my application. i gave e.preventDefault for link button in $(document).reday(), but it is not working.
Here is my code:
Master page:
<a id="lnkLogout" href="javascript:void(0);" onclick="PageLogout();"><i class="icon-off">
</i>Logout</a>
<script type="text/javascript" language="javascript">
$(document).ready(function () {
$('#lnkLogout').click(function (e) { e.preventDefault(); });
});
function PageLogout() {
//Code for logout from the application....
}
</script>
SampleDefaultPage.aspx :
<div class="row-fluid">
<div class="form-horizontal">
<h4 class="header blue bolder smaller">
Contact</h4>
<div class="control-group">
<label for="form-field-email" class="control-label">
Email</label>
<div class="controls">
<input type="text" style="width:200px;" data-val="true" data-val-required="Mobile Number is required." id="txtEmail">
<div class="space-3">
</div>
<span data-valmsg-replace="true" data-valmsg-for="txtEmail" class="field-validation-valid text-warning red"></span>
</div>
</div>
<div class="control-group">
<label for="form-field-website" class="control-label">
Phone Number</label>
<div class="controls">
<input type="text" style="width:200px;" id="txtPhno">
</div>
</div>
</div>
I have given txtEmail as mandatory field. if i left that field blank and click on Logout button in Master page, it says txtEmail is required. i dint do any validation in Logout onclick event. I have given preventDefault for Logout link. But still facing an issue. I should be able to logout even though txtEmail is left blank.
Thank you all in advance for your response.
Using HttpClient 4.0, Im having an issue where the response I get from the ResponseHandler is only about half of what the actual page content should be (~61k bytes in the string vs ~125k in the page returned to a browser). I cant seem to find any place where there might be some sort of limit that would limit this. Any ideas?
Note I am not asking for which is the "best" IDE for PHP or anything subjective like that. I want to know which is the most widely used backed by some sort of statistic (something like the W3's stats for browser usage) but for IDE usage amongst PHP developers.
Hi,
I'd like to stop IE8 from sharing my sessions in one of two ways (or both if possible):
Through configuring the browser to always do this (so I can force my users to configure their browsers in this way).
Through code in my web application.
Thanks.
What is the jQuery alternative to the following JavaScript code?
var xmlobject = (new DOMParser()).parseFromString(xmlstring, "text/xml");
I believe a jQuery alternative would be more cross-browser compatible?
hi,
what's the best way to customize html-css tooltips ? (I mean an easy cross-browser solution).
I need to reduce the fade-in delay and change the style. (also, could you suggest a good jQuery plug-in for it ?
thanks
There is something in my mind:
In a web page,there are lots of things we can see from our browser.One of them is text.
Now i have some patterns,"abc","hello",or some other strings.In the text, i want to find all the patterns and change the color or background-color of them.
Like this:
text: what a wonderful day! pattern: "a","day"
resulet: what a wonderful day!
How can solve this whit Javascript?
i have a table of php with while loop to show the records
i added a jquery hover to do that : if hovered it show a message in same row
but the problem is : if hover it show a message in all rows
here is css:
<style>
.tansa{
position: absolute;
margin-right: -60px;
margin-top:-25px;
background: #CBDFF3; border: 1px solid #4081C3; font-size: 0.88em;
padding: 2px 7px; display: inline-block;
border-radius: 8px; -moz-border-radius: 8px; -webkit-border-radius: 8px;
line-height: 1.2em;
text-shadow: 0 0 0em #FFF;
overflow: hidden;
text-align: center;
color:black;
display:none;
}
.arrow{
position: relative;
width: 0;
height: 0;
top: -25px;
border-top: 5px solid #000000;
border-right: 5px solid transparent;
border-left: 5px solid transparent;
display:none;
}
</style>
here is my php :
<table><tr>row</tr>
<?php
$results = mysql_query("select * from MyTable");
while{$r = mysql_fetch_array($results)){
echo "<tr><td>Row : <img src='img/tans.png' width='24' height='24' class='tansef' /><span class='tansa' >the message</span><div class='arrow'></div></td></tr>";
}
?>
</table>
here is jquery
$(document).ready(function(){
$('.tansef').hover(function(){
var sh = $('.tansa');
var sharrow = $('.arrow');
sh.show();
sharrow.show();
},function(){
var shs = $('.tansa');
var sharrows = $('.arrow');
shs.hide();
sharrows.hide();
});
});
any solution to show the message in each row only
I have an input field whose name is an MD5 string e.g.:
<input type="hidden" name="7815696ecbf1c96e6894b779456d330e" value="1">
Now I understand that having a number as the first letter in an input field name is generally bad practice, but are there any side-effects to this such as a certain browser won't send it in the POST request?
I have a page that scrolls through images, some taller than the others. When a tall image loads it auto-creates a scrollbar in the browser window, causing a width jerk. Is there a way to load a scroll bar regardless of if it is needed, and when a tall image apears it activates itself accordingly, then deactivates its self accordingly when the image changes to a shorter image?
Thank you!
I went to test my page on another browser. On google chrome i can fill out a form, hit back and forward and still have the data there. Now i need to refresh the page so certain data is correct (such as session id if the cookie expires or user logs out before submitting). I refresh and lose all data. Is there some option i can set so all data is kept?
You can do this:
.info
{
padding: 5px ;
}
Or, if you know it will be a div, you can do this
div.info
{
padding: 5px ;
}
So, when there's a nested list.. you can do this..
div.info ul.navbar li.navitem a.sitelink
{
color: #f00;
}
Or you can do this
a.sitelink
{
color: #f00;
}
Readability aside, which is better for the browser to parse/run?
I set a div to height:100px; width:50px, but when the content of the div is changing dynamically, I want to let the height adapt to the change.
What should I do?
I need a way to make sure my script won't block the viewed page,
if the server serving the script is down (port 80 is blocked for some reason).
Currently when I test it and take down the server (Apache), or close the firewall,
I see in the browser that it is trying to load the resource (script in that case), without success for long seconds, until it aborts.
Is there a nice way to get past this issue?
I have some HTML that looks like this,
<div id="mb_contents" style="visibility: visible; opacity: 1; width: 600px; height: 450px;">
I am trying to turn the visibilty to hidden using this js/mootools,
$('mb_overlay').set('styles', {
'visibilty': 'hidden',
});
However nothing seems to be working, am I missing something?
In ASP.NET I frequently use Response.Redirect to redirect the end user to another page on my system. I always set the second parameter to true to immediately end the response.
For the life of me, I can't think of a reason why anybody would ever set that parameter to true. What's the point of continuing generating a page when the end user's browser is just going to be redirected to a different page immediately?
I tried to print background image by enabling browser's 'print background image' option.But it shows me half of the image.What's the problem and how exactly I can solved that?
Thanks.
Would anyone know if it's possible/easy to strip down Eclipse or Netbeans to its bare core (project tree + code window) and run it as an applet in the browser? How-to hints appreciated.
PS: it's for a simple online IDE
As far as Google searches tell me, the maximum allowed number of cookies depends very much on the browser, however I cannot find any recent data as to how much cookies are allowed on modern browsers.
I need to store a somewhat large number of user preferences in cookies (for not-yet-registered users), so what would be the best way of doing that? (Also, those cookies would be accessed both via javascript client-side and php server-side)
I can't for the life of me find out how to get visual studio to keep my source to 100 columns width as part of auto-format.
Ctrl+K+D
Surely this doesn't require an extension? What's the simplest way to set it up?
I'm looking for a remote desktop client that works as a webapp, similar to Citrix or WebEx. Are there any open-source projects that do this? Need to mainly to be able to access Windows machines using a regular browser.
Thanks!
i am using this ternary operator for the display the value but it always says that Input string is not in correct format .
<asp:TextBox ID="txtPerOfBase" runat="server" Style="text-align: right;" Text='<%# decimal.Parse(Eval("CommissionableAmountBase").ToString()) == 0 ? Eval("CommissionablePercentBase","{0:N2}"): Eval("CommissionableAmountBase","{0:N2)")%>'
Width="80px"></asp:TextBox>
similar to to this here...
http://www.shawnolson.net/a/503/altering-css-class-attributes-with-javascript.html
i know i can change each element's style's individually, but i want to change a lot of elements styles at the same time, and the browser seems to struggle over about 40 elements.
thanks :)