Implementing DHTML in WebExpress


 Changewidth script: (for demo click here)

Currently in WebX:

To make this easier in WebX:

To add the setz script:

Paste in the 'detect.js' script.


Name: src
Value: changeheight.js

Add the 'detect.js' script whenever you use a script which acts upon a named DIV element, or when changing width or height.

Import>Scripts>move should create the 'detect.js' script tag and 'changewidth.js' script tag.


Insert an image with a 'name' set.
Hit 'Extensions' and insert 
Name: name
Value: test

Create a link
Hit the 'Extensions' button in the link dialog
Name: onmouseover
Value: changewidth ('test', '400');
Name: onmouseout 
Value: changewidth ('test', '100');


Images should be assigned a name automatically... the image's filename minus the extension.

The 'changewidth' dialog should list all images on the page.  If they are chosen for use with any script they should automatically be assigned a name.

If you use 'onclick' you will have to set the link to 'javascript: void(0);'


Rules/Problems with the 'changewidth.js' script:

This does not work in Netscape.

This script needs the 'detect.js' script but does not need a DIV.


function changewidth (name, width)

//change width of element -name-

{ if (unable) return;

if (DOM) {eval (wholebit + widthbit + ' = "' + width + '"'); return;}

eval (frontbit + name + endbit + widthbit + ' = "' + width + '"');