Hi,

I am new to cakephp (building first app :-)).  For some reason, when I
try to run my app in IE, it wants to download rather than render the
output from my view (a .ctp file).  I have looked on line and it seems
others have apps working with IE so I must not have something set
correctly.  BTW, the pages render fine in both Chrome and FF, but not
IE (using IE 7).  Here is my steps to reproduce:

1.  Render my index.ctp page (this works fine)
2.  When I click on one of my links -- it translates the link to the
proper file which has a .ctp extension, however, I get a dialog box in
IE to download a file with the name of the last section on my link

For background purposes, I have an xml file as my model which I use to
generate all of the dynamic form fields/links.

Not sure if this helps, but just in case here is a snippet of my code
used to generate the form:

---------------------
<?php
header("Content-type:  application/xhtml+xml; charset=UTF-8");
?>
<head>
<?php
        // create shortcuts for later use

        $registryFile = simplexml_load_file("../models/registry.xml");

        $activitypath = "something/somethingelse[name=\"".
$currentsomethingelse."\"]/adapters/adapter[name=\"".
$currentadapter."\"]/modules/module[name=\"".$currentactivity."\"]";
        $activitynode = $registryFile->xpath($activitypath);
        $activityname = $activitynode[0]->links->link->name;

?>
</head>
<body class="dlgBody">
<?php

// Build form to display

        echo "<h3><u>".$activitynode[0]->links->link->description."</u></
h3><br/>";

        echo $form->create('sometool',array('action'=>
$activityname,'type'=>'post'));
        foreach ($activitynode[0]->links->link->inputs->children() as
$formdisplayelements)
        {
                        $type = $formdisplayelements->type;
                        $name = $formdisplayelements->name;
                        $label = $formdisplayelements->label;

                        switch ($type)
                        {
                                case "select":
                                        unset($options);
                                        foreach 
($formdisplayelements->options->children() as
$selectoptions)
                                        {
                                                $options 
[(String)$selectoptions->value] = (String)
$selectoptions->label;

                                        }
                                        echo 
$form->input($name,array('type'=>$type,'label'=>
$label,'options'=>$options));
                                        break;

                                case "date":
                                        echo 
$form->input($name,array('dateFormat'=>'MDY','label'=>
$label));
                                        break;

                                default:
                                        echo $form->input($name, array('type' 
=> $type,'label' =>
$label));
                                        break;
                        }
        }
        echo $form->end('Submit');

?>

</body>
-------------
Any help is appreciated.

Thanks.  Erik

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to