Forum Moderators: open

Message Too Old, No Replies

link help

         

seofreak

2:41 pm on Jul 24, 2003 (gmt 0)

10+ Year Member



Website : [form field] (Go)

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.

korkus2000

2:43 pm on Jul 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What is the foem field? Textbox dropdown? This is a simple javascript. If you do a search on your favorite SE for location.href and chosen form field.

seofreak

2:48 pm on Jul 24, 2003 (gmt 0)

10+ Year Member



it's a simple text field

seofreak

3:12 pm on Jul 24, 2003 (gmt 0)

10+ Year Member



Ok .. this following script for example :

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

seofreak

5:55 pm on Jul 24, 2003 (gmt 0)

10+ Year Member



<head>

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