tags:

views:

10

answers:

1

I have a website with a menu & different sub-entities in a page, that means sub entity pages under a parent page, i want to disable parent page, that means when i click parent page goes nowhere, only goes when clicking on sub-entity pages .. Let me know, how i can do that, i'm working on wordpress, i need this ASAP,please ..

A: 

Three options:

1 - outdated - look into the <iframe> tag, but I don't recommend this - it's outdated and unused for many good reasons.

2 - recommended:

  • make a template that looks like the main page.
  • Copy it a bunch of times for the 'sub-entity' pages.
  • Put the 'sub-entity' content in as appropriate.

Now, you've got something that LOOKS like the parent page isn't moving. (should probably be done with PHP or something similar, but can be done with just HTML)

3 - not so good:

  • make a PHP page that outputs the sub-entity content.
  • Use a <form> to submit the page with some POST data.
  • Use the POST data to find which sub-entity page you want to output.

Also, the word sub-entity is not the right terminology. I assume you're talking about the children of the window's document body:

WINDOW [ HTML [ BODY [ ] ] ] is equivalent to your
PARENT PAGE [ SUB-ENTITY PAGES [ SUB-ENTITY PAGES [] ] ] which is similar to
WINDOW [ DOCUMENT [ BODY [] ] ]

Hope this helps, or at least gives you a starting point.

====================

To redirect to the home page when clicking ANYWHERE on the home page, use javascript:

<script type='text/javascript'>
  document.body.onclick = function() { window.location.href = "index.htm"; }
</script>

A link to the homepage is obviously

  <a href='index.htm'>HOME</a>
Steve
hey, i want to redirect to the homepage when clicking on the home page, may be this will work for a while, please can you let me know, how i can do that???
Shihab Uddin
Please try to be more clear in your questions about what you're trying to accomplish. A small bit of source code helps too.
Steve