Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

redirect to url with button vbscript

Status
Not open for further replies.

watered

IS-IT--Management
Jul 3, 2002
4
CA
Hi,

I want to do something supposedly very easy, but even if work all day on that I didnt find it. I try all the way.
There a simply way I think to do it, but it doesnt work...so if you have an idea tell me please.

<td><INPUT type=&quot;button&quot; value=&quot;Button&quot; name=buttonNext onclick=&quot;publi&quot;>
</td>
<script language=&quot;VBScript&quot;>
sub public
response.redirect (&quot;publipostage.asp&quot;)
end sub
</script>
 
Check this thread for info on redirecting
thread329-299469 [bomb]
I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
 
common error to get asp and vbscript in the redirect mixed up
here is what you should have
<script language=&quot;VBScript&quot;>
sub public
Location.href = &quot;publipostage.asp&quot;
end sub
</script>
[bomb]
I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
 
Why location.href =&quot;url here&quot;

and not response.redirect = &quot;url here&quot;?

it is possible to do something like this?

<%
sub mysub()
response.redirect = &quot;url here&quot;
end sub
%>


<script language=&quot;VBScript&quot;>
call mysub()
</script>
 
asp
is response
and straight vbscript
is location

one is run server side and one is run client [bomb]
I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
 
if this is suppose to be asp then
<%
sub public
response.location(&quot;publipostage.asp&quot;)
end sub
%> [bomb]
I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
 
Thanks for all your inputs, its very useful.

It seem that asp cannot detect if a button is press like
in vbscript (ex: sub button_onClick()
end sub)

Can I do in vbScript all the thing possible in asp?
 
Not sure what you mean VBscript can't tell if a button is pressed.
Sub blah_onclick is vbscript telling when a button is clicked.

Yes you can do everything in VBScript that you do in asp excluding the server side works such as DB's etc. The only diff here is the client side vs. server side. Remember that IE is the only browser that supports client side VBScript. [bomb]
I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top