Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display div

Status
Not open for further replies.

nickdel

Programmer
May 11, 2006
367
GB
Hi, I have a hidden div on my main page and I would like to be able to make this visible depending on the response from the server. I tried returning a response of:

Code:
<script language=javascript> document.getElementById("AboutYou").style.visibility="visible";</script>

this however doesn't work :(

can anyone think of a way to do this?
 
Thanks Dan, but I dont think I quite get what you mean! (Sorry!) Can you give me an example?

Cheers

Nick
 
Have your AJAX call return the string "none", or the string "block". In your callback function, simply set the "display" style to whatever the return value was.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top