help with java flash text script problem.

Associate
Joined
18 Mar 2004
Posts
793
Location
u.k
Hi Im getting an error when running this code its a javascript flashing text script around some asp using vbs as main code.

when the code is called it works without any errors if the statement is true, but when the vbs script is bypassed or is false I get a internet explorer error.

the java is incorparated into the vbs script so it only gets used when it meets the critera, then it pops on the screen as a message.

Code:
<body onload="changeColour('blinky');">
  <script type="text/javascript">
  function changeColour(elementId) {
	var interval = 1000;
	var colour1 = "red", colour2 = "black";
	if (document.getElementById) {
	  var element = document.getElementById(elementId);
	  element.style.color = (element.style.color == colour1) ? colour2 : colour1;
	  setTimeout("changeColour('" + elementId + "')", interval);
	}
  }
  //--></script>
		 
		
		
  <%	  
		
		
		if company_answer_final = "RSA" and final_response_price <> "Refer" then
		if request.form("subsidence_addon") = "no" then
		response.write "<br><b><font size='2'>Excess Details </b></font>- £100 Standard Excess."%> <p id="blinky"><b>NOTE SUBSIDENCE COVER NOT INCLUDED!</b></p><%
		end if
		end if


Any ideas?
 
Tis ok I have fixed it!


I needed the

%><p id="blinky"><b></b></p><%
statment after the vbs because when the vbs was bypassed it would not find the id="blinky" .

Thanks
 
Back
Top Bottom