Monthly Archives: March 2010

Web Form – Highlighting the Current Field

So I recently had to put together a form at work that people will be using to interface with our Mortgage System. One of the suggestions I came up with during the meeting (yay for me creating more work for myself?), was to highlight the current field that you were on. This adds a level of YOU ARE HERE as well as provides a reference marker in case someone has to walk away for a second, to come back and be like … “where was I?”.

So without further adieu, I provide to you the code that I used to fashion this together.

Javascript

window.onload = function() {

var ele = document.myForm.elements;

for (var i = 0; i < ele.length; i++) {

element = ele[i];

if (element.type) {

switch (element.type) {

case ‘checkbox’:

case ‘radio’:

case ‘password’:

case ‘text’:

case ‘textarea’:

case ‘select-one’:

case ‘select-multiple’:

element.onmousedown = function() { this.className = ‘clrFocus’; }

element.onfocus = function() { this.className = ‘clrFocus’; }

element.onblur = function() { this.className = ‘clrBlur’; }

}

}

}

}

CSS

.clrFocus { background-color: #FFFF00; }

.clrBlur { background-color: #FFFFFF; }

As you can see above, I am essentially setting the class of the object via javascript upon both a focus shift (Either by tab or mouse click) as well as by mousedown (This was put into place since if you do not have this, you will be forced to click twice on dropdown boxes.  Once for the focus, twice for the list.  Don’t believe me?  Try it out!

Initial Research Sources:

http://www.codeproject.com/KB/scripting/focusBGColor.aspx – I used the case functionality and element loop out of the bottom of this one.  I initially tried to just use this; however, it didn’t work properly because of the mousedown issue identified above.  I did try to add a listener for mousedown; but….this didn’t work so well as the boxes would stay yellow.  For whatever reason it wasn’t triggering the onblur.

http://www.webdeveloper.com/forum/archive/index.php/t-151530.html – I got the idea to use CSS classes instead of the listener from the link above.

Share

Killing your will to live one group policy object at a time

So about a month ago we rolled out our SharePoint Intranet site. We forced the homepage for all employees to this site, and for many users it was upsetting as we removed custom home pages/tabs. We’ve gotten some complaints about it, but I don’t think anything takes the cake like this one does.

Being stuck on our slow loading intranet *every time* I open ie is destroying my will to live. Who do I have to talk to in order to have this policy rectified? Please let me know. I’m losing minutes of loading/day… which doesn’t seem like a lot, but is slowly degrading my working environment. Thanks.

I wonder if I should report this to HR? I am sincerely worried about this individual and what harm they may cause to themselves or co-workers around them. hmm… >:3

Share

Full Height Web Part

http://blogs.msdn.com/malag/archive/2008/09/15/story-of-a-mischievous-page-viewer-web-part.aspx

This will run a javascript in a separate but hidden content editor.  It will force all IFRAMES on the page to be 100% height, perfect for single page web parts (forms and such).

Note: This only works in IE (at least the script provided).  Then again, if you’re using SharePoint and anything other than IE you have a serious identity crisis going on :)

Share

Windows 7 Network Dropping Upon Large File Transfers

I’d like to share an issue that I’ve had for a while and just recently decided to tackle it. Ever since I’ve installed Windows 7 on this computer, I have had issues where large file transfers will break the network, causing both the host and client (whomever is trying to transfer the data) to lose connection to it. It seems that the gateway was breaking or something along those lines (At least according to the Network Diagnostics). There really wasn’t any clear cut explanation of why this was happening, and I never had to do large file transfers across the network so I ignored it. As of late, my roomate attempted to stream some videos from my computer and of course, this issue happened again. However, upon setting up my PS3 Media Server, I had to make a stand…and get this shit fixed.

My current motherboard is an ASUS P5B-E, with an Integrated Atheros L1 Gigabit Ethernet Controller. I finally did some heavy searching and here is what I found.

For those running an NVIDIA chipset (NFORCE) your Ethernet card is different. I suggest you look at this link as it gives an explanation and way to potentially fix the issue.

Here is the blurb about where to fix from the link above.

1. right click computer
2. manage
3. Device manager – double click
4. network adapters
5. Nvidia nForce 10/100/1000 Mbps Ethernet (i am using nforce 15.51 Ethernet drivers atm) right click
6. Properties for the adapter that you are using be it one or two
7. Advanced
8. Receive Side Scaling – (disabled!!!!!! not enabled) this is most important.

For anyone running an ASUS board with Atheros L1 Gigabit Ethernet Controller, I suggest you look here.

This is what was said in the link above, and I can confirm that this fix did work for me as well.

I also got this problem: When transfering large amounts of data over the network the network card would disconnect, requiring a “disable/enable” to fix.

I am running Windows 7 64 bit RTM and the latest Atheros driver (2.4.7.27).

To resolve, I went into the driver properties, clicked Advanced / Task Offload, and I turned this feature off.

Now, the driver works fine for me

Huzzah, I can now finally stream videos and do some large file transfers.

Share

Using PDF Printers for the Good of Mankind!

I would like to vent a bit of my frustration in regards to these wonderful things known as PDF printers. Back whilst my ignorance got the better of me (which is like 15 minutes ago) and I thought that these things were the end-all-be-all solution to creating PDF documents from your Word/Excel/HTML/etc. applications, I have come to an abrupt halt on why these aren’t as awesome as I thought they were.

Back many years ago I ran across two very wonderful and simple tools: CutePDF Writer and BullZip PDF Printer. Both of these, among many others, PrimoPDF, PDFill, etc. are all tools for creating PDFs from various other sources.

Getting back on why these aren’t the best, and why they have a special place, one word needs to be said: Hyperlinks. Without getting into a whole explanation of how printing actually works on a computer, I will come up with a simple flow which honestly I never really thought about until I had to troubleshoot why this person’s hyperlinks weren’t creating properly in the PDF. Read more »

Share

How to shit a brick, or at least a load of cash.

Okay, so I’m planning on finally using this i7 that I got a few months back to use! For those who don’t know, I purchased my i7 920 (yes, it’s d0 stepping, I’m going to overclock the pants off this thing) for $200.00 from Micro Center.

Here is the estimated cost for rig.

Estimated Cost: $2,654.85
Actual Cost (Purchased): $2,104.95

So I just did a quick estimate of how much my water cool system is going to cost for my new rig.

Customized case designed for water cooling: $379.99
Dual 480mm Radiator: $265.90 (132.95 x 2)
Beast of a pump (600 GPH): $158.22
CPU Cooling Block: $59.95
GPU Cooling Block: $124.95
Northbridge Block: $42.95
Southbridge Block: $38.50
Ram Coolers: $179.94 (29.99 x 6)
Tubing/Accessories/Fittings/Mounting: ~50.00

mmmmmmmmmmmmmmmmmmmmmmmmm

Total: $1,300.40

I think I just cried a little.

This is a preliminary listing, these may change over time as I do more research and fine tune my a) wants/needs and b) budget.

Share

Opening Document Library PDF Items in WSS 3 / MOSS 2007 in a New Window

This will force any documents in a document library to open up in a new window.

http://digantakumar.com/2009/09/01/opening-document-library-pdf-items-in-moss-2007-in-a-new-window

Share

No Sleep for the PS3!

So it’s fair to say I won’t be getting any sleep tonight.  Preorders for Final Fantasy XIII is released at midnight tonight.  Therefore, it’s an all-nighter!  Time for some Monster Drinks, w00t.

http://www.gamestop.com/Catalog/ProductDetails.aspx?sku=270434

rawr~
(c o.o )c

Share

How to Reset Permission Driven Quick Launch Links

For now I’m just going to post my comments in, I’ll form this up later to explain what I did.
Tables
NavNodes (location of the quicklaunch)
AllDocs (location of the document needed for the DocID in NavNodes
Find the row with the entry of a botched quick launch item (one that was deleted, then added back later).
The way the permissions work is that if there is a URL specified in the NavNodes part, it breaks the permission and treats it like a node that everybody can see.  However, if the DocID is set with the specific hex code (look below), and the URL is set to null, and ElementType is changed to 1(not entirely sure what this is for, maybe to specify if it’s custom….er something), then you can set it back up to how the quick launch works when you first make a site (based on the permissions of the site)
–select * from navnodes where siteid=’84EAD071-5977-4C59-AC79-71BD4988BE7D’ and webid=’AB489397-264F-4C9D-9791-59E44C0EDB66′ and eid=2016

select * from NavNodes where Name like ‘Team Site%’

select * from NavNodes where Name like ‘Web Services%’

–select * from alldocs where dirname like ‘%web_services/team_site%’ and leafname=’default.aspx’

–select * from NavNodes where Eidparent=1026

– 9CF75CF6-3204-4734-9336-00FF65F3E254

–select * from alldocs where id=’23A06CEE-87FE-4B2C-B9A3-0937ED66F6F5′

Edit: Who am I kidding, I’m not going to go back to this and clean it up.  Let’s leave it as is!

Share