Pure PHP Upload 3 Support Product Page
Solved
ApplyServerBehaviour JavaScript error
Reported 29 Jan 2015 15:42:53
1
has this problem
29 Jan 2015 15:42:53 Kim Biledgaard posted:
Does Pure PHP Upload 3 Work with Dreamweaver CC (2014)?I'm trying to use Pure PHP Upload without much success. When I try to apply the behaviour to a page, I get an error message: "While executing applyServerBehavior in Pure PHP Upload 3.htm, a JavaScript error occurred".
After clicking the error mesage away, there is absolutely no sign af Pure PHP Upload code on the page. Nothing is happening at all codewise it seems.
The site is running fine with many other (newer) Dmx extensions.
Best regards,
Kim Biledgaard
Replies
Replied 02 Feb 2015 09:01:12
02 Feb 2015 09:01:12 Teodor Kuduschiev replied:
Hi Kim,
Are you trying to insert the Pure PHP Upload 3 on a page, that contains insert/update record server behavior?
Are you trying to insert the Pure PHP Upload 3 on a page, that contains insert/update record server behavior?
Replied 02 Feb 2015 10:46:52
02 Feb 2015 10:46:52 Kim Biledgaard replied:
Hi Teodor,
No, there is no insert/update record server behavior on the page - at least yet. But it is planned!
There is however a select box linked with a data source. Could that be a problem? I hope not, since the page is to be an upload page for photos of items to be ordered by our customers and it will require a record to be added to a mysql table.
Here below is the text from the so far very simple page, if it is any help to you
I can see and use the Pure PHp Upload dialogbox but as you can see, nothing is not applied to the page. Instead I got the error message.
<?php
session_start();
$r=session_id();
?>
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<title>Biledgaard Profil</title>
<link rel="stylesheet" type="text/css" href="css/profilstyles.css" />
<link rel="stylesheet" type="text/css" href="bootstrap/3/css/bootstrap.css" />
<script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script>
<link rel="stylesheet" type="text/css" href="fontawesome/css/font-awesome.min.css" />
<script type="text/javascript" src="ScriptLibrary/dmxDataBindings.js"></script>
<script type="text/javascript" src="ScriptLibrary/dmxDataSet.js"></script>
<script type="text/javascript">
/* dmxDataSet name "vareliste" */
jQuery.dmxDataSet(
{"id": "vareliste", "url": "dmxDatabaseSources/vareliste_select.php", "data": {"limit": "25"}, "dataSourceType": "database", "dataType": "jsonp"}
);
/* END dmxDataSet name "vareliste" */
</script>
<script type="text/javascript" src="bootstrap/3/js/bootstrap.js"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-lg-12">
<h2>Biledgaard Profil - kundeportal administration</h2>
<p class="bg-primary"><i class="fa fa-wrench fa-2x"></i></p>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<h2>Opload foto</h2>
<form id="uploadfoto">
<table width="500" border="1">
<tbody>
<tr>
<td> </td>
<td><label for="select">Select:</label>
<select name="select" id="select" data-binding-repeat-children="{{vareliste.data}}" data-binding-id="select">
<option value="{{VareNr}}">{{Vare}}</option>
</select></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><label for="fileField">File:</label>
<input type="file" name="fileField" id="fileField">
<input type="submit" name="submit" id="submit" value="Submit"></td>
</tr>
</tbody>
</table>
</form>
<p> </p>
</div>
</div>
</div>
</body>
</html>
No, there is no insert/update record server behavior on the page - at least yet. But it is planned!
There is however a select box linked with a data source. Could that be a problem? I hope not, since the page is to be an upload page for photos of items to be ordered by our customers and it will require a record to be added to a mysql table.
Here below is the text from the so far very simple page, if it is any help to you
I can see and use the Pure PHp Upload dialogbox but as you can see, nothing is not applied to the page. Instead I got the error message.
<?php
session_start();
$r=session_id();
?>
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<title>Biledgaard Profil</title>
<link rel="stylesheet" type="text/css" href="css/profilstyles.css" />
<link rel="stylesheet" type="text/css" href="bootstrap/3/css/bootstrap.css" />
<script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script>
<link rel="stylesheet" type="text/css" href="fontawesome/css/font-awesome.min.css" />
<script type="text/javascript" src="ScriptLibrary/dmxDataBindings.js"></script>
<script type="text/javascript" src="ScriptLibrary/dmxDataSet.js"></script>
<script type="text/javascript">
/* dmxDataSet name "vareliste" */
jQuery.dmxDataSet(
{"id": "vareliste", "url": "dmxDatabaseSources/vareliste_select.php", "data": {"limit": "25"}, "dataSourceType": "database", "dataType": "jsonp"}
);
/* END dmxDataSet name "vareliste" */
</script>
<script type="text/javascript" src="bootstrap/3/js/bootstrap.js"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-lg-12">
<h2>Biledgaard Profil - kundeportal administration</h2>
<p class="bg-primary"><i class="fa fa-wrench fa-2x"></i></p>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<h2>Opload foto</h2>
<form id="uploadfoto">
<table width="500" border="1">
<tbody>
<tr>
<td> </td>
<td><label for="select">Select:</label>
<select name="select" id="select" data-binding-repeat-children="{{vareliste.data}}" data-binding-id="select">
<option value="{{VareNr}}">{{Vare}}</option>
</select></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><label for="fileField">File:</label>
<input type="file" name="fileField" id="fileField">
<input type="submit" name="submit" id="submit" value="Submit"></td>
</tr>
</tbody>
</table>
</form>
<p> </p>
</div>
</div>
</div>
</body>
</html>
Replied 02 Feb 2015 13:11:27
02 Feb 2015 13:11:27 Teodor Kuduschiev replied:
The problem is caused because your form doesn't have a name. It only has an ID and the Pure PHP Upload 3 checks for the form name attribute. Please add a name to your form and the problem will be fixed.
Replied 02 Feb 2015 13:53:35
02 Feb 2015 13:53:35 Kim Biledgaard replied:
Hi Teodor.
You nailed it! i never thought of the missing name as a problem because I could select the form from the Pure PHP Upload dialog.
Now it works perfectly. And with Image Processor PHP I can also create thumbnails.
Thank you for your help.
Best regards,
Kim Biledgaard
You nailed it! i never thought of the missing name as a problem because I could select the form from the Pure PHP Upload dialog.
Now it works perfectly. And with Image Processor PHP I can also create thumbnails.
Thank you for your help.
Best regards,
Kim Biledgaard