Jump to content

adding to URL from text box


Recommended Posts

I’m very new to java script and spent about 12 hours searching the web and trying different scrip to create a text box with a button. I wanted to add another folder name, from the text box, to the URL. And then, create a new window for the modified URL link. This link assumes a default html at each new folder.Example; the-default-web.com/folder/added-textbox-folder-name I finally found some script that led me in the right direction. I know this is simple for most programmers, but wanted to provide this for newbees like myself. I’d like to save others the long hours. <form name="addfolder"> <input type="hidden" name=" url" value="http://www.the-default-web.com/folder1/"> <input type="text" size=6 name="folder2" value=""> <input type="button" value="Click Here" onClick="link()"> <script> function link(){window.open((document.addfolder.url.value + document.addfolder.folder2.value), "windowname", "status=no,toolbar=no,location=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=500");return false} </script></form>

Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...