PDA

View Full Version : DOM Bedlam


webdevfanboy
05-22-2010, 09:53 PM
I am working on the new development of youknack.com which is now being developed on http://youknack.com/test/ . My boss insisted on doing the design himself and he insisted on using dreamweasel so he could edit it :/ Youa I know it sucks. Because of the extremely over the top design requirements I have had to come up with a hack on the remember me checkbox, I am using an image and javascript onclick event to trigger the remember me working on http://youknack.com/test/test.html. The reason I have to do this is because the rigid table layouts are mental and using a real checkbox even with css making it smaller knocks it out of the layout.

My problem is it works on the test page because its the top of the dom but the dom on the index.html is huge. I tried to use firebug and thought it was:

table.tr.table.tr.td.tr[26] (or something like that)

but if anyone could tell me the dom path to the rememberme.gif image that would be great or if anyone could suggest a this. hack that would work.

Any help is appreciated.

Thanx.

Kor
05-25-2010, 09:57 AM
It is not very clear which is your problem. Can you re-form and detail it?

arizvi
05-25-2010, 11:32 AM
Can you please proivde the code snippets so it would be more easier to understand what you are trying to do.

A1ien51
05-25-2010, 03:50 PM
lol, that should be a real checkbox. If my boss did that I would laugh at him.

basically tell him that form is inaccessible and it could lead to people not using the site. It needs to be a REAL checkbox or loose customers. :)

You should not walk the DOM to get the image, it should have an id.

Eric

Kor
05-25-2010, 04:13 PM
lol, that should be a real checkbox. If my boss did that I would laugh at him.

basically tell him that form is inaccessible and it could lead to people not using the site. It needs to be a REAL checkbox or loose customers. :)

You should not walk the DOM to get the image, it should have an id.

Eric
well, hm, the truth is that you can make an image to act as a real checkbox, as you can transfer some value, onclick, to a hidden input, which it is able to submit data to a DB... I was not sure if that was the problem... Anyway, I agree Eric with something:

webdevfanboy , Why your boss wants a complicate way instead of a simple one?. Has your boss, webdevfanboy, heard about the KISS principle? It is a real design/programming principle, yet some say that the acronym is from Keep It Simple, Stupid :)

See:
http://en.wikipedia.org/wiki/KISS_principle
http://people.apache.org/~fhanik/kiss.html