|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to call a VBScript function in a <a href> tag
<i><b>Originally posted by : Guillermo Conde (guillermo_conde@yahoo.com)</b></i><br />Hi there, i have a page that have the following funtion in the head section:<br /><br /> Sub ButtonUpd_OnClick<br /> Dim TheForm<br /><br /> Set TheForm= Document.FormAdd<br /><br />' aux=msgbox(Trim("<%=OldPassword%>" + "la"))<br /><br /> if TheForm.OldPwd.value <> "<%=OldPassword%>" then<br /> aux = MsgBox("The Old Password doesn't match, please, try again",48,"WSMS")<br /> else<br /> if TheForm.AddPsw1.value = "<%=OldPassword%>" then<br /> aux=MsgBox("The Old Password and the New Password must be different",48,"WSMS")<br /> else<br /> If TheForm.AddPsw1.value="" then<br /> aux=msgbox("The Password hasn´t been introduced & is required",48,"WSMS") <br /> Document.FormAdd.AddPsw1.focus<br /> else<br /> If TheForm.AddPsw1.value <> TheForm.AddPsw2.value then<br /> aux=msgbox("The Passwords are wrong",48,"WSMS") <br /> Document.FormAdd.AddPsw1.focus<br /> else<br /> Document.FormAdd.Submit<br /> end if 'Passwords <br /> end if 'Password<br /> end if<br /> end if<br /> End Sub<br /><br /><br />And the image like this:<br /><br /><a onMouseOut='MM_swapImgRestore()' onMouseOver="+chr(34)+"MM_swapImage('document.ButtonUpd','document.Button Upd','../../../Images/ButtUpd2.gif')"+chr(34)+" >"%><img name="ButtonUpd" border="0" src="../../../Images/ButtUpd1.gif" width="80" height="15"></a><br /><br />And then an image with the name ButtonUpd, when the button is clicked the sub is called, but i need that when the mouse pass over the image the hand appears and at this moment, the cursor doesn't change by the hand. ¿how can you call the VB function inside the <a> </a> tag?<br /><br />Thanks in advance<br />
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : Michael Duchscherer</b></i><br />Here is an example of what I think you want.<br /><br /><A ID="lnkID" onMouseOver="lnkID.style.cursor='hand'" ONCLICK="{subroutine to call}"><br /><br /><br />------------<br />Guillermo Conde at 3/1/2002 12:16:47 PM<br /><br />Hi there, i have a page that have the following funtion in the head section:<br /><br /> Sub ButtonUpd_OnClick<br /> Dim TheForm<br /><br /> Set TheForm= Document.FormAdd<br /><br />' aux=msgbox(Trim("<%=OldPassword%>" + "la"))<br /><br /> if TheForm.OldPwd.value <> "<%=OldPassword%>" then<br /> aux = MsgBox("The Old Password doesn't match, please, try again",48,"WSMS")<br /> else<br /> if TheForm.AddPsw1.value = "<%=OldPassword%>" then<br /> aux=MsgBox("The Old Password and the New Password must be different",48,"WSMS")<br /> else<br /> If TheForm.AddPsw1.value="" then<br /> aux=msgbox("The Password hasn´t been introduced & is required",48,"WSMS") <br /> Document.FormAdd.AddPsw1.focus<br /> else<br /> If TheForm.AddPsw1.value <> TheForm.AddPsw2.value then<br /> aux=msgbox("The Passwords are wrong",48,"WSMS") <br /> Document.FormAdd.AddPsw1.focus<br /> else<br /> Document.FormAdd.Submit<br /> end if 'Passwords <br /> end if 'Password<br /> end if<br /> end if<br /> End Sub<br /><br /><br />And the image like this:<br /><br /><a onMouseOut='MM_swapImgRestore()' onMouseOver="+chr(34)+"MM_swapImage('document.ButtonUpd','document.Button Upd','../../../Images/ButtUpd2.gif')"+chr(34)+" >"%><img name="ButtonUpd" border="0" src="../../../Images/ButtUpd1.gif" width="80" height="15"></a><br /><br />And then an image with the name ButtonUpd, when the button is clicked the sub is called, but i need that when the mouse pass over the image the hand appears and at this moment, the cursor doesn't change by the hand. ¿how can you call the VB function inside the <a> </a> tag?<br /><br />Thanks in advance<br />
|
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > How to call a VBScript function in a tag |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|