Forum Moderators: open
Note: form field - where the intial value will be www.domain.com
Imagine the above on a web page as a form. The person when clicks on go, should not have a direct link to [domain.com....] There should be javascript use somewhere in the page or as a .js file that holds "http://" as the data or whatever you call it. Upon clicking of "Go", the javascript data "http://" should be added to www.domain.com or whatever written over there and then the link should open in a new / same window. But it shouldn't be like a javascript pop-up that doesn't show the address bar, scroll bar, menu links, etc.
I hope i made it clear and will appreciate if someone can come up with a code for it.
thanks.
<SCRIPT LANGUAGE="JavaScript">
function windowopen()
{
location.href('http://www.domain.com')
}
</SCRIPT>
<FORM><INPUT TYPE="button" VALUE = "Open Website" onClick="windowopen()"></FORM>
But I want seperate javascript functions for http:// and www.domain.com (or whatever the value is in the textfield). So, there should be another function that conbines windowopen (only [)...] with the intial textfield value www.domain.com
Any takers? flames? death threats?
<SCRIPT LANGUAGE="JavaScript">
function formHandler(form){
var URL = www.domain.com;
{location.href = "http://" + URL + "";}
}
</SCRIPT>
</HEAD>
<BODY>
<form name="form" method="post">
<input type=button value="www.domain.com" onClick="javascript:formHandler(form)">
</form>
</body>
Above is what I want .. but it's giving errors .. any pro willing to help?