Page 2 of 2

Posted: Thu Oct 02, 2003 2:43 pm
by m3rajk
<a name="#what-the-link-is-for" href="#" onClick="window.open('what-the-link-is-for.php?possible_args=dynamically_generated', 'what-the-link-is-for', 'height=some_height,width=some_width,scrollbars=yes');">what-the-link-is-for</a>

i have links all over the place that use the name tag to open a link in a new window without losing your place on the page

i never used id, but from something i saw it loks like you can add css option IN the id tag as well.. so i didn't think that it was a replacement for name

Posted: Thu Oct 02, 2003 5:13 pm
by Unipus
Well it looks like you're just setting a page anchor there. Sure, use name for that. But there's no reason not to use ID. CSS/javascript can identify any element that's properly IDed (just make sure everything is distinctly named!) and do almost anything you want to it.

ID isn't really a replacement for name. They both have their uses. ID has more uses, for me, but there's no "ID is better than NAME" or whatever, because they do different things.

Posted: Thu Oct 02, 2003 9:58 pm
by m3rajk
ok. i thought name was deprecated though, which is why i want to get toknow id better

Posted: Fri Oct 03, 2003 2:23 pm
by Unipus
I don't believe it's deprecated... I think it can't be, because it's necessary for proper handling of form elements.

Posted: Fri Oct 03, 2003 4:51 pm
by m3rajk
one of the pages i saw naming changes said it's replaced with id

Posted: Fri Oct 03, 2003 6:26 pm
by Unipus
Well they must know something I don't... try submitting a form with no NAME elements and see if you get any useful data out of it.

Posted: Sat Oct 04, 2003 2:28 pm
by m3rajk
only time i name forms is when i use javascript in them. otherwise i have no name and there's never a problem

Posted: Mon Oct 06, 2003 12:15 pm
by Unipus
Sorry, I mean names on your input fields, not on the form itself.

Posted: Tue Oct 07, 2003 5:56 pm
by m3rajk
lol.
yeah. i'm nto sure. i think it was meant in reference to the a that name was deprecated, but i agree, something sounds fishy about w3cschools calling it deprecated now that i think of it in reference to ththe inputs of a form.