|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
On Click Problem
When I click on a button that ive created I want it to go to a url that I have. Can anyone help me with this?
|
|
#2
|
||||
|
||||
|
try this
Code:
<script language="JavaScript">
function OpenWindow(varLink)
{
var objWin
objWin = window.open(varLink);
}
</script>
<input name="Link" type="button" value="Go To Page" onClick="javascript:OpenWindow('http://www.mansiononmain.com')">
Last edited by Memnoch : January 26th, 2004 at 11:30 AM. |
|
#3
|
|||
|
|||
|
if you want the url to open up in the same window, try this approach:
Code:
<script language="javascript">
function register() {
window.location.href = "register.asp";
}
</script>
<input type="button" value="Register" onclick="register();">
Last edited by haffej : January 26th, 2004 at 11:13 AM. |
|
#4
|
|||
|
|||
|
the url I am specifying actually sends an sms. i do not want the page in the url to come up rather a new page which states that the message was actaully sent.
|
|
#5
|
|||
|
|||
|
oh, then the button you're clicking is the submit button? my example was for using a button that doesn't submit the form, just directs to a new page.
then what language are you using to process the form? or is that out of your hands? whatever page processes the form would have to redirect the user to a different page or display that the message was sent... i think... |
|
#6
|
|||
|
|||
|
I am using ASP to process the form. Should have explained that earlier
|
|
#7
|
|||
|
|||
|
all right, asp ... vbscript or jscript?
if jscript, it's easy. you have two options: after the code is run, simply do something like Response.Write("Your SMS has been sent!"); of course, if you want your message to appear within an actual site layout, you'll probably want to redirect the user to a different page, such as Response.Redirect("messagesent.asp"); is that what you're looking for? |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > On Click Problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|