...

View Full Version : help with submit box



philysworld
07-24-2012, 08:34 PM
hi guys i was wondering if any one can help me out..

there is a url box line
then a submit button
and i want it to paste on the same page in a box below
the submit button going from top to bottom (new to old)
any users/guests can submit a link on my page..

<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>

sunfighter
07-25-2012, 06:58 PM
You have a button and next to it an anchor that does the same thing:

<input type="button" id="goButton" value="Submit" onclick="goToUrl();" /><a href="#" onclick="goToUrl();">Submit</a> Remove the anchor

<input type="button" id="goButton" value="Submit" onclick="goToUrl();" /> Only.

Please to note that the url MUST start with "https://" I'm sure people doing this will not do that so it becomes your responsibility. Next you need to check that it ends in a .com or .net etc.

Lastly you need to STORE the urls. And display them as you said. just to see if this will work for you I suggest a simple text file.

Hope this gets you going in the right direction.

tempz
07-25-2012, 11:48 PM
They're submitting a url then people can view what they submitted?

If so, I don't see any db connections made, how are you ment to store the urls? Unless your using a XML file o.O

philysworld
07-30-2012, 10:53 PM
hi guys. yes iam useing .xml my blog temp sry i am new at this if u can help me that would be great
i just need it to go on the same page when they submit a link..



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum