Element type replace with Mootools -
one of web page carries multiple forms same elements under different form id such as
<form method="post" action="" style="" enctype="application/x-www-form-urlencoded" id="comment-form-1"> <textarea rows="1" cols="45" id="body" name="body" ></textarea> <button class="post-comment-sml" type="submit" id="submit" name="submit"></button> </form> <form method="post" action="" style="" enctype="application/x-www-form-urlencoded" id="comment-form-2"> <textarea rows="1" cols="45" id="body" name="body" ></textarea> <button class="post-comment-sml" type="submit" id="submit" name="submit"></button> </form> --- <form method="post" action="" style="" enctype="application/x-www-form-urlencoded" id="comment-form-n"> <textarea rows="1" cols="45" id="body" name="body" ></textarea> <button class="post-comment-sml" type="submit" id="submit" name="submit"></button> </form>
here can replace submit button in varios form normal button type follows
<form method="post" action="" style="" enctype="application/x-www-form-urlencoded" id="comment-form-1"> <textarea rows="1" cols="45" id="body" name="body" ></textarea> <button class="post-comment-sml" type="button" id="submit" name="submit"></button> </form>
document.getelements("button.post-comment-sml").set("type", "button")
... not working or missing something?
keep in mind ie not types being changed. dont remember atm if affects case worth shot.
Comments
Post a Comment