Error while trying to Create a Static Page in Zen Cart in windows - zen-cart

am currently learning zencart , i am trying to create a static page on my zencart template using the link provided in justins zencart , The problem is when i execute the page in ubuntu operating system with lamp server i am able to get the page with all the details , but when i try to execute the same page in windows7 operating system with easyphp , i get the following error
trail(BREAD_CRUMBS_SEPARATOR); ?>
'; ?>
, any help regarding this will be grateful
The code that shows the above error is
<table width="100%" border="0" cellspacing="2" cellpadding="2"> <tr><td class="breadCrumb"> <?= $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?> </td></tr> <tr><td class="pageHeading" align="center"> <h1><?= HEADING_TITLE; ?></h1> </td></tr> <tr><td class="main"> <?= TEXT_INFORMATION; ?> </td></tr> <tr><td class="main"> <?= zen_back_link() . zen_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?> </td></tr> </table>

If you are seeing that information output in the HTML, then it means your PHP file is damaged, or you've added a closing ?> tag someplace where it doesn't belong. It shouldn't be outputting PHP code directly.

Related

Internet Explorer form submit with target to iframe not working

I'm using the hidden iframe method of submitting files without loading a new page, and it works on every browser except Internet Explorer, which is strange coming from an otherwise top-notch browser.
The form and iframe look like this:
<iframe id="hidden_upload" style="display:none" src="" name="hidden_upload" ></iframe>
<form class="" action="upload.php" method="post" target="hidden_upload" enctype="multipart/form-data" id="uploadForm">
<table>
<tbody>
<tr>
<td><label for = "title">Title: </label></td>
<td><input type="text" name="title" id="title" maxlength="40" style="width:300px;"/></td>
</tr>
<tr>
<td><label for="description">Description: </label></td>
<td><textarea id="description" name="description" style="width:460px;height:135px;"></textarea></td>
</tr>
<tr>
<td><label for="file">File: </label></td>
<td><input type="hidden" name="MAX_FILE_SIZE" value="3145728" /><input id="file" type="file" name="file"/></td>
</tr>
</tbody>
</table>
<center><input type="submit" value="Upload" id="filesubmit" onclick="return submitting()"/></center>
</form>
I have another page that DOES work in IE, with no discernible differences in the doc type, or form and iframe structure.
It's also not the headers from the upload page because I tried setting the action of the working form to the upload page of the non-working one and it still worked in IE.
The function submitting is working an returns true.
edit:
For the sake of brevity, this isn't working either:
<form class="" action="upload.php" method="post" target="hidden_upload" enctype="multipart/form-data" id="importForm">
<input type="submit" />
</form>
<iframe id="hidden_upload" style="display:none" src="" name="hidden_upload" ></iframe>
edit: This is completely ridiculous. I copied the working page verbatim into the non-working page and it still didn't work. The ONLY difference was the directory, and the .htaccess files were identical.
I had this problem and after many attempts, it was solved only as explained here:
"http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/"
basically, iframe needs to be created this way:
iframe = document.createElement('<iframe name="fileUploaderEmptyHole">');
I also found out frame names for current window are stored in window.frames. In IE11, the property .name is empty for all iframes in windows.frames :O
I manually fixed like:
for(i=0;i<window.frames.length;i++)
window.frames[i].name = window.frames[i].frameElement.name;
Then, you can get to frames using target name.

Error occuring related to build path in eclipse for Spring MVC application

I am building MVC CRUD application. In JSP file I got this error
The tag handler class for "fmt:message"
(org.apache.taglibs.standard.tag.rt.fmt.MessageTag)
was not found on the Java Build Path
Here is my JSP file at the line "fmt:message"
<%# include file="/WEB-INF/jsp/include.jsp" %>
<%# taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
<title><fmt:message key="title"/></title>
<style>
.error { color: blue; }
</style>
</head>
<body>
<h1><fmt:message key="addprod.heading"/></h1>
<form:form method="post" commandName="addprod">
<table width="95%" bgcolor="f8f8ff" border="0" cellspacing="0" cellpadding="5">
<tr>
<td align="right" width="20%">Add a new Product: (Please enter ID for the new product) </td>
<td width="20%">
<form:input path="productID"/>
</td>
<td width="60%">
<form:errors path="productID" cssClass="error"/>
</td>
</tr>
<tr>
<td align="right" width="20%">Add a new Product: (Please enter name for the new product) </td>
<td width="20%">
<form:input path="productname"/>
</td>
<td width="60%">
<form:errors path="productname" cssClass="error"/>
</td>
</tr>
<tr>
<td align="right" width="20%">Add Price: (Specify price in number) </td>
<td width="20%">
<form:input path="productprice"/>
</td>
<td width="60%">
<form:errors path="productprice" cssClass="error"/>
</td>
</tr>
</table>
<br>
<input type="submit" align="center" value="Add">
</form:form>
Home
</body>
</html>
Kindly guide me how to solve it. I added all the jars related, But could not understand the error exactly. Thanks
I see two potential problems.
Regarding the specific error you're seeing, you need to ensure
the appropriate tag library is on your build path. In Eclipse,
right-click your project and select "Properties". In the dialog that
pops up, select "Java Build Path". The window should display tabs
representing the various kinds of libraries you can add to your
project. One of those tabs should list the "JSTL" library--my
projects, for instance, use jstl-1.2.jar. If you don't see it in
any of the libraries on your build path, you may need to add it
manually by copying it to your project's external library folder and
adding the JAR manually to your build path.
See: http://wiki.eclipse.org/FAQ_How_do_I_add_an_extra_library_to_my_project%27s_classpath%3F for more info.
After you add the library to your build path, you still have to
make sure that the tags it contains are available to your specific
JSP. In your example, you have:
<%# taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
That allows you to use Spring's form tag library in your current JSP. I do not see a similar declaration for the fmt library, which I would expect to look something like:
<%# taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
It's possible that you've got that in your include.jsp file; if so you should be fine.
Hope this helps.

form get method not working in opera browser

Why forms submited using get method is not working in opera browser?
<form method="get" action="">
I am submiting to same page
<form method="get" action="">
<table class="search_form_table" width="428" cellpadding="0" cellspacing="0" border="0" >
<tr>
<td width="150">Order Number</td>
<td><input name="order_number" /></td>
</tr>
<tr>
<td>Start Date</td>
<td><input class="search_date_fields" name="date_from" /> End date : <input class="search_date_fields" name="date_to" /></td>
</tr>
<tr>
<td colspan="2" align="right"><input class="subimit_button search_button_width" type="submit" value="Submit" /></td>
</tr>
</table>
</form>
If this is the same problem I thought I had, it's not that GET doesn't work. It's because the browser hides the form name/value pairs in the query string in the Location bar. If you actually go to the location bar and hilite the URL that you submitted to, you'll see the form parameters in the query string. I hate this, but it is the way Opera does it. :-/
submitting GET forms certainly works in Opera. Copying this code to a file and submitting it creates exactly the same URL as in Chrome. Hence, your problem must be something else. Without more information it's impossible to tell what your problem really is.

IOS 5 - UIWebView duplicating requests to Rails server

I have a IOS 5 application that uses a Webview which shows some HTML received from the server.
The HTML has a form and a submit button.
The backend is a RoR 3 server.
When I click the submit button it is sending two duplicate requests to the server.
If I test the same HTML in a browser it does not send duplicate requests.
Any ideas? It is inserting two records in the DB. I want a good solution , not an unique index in the DB.
The HTML code of the page is very simple:
<html>
<body>
<div class="user_questions">
<form accept-charset="UTF-8" action="http://localhost:3000/questions/actions/sendQuestion" method="get">
<div style="margin:0;padding:0;display:inline">
<input name="utf8" type="hidden" value="✓" />
</div>
<table>
<tr>
<td>
<a href="http://localhost:3000/questions/41/voteup?user_id=10&lesson_id=7&deviceName=iPhone&origin=user">
<img alt="Up" src="http://localhost:3000/assets/up.gif" />
</a>0
<a href="http://localhost:3000/questions/41/votedown?user_id=10&lesson_id=7&deviceName=iPhone&origin=user">
<img alt="Down" src="http://localhost:3000/assets/down.gif" />
</a>
</td>
<td>
Question 1
</td>
</tr>
<tr>
<td colspan="2">
<input id="userQuestion" name="userQuestion" type="text" />
</td>
<td>
<input name="commit" type="submit" value="Send" />
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
It is generated on the server and sent to the App via REST/Json, then setted to the webview using [webView loadHTMLString:htmlQuestions baseURL: nil];
Thanks

Classic ASP on Localhost, no form data?

I have a really odd situation going on on my local PC that I can not seems to resolve.
Recently I have been contacted to extend a classic ASP website that I wrote a few years back. I unpacked the code into a sub folder of wwwroot on my current machine running XP pro. It has never had any classic ASP sites running on it. I set up IIS and create an application and run the website on my localhost. The site renders correctly and appears to run fine. Except one thing... The post data seems to get lost.
I have entered Response.Write("[" & Request.Form & "]") at the top of one of my pages and just renders "[]". Can any one advise as to why I may be losing the form data? The website used to work fine on my last machine running XP Pro, as that is the machine I developed it on. What have I forgotten to set up?
The html form code looks like
<form name="frmAdminLogin" actionAdminLogin.asp" method="post" >
<input type="hidden" name="hidFormAction" value="frmAdminLogin" >
<table width="80%" border="0" cellspacing="3" cellpadding="0" >
<tr>
<td width="40%" align="right" valign="top" >Username: </td>
<td width="60%" align="left" valign="top" >
<input type="text" name="txtUsername" value="" size="25" maxlength="25" tabindex="1" class="TextBox" >
</td>
</tr>
<tr>
<td width="40%" align="right" valign="top" >Password: </td>
<td width="60%" align="left" valign="top" >
<input type="password" name="txtPassword" value="" size="25" maxlength="25" tabindex="2" class="TextBox" >
</td>
</tr>
<tr>
<td width="100%" colspan="2" align="center" valign="top" >
<input type="submit" name="btnLogIn" value="Log In" tabindex="3" class="Button" >
<input type="reset" name="btnReset" value="Reset" tabindex="4" class="Button" >
</td>
</tr>
</table>
</form>
It appears that it is not an IIS issue after all but an Internet Explorer issue. The post data is present when I use Opera Browser.
I think this is correct - there is some bug (feature?) of Internet Explorer which prevents form data being submitted if there is only a single form element. If you add a extra element (hidden field, it really doesn't matter) it should work properly.
I'll try to expand this comment when I get a chance but my work firewall is preventing my finding the blog posts which originally pointed me in the right direction.