Combo Box Help - Post ID 93964

User 366869 Photo


Registered User
5 posts

I am trying to populate a combo box from an XML document, so that I can change just the XML document, and not every page that the combobox will appear on....

How do I reference the XML doc from the html....

Any Ideas out there....

Thanks,

Steve
If I ain't building a website.....then I am fishing.....
User 133269 Photo


Registered User
2,900 posts

with some php?

or make it as a php include file instead of xml and include the whole thing on each page...
Have fun
~ Fe Pixie ~
User 366869 Photo


Registered User
5 posts

can you provide an example.....

I am stuck...

Thanks
If I ain't building a website.....then I am fishing.....
User 364143 Photo


Guest
5,410 posts

Or forget the xml and php and just have a single html page with the combobox, Than have an inline frame containing that html on every page you want it. Then you only have one place to make changes as you wish.
CoffeeCup... Yeah, they are the best!
User 355448 Photo


Ambassador
3,144 posts

Steven,

Here is something from my limited knowledge of PHP.

If you have any code that is repeated over more than one page, copy that code and save it as a php file. As an example, if you have the top of every page on your site with the same logo, address, phone number, etc. you can remove all that code and put it in a single file. I would call it masthead.php or something like that. I would put that file in a folder off my root folder and name that folder "includes" so I know where it is.

Now every page that has that masthead, will have this single line of code:
<?php include($_SERVER['DOCUMENT_ROOT']."/includes/masthead.php") ?>

If you ever need to edit the masthead, it is much easier to edit a single file instead of trying to edit every page and hope you don't miss any pages.
User 366869 Photo


Registered User
5 posts

Thank you both for the info....

I haven't tested the PHP yet....Will work this one tonight....

The iframe idea worked perfect though....

Thanks for solving an issue I have battled for 2 months now...Guess I need to get on these forums more often....

Steve
If I ain't building a website.....then I am fishing.....

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.