i was wondering if it is possible to have a command button link to a URL which is typed in a text box.
any help would be great
thanx
Printable View
i was wondering if it is possible to have a command button link to a URL which is typed in a text box.
any help would be great
thanx
hi welcome to the forums,
are you asking something like this.,
Code:
<body>
<script language="javascript">
function ca(){
// opens in the same window
// location.href = "http://www." + demo.t1.value + ".com";
// opens in blank window
window.open( "http://www." + demo.t1.value + ".com", "Sample");
}
</script>
<form name = "demo">
<input type = "textbox" name = "t1">
<input type = "button" name = "b1" value = "click" onclick="ca()">
</form>
</body>
oops sry....this is vb6.... so i need sumthing like
Private Sub command1_Click()
the code here
End Sub
hi,
then you have posted the question in wrong section of the forum. if you have posted in classic visual basic section, then you would have got your answer a long before.
since i don't have exact idea how it can be done in vb, try posting it in the classic visual basic section.
You can use the ShellExecute API.
http://www.vbforums.com/showthread.php?t=350225
mendhak :
that is a nice example. hope it solves the requirement.
yes it works great...thank you...i am sry tho for being in the wrong section as i am new to this..once again thanx n sry
It's one of the only APIs I could ever remember from my VB6 days. :reminisces:Quote:
Originally Posted by kishore.kr
Of course, it's better in .NET now, you have System.Diagnostics.Process :)