These guys are really bugging me.
I'm trying to make a script that will get all elements by tag name "input", I then proceed to put a border around them all so they are easy to point out. I have noticed checkboxes do not all much of anything in FireFox. In IE I can get a border and padding etc but FireFox hates me.
Is there anyway I can make the checkbox more noticable? I was thinking about putting in inside of a div with padding and a background but how would I do that if I just have the element by it's id? I'm not a huge fan of JS, but it seems I need to put up with it lol.
Can't you just give the div around it an id and get it by document.GetElementByID?
The user is uploading a HTML file, I am adding a script that will find all the form fields. I can find them already now but I want them to name them all which means they have to identify them, so I am trying to add borders or something around them all.
With form fields you mean all fields in a <form> or all <form>s?
Form fields as in input, select, textarea. But I'm focusing on checkboxes because all the others allow css backgrounds/borders.
Can't you do something like this:
I haven't tried it and I'm not sure it works, it was just a thought.Code:myField = document.GetElementByID("the_id"); myField.outerHTML = "<div style='Styles here'>" + myField.outerHTML + "</div>";
outerHTML? Exactly what I was looking for buddy!
Like I said, I'm no pro in JS lol, I never knew this existed lol.
+Rep!
If I were you I would try it before being so happy but I think it will work.
I'm not a pro on JS either but I worked with it almost the whole time from lunch to past midnight yesterday
Happy to help![]()
Worked perfect in IE but FF it did not, but I found a site that had a neat script to enable it. Also tested in Safari.
outerHTML in Firefox - JavaScript - Snipplr
Nice![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks