471,596 Members | 818 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,596 software developers and data experts.

Retrieving custom values from elements....

I am not really experienced in Javascript so bear with me....

I am working with an embedded platform; no mouse, no keyboard. Just up,
down, left, right keys and +/- keys for incrementing/decrementing the
vaules in the form.

So my website consists of forms... Each form has a number of columns
and rows. I am generating each page using a php script and some
templates. Because the exact layout of each page can change based on
customer requriements, I want to write my PHP and Javascript in a way
that all the required information is in the templates.

So....

Right now, as the user hits the right arrow and navigates to the right
edge of the form, I want him to stop at the right boundary of the form;
I do not want to wrap to the next line. But maybe the next customer
will want wrap....

So I've tried using a template like this:

<td><input name='auxD-%d%' type='hidden' id='ha%T%' value='%auxD%'
size='3' readonly='readonly'><button tabindex=%t% id='a%t%'
navRight='stop' ><img src='/no.png' id='ia%t%'></button></td>

where the button element has a navRight property of 'stop'. I've tried
retrieving this with

var bdry = activeElement.navRight;

but I always get 'undefined'.....

How can I store custom values in html elements so that I can retrieve
them with javascript?

--Yan
Apr 18 '06 #1
1 1400
Captain Dondo wrote:

How can I store custom values in html elements so that I can retrieve
them with javascript?


Answering my own post for 'post'erity: ;-)

var bdry = activeElement.getAttribute('navRight');

Apr 18 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Rudy | last post: by
5 posts views Thread by Klaas Seelen | last post: by
21 posts views Thread by One Handed Man \( OHM - Terry Burns \) | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.