philysworld Posted July 25, 2012 Share Posted July 25, 2012 can some help me with html code really fast..?iam using A BLOGi need a one line box where you can type in a urlsubmit buttonwhen u submit it. (any user/gusets can come to my site and submit a url)it goes right to the html page in another box below.the url in from top to bottom(boxline) type in ur link here(submit button) submit link(layout fro top to bottom)google.camsn.comyahoo.ca <html><head><title>Redirector</title><script type="text/javascript">function goToUrl() {var url = document.getElementById("urlHolder").val…if (url=="")alert("Enter a URL");else{window.location=url;}}</script></head><body><input type="text" id="urlHolder" name="urlHolder"/></br><input type="button" id="goButton" value="Submit" onclick="goToUrl();" /><a href="#" onclick="goToUrl();">Submit</a></body></html> Link to comment Share on other sites More sharing options...
thescientist Posted July 27, 2012 Share Posted July 27, 2012 (edited) what's the issue? is something not working? do you need help with something? A question? Errors in the console you don't understand? Can you show your full code? Surely the ... aren't in your actual code var url = document.getElementById("urlHolder").val... also, why are you calling the function twice, on two elements, one nested within the other? Edited July 27, 2012 by thescientist Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now