scriptygoddess

Archive for the ‘Javascript’ Category

03 May, 2008

Phone number validation with jquery

Posted by: Jennifer In: Javascript|jquery

One of the things I've been playing around with a lot recently is jquery. Why I didn't jump on this bandwagon sooner, I'm not sure, but I am kicking myself for it. So I am still a bit of nub on the jquery front – but I like to think I pick things up quickly. [...]

Awhile back, I had a project where I created a nice clean (X)HTML page including navigation using UL and LI tags. A few months later the client decided they wanted to add a dropdown menu to the navigation. No problem, I thought. We just add the embedded lists to the navigation – style it with [...]

This is probably considered "Javascript 101" – but I still had a bit of trouble finding just the right syntax to work. Simply needed a button to open a new page (in the same browser window): <input type="button" value="THERE REALLY ARE OTHER SEARCH ENGINES!" onclick="location.href='http://www.yahoo.com'; return false" />

01 Dec, 2007

Change class name assignment with javascript

Posted by: Jennifer In: Javascript

Example: <div id="mydiv" class="current">Content</div> To change class assignment: document.getElementById('mydiv').className = 'notcurrent'; To remove the class assignment: document.getElementById('mydiv').className = ";

10 Jul, 2007

Warning: reference to undefined property

Posted by: Jennifer In: Javascript

The main reason I've seen that error come up in javascripts is because a form name or field name has been misspelled somewhere. Tonight, while I combed over every name until my vision was crossed – I discovered a new reason why you might get this error: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> I was working [...]

23 Mar, 2007

Setting Form Elements (mini-cheatsheet)

Posted by: Jennifer In: Javascript

Just some random stuff. This post was saved as a draft a long time ago because I needed to refer to one of these – but was waiting until I could find the original source to publish. It's pretty generic/basic stuff, though, (and a really small snippet) so I'm finally posting it. To set the [...]

23 Mar, 2007

Simple Google Maps (for dummies)

Posted by: Jennifer In: Bookmarks|Javascript

I was recently asked to embed a map into a web site. Basically, the client wanted a map, with a marker, indicating where their business was, and an easy way for the user to get directions to where they were located. The first thing you need to do is get a Google Map API key. [...]

I needed to set the selection of a drop down menu. As far as I can tell, if you don't know the "index" value, then you just have to loop through to set the item as selected. If there's an easier way to do this, please speak up in the comments. I spent WAY too [...]

Somewhat along the same lines as this older post… I had a "purchase" page where I wanted to allow the user to either purchase items on the site via credit card, or they could choose to pay via paypal. So two buttons. One that says "Pay with Credit Card" another that says "Pay with Paypal"… [...]


Featured Sponsors


  • Curt: If anyone comes across this with similar issues I was able to sort out the pagination issues painlessly with easyCommentsPaginate from http://www.mush
  • Christopher: Yeah, it is indeed hard to do. And something remains elusive about why the pagination never worked. I tried everything I could find. Regardless, I
  • Jennifer: Hi Christopher, always hard to bug test stuff like that remotely. Sorry those didn't help. Glad you found a solution though :)

About


Advertisements