Link to home
Start Free TrialLog in
Avatar of demoniumz
demoniumz

asked on

Html code create one function:

In Html code create one function:
With the use of css code i must write the dimentions for the blocks which are in a drawing area to call it in the function that is in a html.
The informations must to enter in the first control form. When the form is completed and the Change Position button is pressed, if the data entered the corresponding changes are applied.

how can i use the words position_x and position_y in javascript for to specify dimentions ?

Can I change values of css code with javascript in html code and if i can how?

For achieve the above task i will additionally need the setStyle function should be used to change the width and height properties how can i do that?

untitled.bmp
Avatar of demoniumz
demoniumz

ASKER

You can  see the image above   description of what i need to do is above
Hi,

you can send the following Javascript CSS commands:
(You have to find out first how your object is named, in the example below I used the object id 'foo')

document.getElementById['foo'].style.width = 'newWidth';
document.getElementById['foo'].style.height = 'newHeight';

greets, Arjan
Hi,

its actually:

var newWidth  = 15; // or whatever you want or get from the first form
var newHeight = 15;


var item1 = document.getElementById("item1ID");
      item1.style.width  = newWidth + 'px';
      item1.style.height = newHeight + 'px';
anyone to provide more informations..............
What exactly you need to know? Maybe you can post your code here.
i want to to change values of a text and change the shape of the block
this you sent me before but is not working
ASKER CERTIFIED SOLUTION
Avatar of JohnSixkiller
JohnSixkiller
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial