View Full Version : Need hepl with commenting pictures
broken creations
01-08-2007, 04:02 PM
I am creating a photo gallery for my companies web site. I amnot fluent in JS so I am still struggling. I have got a image gallery template that I created and modified that came from Photoshop CS2. The question I have is there is a section to leave feedback on the image but once the browser is closed down and reopened there is no comments on the images. How do I make sure the comments stay when the page is closed?.
Here is the code I beleave...
<td width="50%"><input name="Save" type="button" class="button" onClick="top.BottomFrame.addComment('116282928-M.jpg')" value=" Save Feedback "></td>
Please help
austriaka
01-08-2007, 04:15 PM
what is the source code of BottomFrame? Is addComment() executed there with writing the comment into database?
KArin
broken creations
01-08-2007, 06:20 PM
Like I said Im not great with code, and I cant find wherethe comments are suppose to be saved at if there is even a DB to put them in, here is the full form code
<div class="feedback">
<form name="wpgFeedback">
<table width="400" border="0" cellspacing="4" cellpadding="0">
<tr>
<td colspan="2"><input type="checkbox" name="approved" align="absmiddle" onClick="top.BottomFrame.setAsUnsaved();">
<span class="checkBoxText">Approved</span> <input type="checkbox" name="other" align="absmiddle" onClick="top.BottomFrame.setAsUnsaved();">
<span class="checkBoxText">Other</span><span class="userAlert"><img name="saved" src="../images/spacer.gif" width="50" height="16"></span></td>
</tr>
<tr>
<td height="10" colspan="2"><textarea name="comments" style="width:100%; height:80px;" class="caption" onChange="top.BottomFrame.setAsUnsaved();"></textarea></td>
</tr>
<tr>
<td width="50%"><input name="Save" type="button" class="button" onClick="top.BottomFrame.addComment('116282928-M.jpg')" value=" Save Feedback "></td>
<td width="50%"><input name="Remove" type="button" class="button" onClick="top.BottomFrame.removeFeedback('116282928-M.jpg')" value=" Remove Feedback "></td>
</tr>
<tr>
<td colspan="2"><input name="Email" type="button" class="button" onClick="top.BottomFrame.sendFeedback('116282928-M.jpg')" value=" E-Mail Feedback "></td>
</tr>
</table>
</form>
</div>
Dennis
01-09-2007, 06:04 AM
does this have anything to do with pixelpost??
austriaka
01-09-2007, 06:14 AM
The code you gave is only the form, not the working functions.
You cannot save Comments using JavaScript. JavaScript is a clientside scripting language; everything you do in JavaScript only has effect in users browser and not on server.
To save things like comments, basic JavaScript is not really adequate. This is the reason why I asked for the source code of BottomFrame (there must be a html file BottomFrame points to, and in this Frame? there must be defined some JavaScript functions like addComment() or sendFeedback().
These function must run something serverside, otherways you have no chance to save comments to database.
Without showing the source code we cannot help you.
And as Schonhose wrote: where is the connex with Pixelpost?
(I supposed you did the gallery with PP and just wanted to display the thumbs & comments within the company site, but when rereading your first post, I cannot see what exactly you are doing)
KArin
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.