steff Posted April 28, 2005 Share Posted April 28, 2005 I've been trying to add a (e-mail list) form to my text_main filed, but it won't work. Alternative 1: To add a file called form.html with some kind of php include. Tried to add <?php include("menu.inc"); ?> between my <td> and </td> in text_main, but the html file never got included. No error msgs. Alternative 2: To add the HTML code to text_main field. This returns an error (se code below). My text main code in index.php: define('TEXT_MAIN', ' <table width="465" border="0"> <tr> <td class="main"> I have tried to add it here, but then it outputs "TEXT_MAIN" </td> </tr> </table> '); Form to add: <form name="txtlist" action="./index.php" target="txtlist" method="get" onSubmit="JavaScript:window.open('','txtlist','width=300,height=150,toolbar=no,status=no,resizable=no')"> <table border="0" cellpadding="4" cellspacing="0" bgcolor="#efefef" style="border: #dedede 3px double;"> <tr><td> <input type="hidden" name="type" value="sub"> <input type="text" name="email" value="email address" size="20" maxlength="100" onFocus="if (this.value=='email address') this.value=''" onBlur="if (this.value=='') this.value='email address'"> <input type="submit" name="sub" value="subscribe"> </td></tr> </table> </form> I tried putting a \ in front of all ' -but that didn't work. Any ideas for how I can make this work? Link to comment Share on other sites More sharing options...
Wendy James Posted April 28, 2005 Share Posted April 28, 2005 Are you adding this to the language file, or directly onto the index.php? Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep. Link to comment Share on other sites More sharing options...
♥Vger Posted April 28, 2005 Share Posted April 28, 2005 Place your html file in the root level. Then make this change to your root level php file: <td class="main"><?php include ('newpage.html'); ?></td> Don't forget to remove the call to the file at the 'languages' level, in the head section of your root level php file e.g. require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); Vger Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted April 29, 2005 Share Posted April 29, 2005 if you need some thing more flexible, this contribution has examples and explains how to include html as well as create popup windows in a multi-language setup: http://www.oscommerce.com/community/contri...ch,include+html KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
steff Posted April 29, 2005 Author Share Posted April 29, 2005 Are you adding this to the language file, or directly onto the index.php? <{POST_SNAPBACK}> to the language file .. catalog/includes/languages/english/index.php Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.