Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Some basic basic stuff
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Eugene Hourany  
View profile  
 More options Nov 5, 8:25 pm
From: Eugene Hourany <ehour...@gmail.com>
Date: Thu, 5 Nov 2009 17:25:30 -0800
Local: Thurs, Nov 5 2009 8:25 pm
Subject: Some basic basic stuff

Hi all,

I'm tearing my hair out trying to figure out why I keep getting a "element
is null" error. Here's what my code looks like:

$('firstname').hide();

and I have

<input id="firstname" name="firstname" value="" />

and I get

Error: $("firstname") is null
Source File:
file:///C:/Documents%20and%20Settings/142253/Desktop/test/index.html#
Line: 14

I'm doing this locally from my desktop. I'm using prototype 1.6.1.

I also would like to know how to open a json file for reading and parse it.

Thanks!

Eugene


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
T.J. Crowder  
View profile  
 More options Nov 6, 8:47 am
From: "T.J. Crowder" <t...@crowdersoftware.com>
Date: Fri, 6 Nov 2009 05:47:02 -0800 (PST)
Local: Fri, Nov 6 2009 8:47 am
Subject: Re: Some basic basic stuff
Hi,

It sounds like you're not succeeding in loading Prototype or something
else you're loading is conflicting with it, I suggest checking your
script tags.  The code you've quoted and the HTML you've quoted should
work, provided Prototype is getting loaded.

FWIW,
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / com
www.crowdersoftware.com

On Nov 6, 1:25 am, Eugene Hourany <ehour...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bill  
View profile  
 More options Nov 7, 2:49 pm
From: bill <will...@TechServSys.com>
Date: Sat, 07 Nov 2009 14:49:46 -0500
Local: Sat, Nov 7 2009 2:49 pm
Subject: Re: [Proto-Scripty] Some basic basic stuff

do you have the input declaration before the execution of the
"$('firstname').hide();"

If you execute the js before the input is declared, the id will not exist.

bill

--
Bill Drescher
william {at} TechServSys {dot} com


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kstubs  
View profile  
 More options Nov 7, 4:45 pm
From: kstubs <kst...@gmail.com>
Date: Sat, 7 Nov 2009 13:45:13 -0800 (PST)
Local: Sat, Nov 7 2009 4:45 pm
Subject: Re: Some basic basic stuff
Try naming the ID attribute different than the NAME attribute.

On Nov 7, 12:49 pm, bill <will...@TechServSys.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eugene Hourany  
View profile  
 More options Nov 9, 2:04 am
From: Eugene Hourany <ehour...@gmail.com>
Date: Sun, 8 Nov 2009 23:04:25 -0800
Local: Mon, Nov 9 2009 2:04 am
Subject: Re: [Proto-Scripty] Re: Some basic basic stuff

I never put in a name attribute, that could be part of the problem.

I solved it by putting it in a function that's called by onclick, and it
worked. I was able to reference it the old fashioned JS way, and prototype's
way.

Now all I want to know is how to load and parse a JSON file using the same
method.

Thanks!

Eugene


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex McAuley  
View profile  
 More options Nov 9, 2:35 am
From: "Alex McAuley" <webmas...@thecarmarketplace.com>
Date: Mon, 9 Nov 2009 07:35:30 -0000
Local: Mon, Nov 9 2009 2:35 am
Subject: Re: [Proto-Scripty] Re: Some basic basic stuff

Its happening because (as someone pointed out in a previous reply) the DOM node does not exist yet .....

you need to wrap the code in observers...

for example...

Event.observe(window,'load',function() {

    $('TheElementToHideObserver').observe('click',function() {
    $('firstname').hide();

});
});

//Then your html

<input type="submit" id="TheElementToHideObserver" value="Hide First Name" />
<hr />
<input type="text" name="firstname" id="firstname" />

....

Simple as that

HTH

Alex Mcauley
http://www.thevacancymarket.com


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ColinFine  
View profile  
 More options Nov 9, 8:34 am
From: ColinFine <colin.f...@pace.com>
Date: Mon, 9 Nov 2009 05:34:41 -0800 (PST)
Local: Mon, Nov 9 2009 8:34 am
Subject: Re: Some basic basic stuff

On Nov 7, 9:45 pm, kstubs <kst...@gmail.com> wrote:

> Try naming the ID attribute different than the NAME attribute.

What difference would that make?

However, what I was going to suggest was checking that your id
'firstname' is unique in the page. Names can be duplicated, but id's
can't.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ColinFine  
View profile  
 More options Nov 9, 8:57 am
From: ColinFine <colin.f...@pace.com>
Date: Mon, 9 Nov 2009 05:57:29 -0800 (PST)
Local: Mon, Nov 9 2009 8:57 am
Subject: Re: Some basic basic stuff

On Nov 9, 7:04 am, Eugene Hourany <ehour...@gmail.com> wrote:

> I never put in a name attribute, that could be part of the problem.

No.

> Now all I want to know is how to load and parse a JSON file using the same
> method.

What's a JSON file?

JSON is a text representation of data which is pretty well identical
to Javascript's own notation, so you can parse it with eval().
However, if the JSON is coming from Ajax, it's already available to
you as a parsed object: see http://www.prototypejs.org/api/ajax/response


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google