Tag | Javascript Posts
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; ...
A JavaScript object can be of great help when you need to pass multiple values to a Modal Window. E.G.
var objArgs = new Object();
objArgs.Value1 = "Value 1";
objArgs.Value2 = 2;
var modalWindowFeatures = 'dialogHeight:600px;dialogWidth:600px;scroll:no;status:no;resizable:no';
url = 'relative/path/to/page';
var returnValue;
returnValue = window.showModalDialog(url,objArgs,modalWindowFeatures );
This demo shows on how to dynamically adding /removing ListItems in the ASP.NET DropDownList control using JavaScript. Here’s the mark up and the JavaScript code block below: <html xmlns="http://www.w3.org/19... <head runat="server"> <title>Dynamic DropDownList</title> <script type="text/javascript" language="javascript"> function AddItemInList() { var list = document.getElementById('Dr... var box = document.getElementById('Te... var newListItem ...
“When checking your page in various browsers, you may find Safari displaying a bright red text color for your page anchors (links), overriding the colors you've specified in your CSS selectors. First, look for a CSS document that may not be uploaded to your server. It will be returning a 404 (page not found) error. The simplest way to do this is to use the Web Developer's Toolbar extension for Firefox (by Chris Pederick) and simply click on the CSS > View CSS menu item. The page that appears will ...
Looking for a simple datepicker that uses AJAX.NET (to avoid full-page postbacks), for your date fields? Look no further! I was on the same "hunt", and ended up writing my own code for it (inspired by other examples/code I was looking at). The code does all the work using ASP:NET, nothing is done using JavaScript. Below is the code for the solution. This could (and should) be made into a UserControl if you need to use in more than one place In the .aspx file, put this: (As you see, I am referencing ...
Check out the 2009 Microsoft SOA & BPM Conference presentation on Microsoft ESB guidance 2.0, Oslo, BAM, REST with WCF, Customers case studies etc... 1. Keynotes, Lunch Sessions and Customer Case Studies 2. Technical Offerings Track 3. Best Practices Track ...
I ran into an issue with my SharePoint Central Administration website recently. This was in a my development Virtual PC, using IE7. I would open the SCAW which appeared to be fine, but some of the functionality wasn’t working. I’d click on certain buttons and nothing would happen. I then noticed that IE was reporting javascript errors. I tried using FireFox. Some of the errors that I saw in IE weren’t in FireFox, but some of SCAW (usually popups) didn’t work. Rather try to figure out what I did (I’m ...
Why did I start a Blog? welcome to my world of blogging, this is my first. Why did I start a Blog? First to express myself and to also contribute to the medium that has support my career (Internet). it is also my goal to achive MVP status soonest. What do I plan to cover here? Almost everything related to the technology and developer community. I will be writing .NET code snippets, talk about javascript, fiddle with jQuery, cover new product releases, write about new technologies as I encounter them, ...
I thought it was about time I imparted some actual information, instead of just reporting on where I've been, so here goes... Suggestion #1: Quicker access to the Bash History with Ctrl+R Find your self constantly hitting up and down buttons when logged into a UNIX terminal, trying to locate the last command entered in the history for rebooting the cable modem, backing up the internet or shutting down the HAL 9000? There are much quicker ways to do it! My personal favorite is hit Ctrl + R, then type ...
This morning I received an email that posed a question so interesting that I thought I would blog about the answer. The question was, essentially, how can we invoke a partial update (using ASP.NET AJAX triggers), from an on(up) button handler in Flash? There are a few different ways to approach this problem. I believe the method I’m going to write out here is what I like to call the “path of least resistance” – it’ll get you there quickly. However, it will create some interdependencies among your ...
Here's what's happening: Attendees: 428 Sessions: 73 Speakers: 49 Tracks: 15 Sessions: ASP.NET Make your Data Dance with ASP.NET Dynamic Databy Shawn Weisfeld + Show Description ASP.NET Dynamic Data is a framework that lets you create data-driven ASP.NET Web applications easily. It does this by automatically discovering data-model metadata at run time and deriving UI behavior from it. A scaffolding framework provides a functional Web site for viewing and editing data. You can easily customize the ...
Stephanie Grima’s Curriculum Vitae Introduction As a person, I consider myself as capable to work alone and with a team easily. I am very hard working, and do whatever I set my mind to doing. I am currently at MCAST ICT, during my last year of my studies reading my Higher National Diploma. I also hold an A-Level in IT as well as a National Diploma in Computing. I see myself working in IT as a web developer or software programmer while I continue furthering my knowledge by doing exams such as MCTS ...
I did something stupid against all my beliefs and should have never done it. I tried to deploy something on Friday. It was the dumbest mistake. First off I had no idea what type of master pages were in the environment. I assumed there was only one master page in the entire environment and I used the most disgustingly wrong program for a developer, SharePoint Designer. I pasted in this fix for AJAX Update Panels with FireFox (<script type='text/javascript'>_... = document.forms[0].action; ...
I think that Microsoft is missing a large opportunity with the Microsoft Office product. I’ve been thinking about this for some time now. To me, it has been evolving in the wrong manner over these last few releases and it has bothered me greatly. You might be saying, “what is Bill talking about here, they just did a major and well-received upgrade to Microsoft Office with the Office 2007 release!”. I do have to say that you are right in that regard – but what I am talking about is Microsoft Office ...
I gave another lightening talk Lightening Talk, this time at ColArc: No video footage to got with it this time, I left my camera behind, sorry! I have to admit, I struggled a little delivering this one, probably because its a subject I'm less fluent in, and it was a bit longer than my last presentation. But that said, it was good practice for me, and I think I got the subject matter across, just about ...
Today I experienced what appears to be a small WSSF gotcha :) If you have a Data Contract which has a Data Member called Value (for example contract is ParameterInfo, so having a member called Value might make sense), the code that gets generated by WSSF looks like so: Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; ...
I've been working on creating an xsl stylesheet from an xml document transformed by a base xsl stylesheet. The problem I was having is that the xsl elements I wanted to output were causing validation errors in VS2005. Of course trying to googling creating xsl from xsl resulted in nothing that approached the problem. I finally stumbled on the solution. Use the xsl:namespace-alias element to convert the namespace in the stylesheet into another alias in the transform. The microsft XSLT documentation ...
The answer is not so easy. But here goes my opinion… Learn C C is your closer to the metal programming language. You must learn C. Why? Because we have reached the point where learning assembly is not particularly of any practical use, although you would gain insight into the way computers work (and what languages boil down to). The C language will allow you to program against low level APIs, such as the operating system. Write embedded software for devices, write drivers, and eventually understand ...
This is on the request of some of my readers to show how effective Asp.net menu control is by using CSS Control Adapter. Most of the folks either have no idea of what CSS Adapter is or have some problem in integrating that with their applications. So, In this post I will brief you guys how can we use CSS Adapter to format the design of Asp.net Menu Control. Before we start, let me dig out why would somebody use CSS Adapter and what does that do ? Have you ever notice by viewing the source of your ...
The Problem If you search for "Right Click Silverlight 2" in Google, you will get several hits. There are several ways to achieve this functionality, and they all have two things in common that I object to: 1. They use Javascript to send a message to the Silverlight application. While there is no way (that I know of) around this, requiring the hosting HTML to include this code is what I object to. Moving the app to a new page requires the same hookups that the developer may or may not remember to ...
This example shows how to select ListItems in the ListBox based from the TextBox values using JavaScript. Here’s the code block below. <html xmlns="http://www.w3.org/19... > <head id="Head1" runat="server"> <title>Demo</title... </head> <script type="text/javascript" language="javascript"> function SearchList() { var l = document.getElementById('&l... ListBox1.ClientID %>'); var tb = document.getElementById('&l... TextBox1.ClientID %>'); if(tb.value ...
One of the biggest problems with using a WCF service in Silverlight is resolving the service itself in the correct place at all times. When moving code from your dev machine to staging and to production you may run in to issues. Using SSL and not using SSL can also be issues. So we came up with this simple solution to a complex problem. Credit goes to Jeff Wolfer on our team for creating this. Here is how the solution is actually used. It uses generics: private SLGlobalCustomer.SLGlobalCu... ...
I have been working with Silverlight 2 and its integration into SharePoint and I am a convert! I had thought that this was an application that would change the face of the internet! I just kind of browsed it while it was in its 1.0 stage and now I am a confirmed Silverlight advocate! I had a web part that I built that was an ad rotator with lost of business process on the server. You know the kind of rules: 1. GoLiveDate 2. ExpireDate 3. SortOrder 4. LinkURL 5. Approved! 6. More! Not hard to do on ...
This demo describes how to implement multiple delete in GridView using CheckBox control and display a confirmation message upon deletion. Assuming that we have this GridView column mark up below <Columns> <asp:TemplateField> <HeaderTemplate> <asp:Button ID="ButtonDelete" runat="server" Text="Delete" /> </HeaderTemplate> <ItemTemplate> <asp:CheckBox ID="CheckBox1" runat="server" /> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="CustomerID" ...
This demo describes the different approach to display a confirmation message when deleting a row in GridView and pass the id of the item to the confirmation message. Confirmation means a user is asked first if he/she wanted to delete a record by choosing an option (OK and CANCEL). In this demo, we use the JavaScript confirm function for displaying the confirmation message. Now let’s create our JavaScript confirm function. To do this switch to ASPX source and add the following code block within the ...
This week we switched to using Declude Interceptor as our anti-spam solution. We looked at 3rd party sites like postini and others which are actually very inexpensive at a few bucks a user per year. But because have thousands of users the costs were too high. So I found that Declude's new Interceptor product was exactly what we needed. It runs as an anti-spam inbound gateway server in our data center that filters the spam before it gets to our mail servers. It was much, much cheaper than Barracuda, ...
Check this site, http://pikdev.free.fr/ for PIC development in Linux and then check this one Piklab on your Linux Package install manager Well, I am trying to find an IDE for PIC Microchip on Linux. Specially for PIC18. It is nice to be able not to depend on MS Windows anymore and just use my Linux OS full time. Now, Piklab seams to contain all the parts/options I am looking for except that it needs a compiler to use! What? so it is just an Editor that I can write my code in and then I need to send ...
This example simulates on how to display a loading message with gif image when the page loads in ASP.NET. <html xmlns="http://www.w3.org/19... ><head id="Head1" runat="server"> <title>Load Wait Message Demo</title></head... type="text/javascript" language="javascript"> if(document.getElementById){ // IE 5 and up, FF var upLevel = true; }else if(document.layers) { // Netscape 4 var ns4 = true; } elseif(document.all) { //IE 4 var ie4 = true; } function ...
This simple JavaScript function validates the TextBox input that allows only numeric values to be entered. <script type ="text/javascript" language="javascript" > function ValidateText(i) { if(i.value.length>0) { i.value = i.value.replace(/[^\d]+/g, ''); } } </script> In your textbox add the onkeyup event or onkeypress. <asp:TextBox ID="TextBox1" runat="server" OnTextChanged="TextBox1_Tex... onkeyup = "javascript:ValidateText(th... Note: If you wan't ...
This example shows how to limit the number of characters to be typed into the TextBox using JavaScript and display the remaining characters in a Label Control. <script type="text/javascript" language="javascript"> function validatelimit(obj, maxchar) { if(this.id) obj = this; var remaningChar = maxchar - obj.value.length; document.getElementById('&l... Label1.ClientID %>').innerHTML = remaningChar; if( remaningChar <= 0) { obj.value = obj.value.substring(maxchar... alert('Character ...
Having a marquee on a page is not a big deal but what if somebody wants user to adjust the speed of the moving text. So the idea is we have many marquee in one page and we want to adjust their speed using two javascript Buttons called “Speed Up” and “Speed Down” The logic is very simple, the marquee tags which you want to control with the help of buttons give them name in my case it is “Scrollers” (Remember it is name not id, so you can give same name to as many controls). Now call the following ...
According to Joe Brinkman's
blog today, look for Monday, February 23rd for the release of DotNetNuke 5.0.1. A number of fixes have been made to the product.
Joe also announced
that the new roadmap for our 2009 development which will be updating shortly on the DotNetNuke.com website.
I just started using AllWebMenus Pro version 5.1. Trying to figure out how to generate the Menu execlusivly in code was a challange because in the documentation they had refrences to styles that I could not find in the generated Java Script from their tool. The Short and Sweet Blog version: The default menu.js will not contain any styles you define if you dont create a menu item prior to generating the menu with the AllWebMenus Tool. The Tool doesnot generate these styles even so the second option ...
You know you are a geek when things like this seem of any importance. It may comfort you to know that there are others who are excited about the buzz. It may disturb you. Make of it what you will: On Friday, February 13th 23:31:30 UTC 2009 the time_t structure would contain the the number 1234567890 The time_t is measures seconds past midnight of January 1 1970 (see Unix Epoc, POSIX time etc) You might celebrate UTC time - those of you not stuck in traffic in New York or at work in California. Or ...
Last night, the Ann Arbor .Net Developers group held annual elections, and made new director appointments. The new leadership team is: President: Jay Harris Vice President: Scott Zischerk Secretary: Darrell Hawley Treasurer: Eric Bratton Director of Programming: Mike Woelmer Director of Membership: Dennis Burton Director of Sponsorship: Brian Genisio (me!) With my new role, I will be soliciting companies for sponsorship. This will require me to get out there a bit more than I am used to, which is ...
More than a year ago I wrote a post Code Render Blocks does not work inside HEAD server controls about the problem, that prevented me to update URL of CSS file, when version of assembly incremented. Now I've created a function /// <summary> /// /// </summary> /// <param name="page"></param> /// <param name="cssFileHref">e.g. "~/StyleSheet.css"</para... /// <returns></returns... public static HtmlLink AddStyleSheetLink(this Page page, string cssFileHref) ...
I stumbled upon this site that is pretty interesting. It shows some detail that I was looking for on how sites market keywords and some possible spending trends. It is somewhat accurate. I was able to benchmark the site against a few of the clients that I have done work with. (Keyword spy) http://www.keywordspy.com/o... I put a link to look at my blog. You will notice that I don't pay for any keywords for this blog (ha ha), that is because I don't make money off this blog. ...
Today I was faced with an unusual task: I needed to find a way to nullify an element's style attribute, i.e.: <br style="clear: both"> The style's clear:both was causing some unnecessary whitespace. I couldn't change the style attribute directly because it was on a Master page that I didn't have the permission to modify. I am not sure if there is a way to do this using CSS alone (element style takes precedence over any css class). My Solution Step 1: Hide the offending <br> element // ...
Anne Thomas Manes has an interesting post stated that SOA is dead. Despite the dramatic eye-catching writing style, she does get a little bite on the issue. "Successful SOA (i.e., application re-architecture) requires disruption to the status quo. SOA is not simply a matter of deploying new technology and building service interfaces to existing applications; it requires redesign of the application portfolio. And it requires a massive shift in the way IT operates. Does this sound familiar to you? ...
This is the most demanded scenario for the one who are using Asp.net AJAX Control Toolkit, I mean I have seen most of the people asking for this feature on asp.net forum. Unfortunately, we have no such functionality provided in Modal Popup because the control get rendered once the page is loaded and the Modal Popup is just a JavaScript which work is just to display a div which is hidden. Here is a little work around for those who wants to pass parameter to user control using Modal Popup. Basically, ...
A couple of weeks back I attended a session on Unobtrusive JavaScript (UJS) and jQuery by John Teague. This was probably the biggest thing I took from the Houston TechFest. Recently, I found the opportunity to put my new knowledge to good use. I haven't reach the unobtrusive part of John's presentation, but jQuery is my first step. Documentation I found the jQuery API documentation to be invaluable. At first, as a reference, it was a little difficult to find what I need. For example the "val()" function. ...
I have been allocated an account in Windows Azure Developer Portal for CTP - and very excited. Now i'm looking into the corridors of Windows Azures and downloading the SDKs. Am looking at these sites Deploying a Servce on Windows Azure http://msdn.microsoft.com/e... Windows Azure SDK http://www.microsoft.com/do... Microsoft SQL Data Services SDK http://go.microsoft.com/fwl... Using ...
In the UK I am the technical editor for the MSDN Flash. This weeks edition was a special focused on free software. I gathered together some of the best downloads based on recommendations from friends, colleagues and customers (which in case you were wondering is an overlapping group of individuals) plus a few of my personal favourites. I have tried to get something for everyone. From fairly generic utilities such as Free Download Manager and Unlocker, specialist tools such as SketchPath for XPath ...
Today, while creating some javascript popup I had a condition in which I place onclick function on body tag. I had an other button which also implement onclick. So the code looks like as follows 1: <body onclick="disappearPopup()"> 2: <a href="#" onclick="ShowPopup()">Show me</a> 3: </body> So, what happen is whenever link is click the body clicked even called automatically. Practically speaking, we need to cancel the body onclick even each time we click the link click. And ...
Today begins the Get Fit in February Challenge from Facebook. If you haven't already signed up - check it out while the month is still young and compete against over 100 other geeks for an MSDN subscription and other prizes! :) Here's my first blog entry concerning the challenge. I'm starting the challenge at 210 lbs...yeah I ended up putting on some of what I lost last year after giving up soda completely. I was down to 195 for a while but I guess the holidays and then not really paying attention ...
My current project involves integrating legacy Prototype code with jQuery. Normally the solution would be to just change all the $(object) references to jQuery(object). However, one of the constraints was I couldn't modify any of the jQuery code, and Prototype does NOT give you any way to rename the $ variable. I discovered this hack while trying to find a way around this: <script type="text/javascript" src="jquery-1.2.3.min.js"&g... <script type="text/javascript" src="prototype.js"></... ...
The following is a simple checklist you can use when building web applications. Much of this still applies to other technologies and can easily be extended. I try not to get too specific on technology or methodology, but it is definitely leaning toward ASP.NET. If you can think of something I am missing or disagree, please leave a comment. Detailed information follows the checklist. How much of the checklist you follow will depend on the project. If its just a hobby site, you may skip items like ...
I just got back from a business trip and sitting there on the counter was a copy of my latest book from Wrox! This book (my 20th) is titled Professional ASP.NET 3.5 AJAX. This was a fun book and I wrote this with some great co-authors including Matt Gibbs, Dan Wahlin, and Dave Reed. Amazon says that the book will be available on February 3rd (not too far away). Here is some of the introduction I wrote for the book: ----------------------------- ASP.NET revolutionized Web application development. ...
I realized after a discussion at work today that I don't view news and information sites in a browser that often. I find that I use an RSS reader more than actually going to the sites. I did not think about this too much until a co-worker was discussing Twitter as a service does not get that much direct traffic (people going to their site) most twitter users use a 3rd party software or tool to tweet or follow people. I realized how true this was when I realized that I had not gone to www.twitter.com ...