Quantcast

Maximum PC

It is currently Sat Sep 20, 2014 11:07 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Javascript HTML nightmare *rips out hair* SOLVED
PostPosted: Fri Nov 18, 2011 2:42 pm 
Team Member
Team Member
User avatar

Joined: Sat Mar 25, 2006 9:10 pm
Posts: 709
I fixed the problem, it was dumb and had everything to do with arrangement and the fact I was using name="" instead of id=""

*facedesk*


Top
  Profile  
 
 Post subject: Re: Javascript HTML nightmare *rips out hair* SOLVED
PostPosted: Sun Nov 20, 2011 1:14 pm 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Mon Jun 14, 2004 4:04 pm
Posts: 985
Location: Earth
TekRat wrote:
I fixed the problem, it was dumb and had everything to do with arrangement and the fact I was using name="" instead of id=""

*facedesk*


Are you using jQuery? jQuery makes javascript so much easier. Here are tips for javascript and HTML:

- Seriously, use id over name. HTML id's are unique to the element, name is a deprecated feature (IIRC).
- Learn how the DOM tree operates. HTML is heavily dependent on DOM traversals. It's not as hard as you think and it'll make you quick on the draw when writing javascript.
- Use a nice framework like jQuery, suppose you have a textbox that you need to populate:

Code:
var d = document.getElementById("myTextBox");
d.value = 'Some value';


jQuery short hands this:

Code:
$("#myTextBox").val('some value');


jQuery is the future of javascript and it's worth learning. I use it pretty heavily in projects, it makes AJAX calls a LOT simpler.

- Learning Javascript is a must in web development, invest some time in learning it.


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group