faqts : Computers : Programming : Languages : Asp : ASP/VBScript : Functions

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

162 of 238 people (68%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

calling a JavaScript function from within asp

Dec 4th, 2001 23:51
Paul Lovett,


***Here I am populating a ASP variable with a boolean value

if boolean = false I want to pop up a alert box in the browser to 
advise the user.

I simply end the ASP tag and insert my Javascript code. I only need to 
show a alert box but I could easily call a JavaScript function the same 
way.


ASP CODE>........
'---------------------------------------------------------------------
' Call method updateCampaignHTMLText() ' 

  insertSuccess = myObj.updateCampaignHTMLText()
  
     if insertSuccess = false then
 
              %>
		<script language = JavaScript>
		alert('Insert Failed');
		</script>
              <%
	  
    End if 	  
'----------------------------------------------------------------------
CONTINUE ASP CODE>.......



© 1999-2004 Synop Pty Ltd