...

View Full Version : Some help for a noob with buttons



Trunkles
09-25-2011, 12:48 AM
There has to be a way to do what I want to do but I'm fugged iif I know how. Here's the problem...

A page has three frames - top, left and disp. Top and left contain a number of buttons that display another page in disp. All the buttons need to behave as one set of radio buttons; when a button is clicked any other button returns to the non-clicked state. The really awkward bit is there's an image in top that changes depending on the currently clicked button and that image is behind the buttons.

Here it is in pseudocode of sorts.


On click button[n]
Button[LastClicked].Image := Button[LastClicked].UnClickedImage;
Button[n].Image := Button[n].ClickedImage;
Top.Image := Button[n].TopImage;
end;I hope that makes sense. :)

If some kind soul has any idea of how to do that I'd be very grateful.

Thanks.

Simon.

Old Pedant
09-25-2011, 01:32 AM
So the buttons show their state? That is, do they change from one color or text or image to another when they are clicked on and thus active?

It would help if you'd show your HTML, even without the JS code.

Trunkles
09-25-2011, 06:40 AM
type BUTTON
string: ImageFileName;
string: ImageFileName;
string: PageFileName;
function ButtonClickHandler(BUTTON: Sender) integer;
end;

function ButtonClickHandler(BUTTON: sender) integer;
integer: i;
begin

end;
array [1..10] of BUTTON: buttons;

Trunkles
09-25-2011, 06:46 AM
type BUTTON
string: ImageFileName;
string: ImageFileName;
string: PageFileName;
function ButtonClickHandler(BUTTON: Sender) integer;
end;

array [1..10] of BUTTON: buttons;

function ButtonClickHandler(BUTTON: sender) integer;
integer: i;
begin
for i := 1 to 10 do
button[i].image :=

end;

Trunkles
09-25-2011, 06:47 AM
Argh! How do I delete the posts. :S

Old Pedant
09-26-2011, 03:38 AM
Could you answer my question??

I think what you want is trivial, but I would *REALLY* like to see the HTML of the page.

Trunkles
09-26-2011, 06:58 AM
Ah... problem is... I haven't written the html yet. 'Cos I know the html isn't going to need Werner Von Braun so I decied to del with the sticky bit first. 90% of the coding takes 10% of the time. ;)

I haven't got all the images yet but I'll try and throw something together this evening and post a link to it on here.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum