iStriide Posted July 30, 2010 Share Posted July 30, 2010 I just started javascript, and i was wondering if their was a way that you use the prompt(""); code or document.write or something that will pop with a box like alert but that you can type in a url and click ok and it will take you to that page. Quote Link to comment Share on other sites More sharing options...
Adam Posted July 30, 2010 Share Posted July 30, 2010 Yeah, pretty easily. The basic code would be something like: var url = prompt('Prompt message here..'); if (url) { window.location = url; } You'll most likely want to add in some URL validation though. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.