Disabling option buttons using script

B

Brent

How do I disable an option button in FrontPage 2003 using Change Property
script. Where is a detailed description of the Propoerty Name/Property Value
and behaviors of these?
 
S

Stefan B Rusynko

Explain clearly what you are trying to do
- What option button (in a form, in FP)?
 
M

Murray

Jon:

How would that look? I thought that in order to make a field/element
disabled, you'd need to actually include the disabled attribute, e.g.,

<input disabled="disabled"....>

(the attribute needs a value to validate)

Same thing would go for readonly, right?
 
J

Jens Peter Karlsen[FP MVP]

Give the button an ID and use that to address it. You can then hide it.
In the change property dialog you can see what options you have for the
selected element.
You can also read http://www.w3.org/DOM/
Warning very dry reading.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
J

Jon Spivey

Validation isn't an issue here because we're using script to disable the
button. Like this
1/ Insert a link or whatever to attach the behavior to
2/ Insert a radio button and give it an id so we can address it
3/ Click on the link - Format behaviors - Change Property - Add - Name:
Disabled Value:true
and we'll end up with something like this
<a href="javascript:;"
onclick="FP_changeProp(/*id*/'TheButton',0,'disabled','true')">link</a>
<form.........>
<input type="radio" value="V1" id="TheButton" checked name="R1">

Of course you could also add another behavior to un-disable the radio - ie
disabled:false
 
M

Murray

By validate, I meant in the W3 sense! 8)

And when you said "Name" I read that as the name of the element not the name
of the style. Sorry.

So - I thought you were going for something like -

<input name="disabled"....

Thanks for the example - that's clear now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top