PD editor insert-image

15664 Users read it.
by Marcellino Bommezijn (November 27, 2001)
This tutorial will show you how to add an insert image and pre-view function to your PD html editor.

User Rating (34 votes)
12 reviews available | Read the reviews »
User Level:Beginner
Product:Dreamweaver 3, Dreamweaver 4, Dreamweaver MX, Dreamweaver MX 2004, UltraDev 1, UltraDev 4
Server Model:ASP VBScript
Browser:All
Technologies:JavaScript

This tutorial will show you how to add an image insert and pre-view feature in the PD on-line HTML editor.

It assumes that you have some basic knowledge of making a file upload page using the PureASP File Upload extension and making a list/menu dynamically.

First of all you need to make a upload page to get the images to the server and storing them in the database with a description and the filename (picture.jpg).

After this create a recordset within the PD on-line HTML editor page (NOT pd_edit.htm) for this image-upload table and select the description and filename.

Now you will have to find some place in the editor to insert the following:

  • hiddenfield
  • menu
  • Add button
  • new browser window
  • Pre-view button

Something like this:

The hiddenfield:

This field will hold the path as value to the directory where you have uploaded your images. We will name this field 'prefix'.

example:

<input type="hidden" name="prefix" value="http://www.domain.com/Images/">

The dynamic menu:

Create a menu and call it 'imagebank'.

<select name="imagebank"> </select>

I had the problem that Ultradev didn't let me insert a dynamic list/menu within the HTML editor page (?), so i had to create a empty document and inserted the same recordset, a list/menu and then applied the dynamic menu. After this i copied/pasted the code from the page to the HTML editor page. This code is easy to find, it resides between the <select> </select> brackets of the list/menu.

So, create the dynamic list/menu and select the appropiate recordset and list/menu. Select get labels from the description field, get values from the filename field and select value equal to the filename field.

 

 

 

 

Marcellino Bommezijn

Marcellino BommezijnMarcellino Bommezijn is one of the managers at dmxzone.com. He is a contributor on the tutorials section.

Owner of Senzes Media (http://www.activecontent.nl) which provides professional services and web applications for mid-sized companies.

ActiveContent CMS is the ASP.NET Content Management solution that is used for building professional and rich-featured websites.

See All Postings From Marcellino Bommezijn >>

User Reviews

Total of 12 reviews
Tables
Written by Werner BH on March 11, 2003

Hey, cool, now is there a way to add tables with PD Editor?

RE: Align Image?
Written by f b on October 4, 2002

I'm just a beginner but hope this helps. Insert another pull-down menu named eg. 'imgalign' (values 'left', 'right', 'default'), then another one called 'border' (values '0', '1', ect). Let's say that 'imagebank' is the name of the images menu. Then ...

RE: Image Alignment????
Written by Marcellino Bommezijn on September 17, 2002

Sample code for alignment in the editor can be viewed at: http://www.mm-ultradev.com/alignimage_pdeditor.txt

Image Alignment????
Written by vu vt on September 16, 2002

Does anyone know how to add the image alignment feature to the PD editor? ???

RE: Thanks
Written by Ahead4 TODAY on May 29, 2002

Thanks, great enhancement...but if i close the preview window then i get a error message if i try to make a preview again !? thanks for that notice volcan

Preview Button
Written by Jazzie Jaz on May 24, 2002

I was having trouble with the preview button so instead of adding an extra html file I just added this to the preview button: <input type='button' name='viewimage' value='Pre-view' ...

Thanks
Written by pc pete on April 3, 2002

Uploading Images was the only thing I thought was missing from the HTML Editor...I thought I was going to have to do it myself! Thanks for your effort in this; its much appreciated. Pete.

RE: Style sheets?
Written by Marcellino Bommezijn on March 2, 2002

Try to apply your stylesheet to the page 'pd_edit.htm' and see what happens.

Follow us on twitter Subscribe to our RSS feed
Activate your free membership today | Login | Currency