Solved

multiple choice display content in IFRAME

Posted on 2004-10-28
227 Views
Last Modified: 2008-03-06
Hi there

I have 2 files here but would like to find a way of selecting from multiple menus the values and display in Iframe. This iframe should be local and not sever side.

Also update per menu not 1 that refeshes and resets other values of choice. Segmented in a way.

here are the files

main form

<html>
<head>
<title> No title</title>
<meta name="description" content="Blank document with no style.">
</head>
<body>

<table border="1" width="100%">
    <tr>
        <td width="562" height="312" rowspan="3"><p>&nbsp;<font face="Arial"><IFRAME SRC="refresh-frame.html" WIDTH="680" HEIGHT="500" scrolling="yes"></IFRAME></font></p>
        </td>
        <td width="88" height="83">
            <p>Content1</p>
        </td>
        <td width="83" height="83">
            <form name="form1">
                <p><select name="content1" size="6">
                <option value="info here">content1</option>
                <option value="even more info">content1b</option>
                <option value="tons of info">content1c</option>
                </select></p>
            </form>
            <p>select %TITLE%</p>
        </td>
        <td width="51" height="83">
            <form name="form4">
                <p><select name="template" size="1">
                <option value="template1.html">template1</option>
                <option value="template2.html">template2</option>
                </select></p>
            </form>
            <p>select str_replace</p>
            <p>template1</p>
            <p>template 2</p>
        </td>
    </tr>
    <tr>
        <td width="367" colspan="3">
            <form name="form5">
                <p>Content 2 &nbsp;<select name="content2" size="1">
                <option value="displayme">content2</option>
                <option value="display even more">content2b</option>
                <option value="display even more info">content2c</option>
                </select></p>
            </form>
            <p>str_replace %CONTENT% from template X</p>
        </td>
    </tr>
    <tr>
        <td width="88">
            <form name="form2">
                <p><input type="submit" name="create"></p>
            </form>
            <p>&nbsp;</p>
        </td>
        <td width="83">
            <p>&nbsp;</p>
        </td>
        <td width="51">
            <p>&nbsp;</p>
        </td>
    </tr>
</table>
<p>Display pull down menu content and read template %TAG% display in IFRAME
then on submit download iframe content as a file</p>
</body>
</html>

template file

<html>

<head>
<title>No title</title>
</head>

<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<p>%TITLE%</p>
<p>%CONTENT%</p>
<p>%INFO%</p>
</body>

</html>

So really all it is doing is search and replacing data via tags with a template then the values of the pull down menus fill in the gaps of the iframe
This question will be in multiple parts so it could be worth 2000 points to anyone.

thanks
0
Question by:playstat
    4 Comments
     
    LVL 49

    Expert Comment

    by:Roonaan
    You cannot open local files using php. You have to use clientside scripting in order to do that. ActiveX is the only clientside way I know to achieve this.

    Regards

    -r-
    0
     

    Author Comment

    by:playstat
    can javascripting do it
    0
     

    Author Comment

    by:playstat
    how about a random folder server side once that is stored then hit the submit and downloads the output
    0
     
    LVL 49

    Accepted Solution

    by:
    Using serverside languages you can do a lot. I think it could also provide with what you are searching for now.

    Easier would be to have the templates stored in db, and provide users with a editor of some way, such that they don't have to work with ftp etc.

    -r-
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
    This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
    The viewer will learn how to count occurrences of each item in an array.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    877 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now