How to create pop up window in PreSaveAction(), based on Radiobutton selection.
I am trying to set a list item to readonly when Status field (Radiobutton) is checked to Closed. So when user checks status to closed and clicks ok, I want to pop up a message to conform weather user is sure about changing the status field to Closed. This is what I got so far, I have some errors in this javascript, I don't know much about JavaScript. I would really appreciate if anyone can find the errors and suggest me the correct way to achieve this. <script language ="javascript", type="text/javascript"> function PreSaveAction() { var radio = getTagFromIdentifierAndTitle("input","RadioButtons","Current Status") if (useradio.value == "Closed" ) { alert("sure!") return false; } return true; } function getTagFromIdentifierAndTitle(tagName, identifier, title) { var len = identifier.length; var tags = document.getElementsByTagName(tagName); for (var i=0; i < tags.length; i++) { var tempString = tags[i].id; if (tags[i].title == title && (identifier == "" || tempString.indexOf(identifier) == tempString.length - len)) { return tags[i]; } } return null; } </script>
May 14th, 2011 4:54pm

Hi, Thanks to share your post. For the issue, I didn’t find the useradio.value has been initialized before. Please check it, and please also post the detailed error message in this forum. Hope this could help you! Leo
Free Windows Admin Tool Kit Click here and download it now
May 17th, 2011 3:31am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics