Closed Bug 1195832 Opened 9 years ago Closed 8 years ago

Document HTMLSelectElement.selectedIndex

Categories

(Developer Documentation Graveyard :: General, defect, P5)

All
Other
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dvincent, Assigned: personaldev, Mentored)

References

()

Details

(Whiteboard: [good first bug][lang=js])

:: Developer Documentation Request

      Request Type: Correction
     Gecko Version: unspecified
 Technical Contact: 

:: Details

A twitter user reported this page is 404: https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/selectedIndex
Summary: https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/selectedIndex goes to 404 → Document HTMLSelectElement.selectedIndex
Adding myself as a mentor for this bug.

Documentation about how to do it is there: https://developer.mozilla.org/en-US/docs/MDN/Contribute/Howto/Write_an_API_reference#Structure_of_a_property_page
Whiteboard: [good first bug][lang=js]
Hello Jean, I Want to work on this bug.Will you please assign me this bug! And please give me some link for the environment and setup reference.  Thanks :)
Flags: needinfo?(jypenator)
Sure!

1. You need to create an account on MDN: https://developer.mozilla.org/en-US/docs/MDN/Contribute/Howto/Create_an_MDN_account
2. How to create a new page: https://developer.mozilla.org/en-US/docs/MDN/Contribute/Howto/Create_and_edit_pages
In this specific case, just follow the red link on https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement
3. Info about how to put content such reference page as the one for HTMLSelectElement.selectedIndex : https://developer.mozilla.org/en-US/docs/MDN/Contribute/Howto/Write_an_API_reference#Structure_of_a_property_page

Here you are!
Assignee: nobody → Rakhish1994
Flags: needinfo?(jypenator)
okey thankyou !!  Well what I understand here is, I have to create a new page for each red link case.And in the new page I have to put content for the specific red link topic in the given format provided here by you in point 3.  Right ???
Yes. This bug is specifically about 1 of these pages, https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/selectedElement , so you should start by this one.

We can open another bug afterwards for the other red links :-)
Hi Jean. I have created a page for one of them. Here is the link  https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/autofocus.
Waiting for review,please do let me know if I have to do anything else on it :)
Hi jean, should I file bug for another red links?
Hi Rakhi: no, not yet, I need to review your work first, which I will do later today.
Here is the long awaited review.

I think there is fundamental misunderstanding here: this is not about the documentation of HTML attribute but of DOM properties and methods. HTMLSelectElement.autofocus of course reflects the autofocus HTML attribute, but these are two different beasts.

That means that the syntax should be something like: [assuming that it is a read-write property, which I have not checked] 

aBool = aSelectElement.autofocus;
aSelectElement.autofocus = aBool;

Similarly, the example should consist of JS only.

Two more points:
1. {{APIRef}} has to be added at the top to generate the sidebar
2. The Compat table is wrong: autofocus has surely not be added in version 1.0 of some of the browsers listed. Some research is needed, and {{CompatVersionUnknown}} or {{CompatUnknown}} can be used if some values are not known.

Beside of this the structure is very good, as well as the text. Rakhi can you fix these points?
sure,I will fix this :)
Hi Jean, I did some edits hope it will satisfy the things you have pointed out. Well, I am not sure about the example because I have searched a lot but didn't found more things to learn about this specific topic in JS.Please let me know if I have to do more edits.Thanks.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/autofocus
Great! That was almost perfect. I changed a bit the example (it was about <input> when we are speaking about a <select> element here, I used macros inside the Specifications tables (we don't want to have to update the status of a spec manually in 100s of pages when it changes.

I also used the macro {{CompatVersionUnknown}} instead of the last version # in the compat table.

Wrt content, I added a note and an extra paragraph about specificities of the autofocus property.

Wrt format, I replaced a lot of hyperlinks by macro, that will create the tooltip automatically.

I think we are done. Fancy doing HTMLSelectElement.selectedIndex that is the real purpose of this specific bug?
Mentor: jypenator
Jean Its really cool now. thanks :-) Should I proceed for another red links bug because I got better idea now.And I think I will be comfortable of doing this.
Sure! You are very welcome.
so what I do first?first report the bug and then start working on it.Or if these bugs are already reported then please provide me the link.
Start with HTMLSelectElement.selectedIndex :-) It is this bug (see the title) :-D
Hi!

I've made some changes:
1. I moved the page to https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/form where it belongs (You probably changed the URL by inadvertence when editing the title) [Not a big deal]
2. The description on HTMLSelectElement and in the summary was wrong so I changed it.
3. I added the mention that it is a read-only property
4. I updated the syntax: the article is about the form property specifically, not about forms in relation to select elements.

What needs to be done: 
5. Updating the example: it doesn't use the form property. We need an example that makes use of the form property :-)

Thank you for your help.
Hi Jean, Thankyou very much ones again.you are really helping me alot, I will update the example ASAP and proceed for the next one :)
Hi Jean, First please accept my apology for being back after a long time, these days was really hard. 
So coming to the point I have change the example as being pointed out by you. see here https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/form
And I have added one more page for disabled element here: https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/HTMLSelectElement.disabled
Please take a review and let me know if more needed :) Till that I am proceeding for another redlinks.
Jean, will you please elaborate your first point little more?becaue I have't did any changes with url.
Flags: needinfo?(jypenator)
So, when creating a page, the field 'slug' corresponds to the last part of the URL. If you change the title, it adapts automatically, but in the case of a reference page, you don't want it to be adapted.

You want:
Page name: HTMLSelectedElement.disabled
but slug: disabled

When this happens, an admin has to move the page at the right place.
Flags: needinfo?(jypenator)
Rakhi, do you still want to work on this bug?
Note again that this bug is only for creating this one page:

https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/selectedIndex

Sebastian
Status: NEW → ASSIGNED
Flags: needinfo?(Rakhish1994)
Hi Sebastian, I am working on firefox bugs, so I can't be able to continue this. 
Thanks :)
Flags: needinfo?(Rakhish1994)
Ok, thanks for the fast feedback. Unassigning you.

Sebastian
Assignee: Rakhish1994 → nobody
Status: ASSIGNED → NEW
I am new to Bugzilla and want to start working on Bugs. Is it okay for me to take this one?
(In reply to Druzion from comment #27)
> I am new to Bugzilla and want to start working on Bugs. Is it okay for me to
> take this one?

Hi Druzion, yes, it's fine to take this bug. I've assigned you now. Please see comment 4 for instructions on what to do.

Sebastian
Assignee: nobody → personaldev
Hi Jean,

I have completed the documentation here: https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/selectedIndex
Would you mind reviewed it? Is there anything else I need to add or change?

Thanks, Druzion
Status: NEW → ASSIGNED
I did the review and overall it looked already really good. I fixed a few things like the tags and formatting and changed the example a bit. I think this can be closed now.

Thank you for the good and fast work!

Sebastian

PS: When requesting a review you should check the checkbox 'Need more information from' below the comment field, so the related person gets notified about it.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.