0
   

What is the HTML to close part of the page?

 
 
Reply Sun 29 Mar, 2009 11:02 pm
My home page has too many categories, I am trying to put X (close )on each category so the visitors can close what ever they do not like or the things they not interested in. I am looking for HTML code for that and if possible, when the visitors come back to the website next time, they do not need to see that category that they closed before.

Thanks
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 2,541 • Replies: 2
No top replies

 
Robert Gentel
 
  2  
Reply Sun 29 Mar, 2009 11:08 pm
@ammaryameen,
I already gave you code that will allow you to open and close divs. You can do this basically by setting the css "display" value to "none" or "block".

Now if you want this selection to be remembered for future visits you'll need to have them log in, or you will need to store this in a cookie.

At this point it sounds like the best thing for your level of experience with HTML and JavaScript is a JavaScript library like jQuery, Moo Tools, or YUI.

What you want to accomplish can be done through any of those libraries and if you are going this direction you might want to start playing with them to learn more about dynamic html.
0 Replies
 
gkumar
 
  1  
Reply Mon 17 Aug, 2009 12:52 am
@ammaryameen,
your submit button should have something like that

type="button" onClick="formName.submit();window.close(…

where formName is the name of your form.

Another option is to add in your form onSubmit="window.close();"

See an onSubmit example here:
http://www.w3schools.com/jsref/jsref_ons
0 Replies
 
 

Related Topics

Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » What is the HTML to close part of the page?
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 04/18/2024 at 01:41:25