Jump to content
xisto Community
JMK0NYC

Controlling The Content Of The Page From Another Page Via Php

Recommended Posts

Hello,I am new to the group. I have created a website for a real estate management company. It's simple. There are four properties pages with several units on each. Right now using the SnippetMaster the client can activate or deactivate the div containing the link to the particular unit. Thus when deactivated the window with units contains only the activated ones.(sorry for the long description). What I would like to have is another page containing check boxes which would control the units on a page above. Once checked the unit would appear on the properties page , while unchecked - it wouldn't appear. I assume I could do it using PHP (or a combination with Java - I use WooTools, so jQuerry is out of question). Can anyone help me with that?Thanks

Share this post


Link to post
Share on other sites

Element properties, in this case, are controlled by client-side scripting (JavaScript) and not server-side scripting (PHP, Java). I don't necessarily understand what you want, but if i can make it out, if you are using, say, inline frames (iframe), the page in the iframe would just need to use window.parent to access the parent's elements. But if the page is embedded with PHP, then you can access the elements directly without window.parent, with document. You'll need to know a bit of JavaScript to understand what i am saying. I haven't used WooTools, so i can't really help much in that area.

Share this post


Link to post
Share on other sites

If you want to have a sort of admin control panel from which you tick boxes and the "items" on another page (IE the visitors page) are activated/de-activated then this is possible with PHP and CSS. You would need to set up two classes in CSS, one for the active items, and one for the disabled ones. The class for the disabled ones you would need to set it up so the text is grey or something, or modify each item so you have an invisible DIV hovering over each one. Then use the CSS to make this div either transparent (for the active items) or grey with semi-transparency for the de-activated ones. Then simply use PHP to register in a DB which items (via an ID) are active or not, then use PHP to create the HTML page and look at the DB for each item that is created, and if it is disabled then apply the disabled CSS class tag otherwise let it be enabled.There isnt a quick fix that you can download or anything, this would have to be custom coded. If you want it so the user has the ability to check a box and disable selected items then you need javascript instead of PHP.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.