0

I'm trying to create a conversion tool/app in SharePoint where users can put in a Julian Date and it spits out the actual date as a result. I don't want this something that is saved as a list, and for the life of me, I can't figure out what I need to add.

I've created a couple fake columns as a sample in a pre-existing form, and my formula checks out, but it's currently in a list, and I want people with READ ONLY access to access a separate SharePoint page, type in a string of numbers, and for the conversion to apply and show the correct date.

0

The easiest way to implement this would be to use a Script Editor web part and just create a very basic HTML input with some JavaScript. Then you can put it wherever. There are several examples online of the necessary JavaScript to make this conversion.

  • I've tried some REALLY basic JavaScript, but I don't think security allows for it because it's stripping out some things, and the one thing I did get to work, it would auto-refresh the page. This is on a secure site, and I don't control security protocols for what is and isn't allowed on our browser, but it doesn't look like JavaScript is a solution from everything I've tried, and I'm not a strong enough programmer to create all of that on my own. – Will Dutcher Jul 12 '16 at 17:10
  • What was your code? Where did you put it? Try putting just an alert inside the script editor web part. – Erin L Jul 12 '16 at 17:37
  • (edited) It was really elementary stuff I googled: <!DOCTYPE html> <html> <body> <button onclick="Julian()">Click me</button> <p id="demo"></p> <script> function Julian() { document.getElementById("demo").innerHTML = "Hello World"; } </script> </body> </html> Clicking the button would show the text, but it refreshed and went away, immediately. – Will Dutcher Jul 12 '16 at 17:44
  • 1
    @WillDutcher try getting rid of the HTML and the body tags - the SharePoint page will already have those and the text editor won't like it when you try to save them to the page - for the refresh issue try using <button type="button" onclick=...> stackoverflow.com/questions/1878264/… and also try doing some more research :) – John-M Jul 12 '16 at 17:55
  • the ' type="button"... ' solution is something I found in my research and it didn't seem to work. I'll try it in conjunction with removing the head/body tags and let you know. Thank you! – Will Dutcher Jul 12 '16 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.