Eugene JONG
Eugene JONG

Reputation: 63

Classic ASP Response write statement

In html these are working, how to I write a code which uses response write statement in classic asp for HTML statement below?

<div id="the_div" style="border: 1px solid red"><iframe src=asp3.asp> <br><br></div>

<a href="#" onclick="hide('the_div');return false;">Hide the div until this link is click again.</a><br>

<a href="#" onclick="remove('the_div');return false;">Remove the div until this link is click again.</a>

I tried below but not succesful, huh?

  response.write "<div id='the_div'><iframe src=asp3.asp> </iframe><br><br></div>"


  response.Write "<a href='#' onclick='hide('the_div');return false;">"Hide the div until this link is click again.</a><br>"

  response.Write "<a href='#' onclick='remove('the_div');return false;">"Remove the div until this link is click again.</a>"

Upvotes: 0

Views: 1604

Answers (1)

John
John

Reputation: 4638

Use double double quotes if you need to escape them within a Response.Write statement, ie

Response.Write "<div id=""the_div"" style=""border: 1px solid red""><iframe src=""asp3.asp""> </iframe><br><br></div>"

Response.Write "<a href=""#"" onclick=""hide('the_div');return false;"">Hide the div until this link is click again.</a><br>"

Response.Write "<a href=""#"" onclick=""remove('the_div');return false;"">Remove the div until this link is click again.</a>"

You can use single quotes instead of double quotes as you tried to do, but if you're already using them with JS onclick events it starts to look very confusing, and you might find there's a conflict

Upvotes: 1

Related Questions