Exemplo n.º 1
0
void HtmlCheckBox::renderAttributes(HtmlWriter &writer)
{
	ControlBase::renderAttributes(writer);

	writer.writeAttribute(_S("type"), _S("checkbox"));

	if(getCheck())
		writer.writeAttribute(_S("checked"), _S("checked"));

	if(getAutoPostBack())
		writer.writeAttribute(_S("onchange"), _S("javascript:return osAutoPostBack(this);"));
}
Exemplo n.º 2
0
void IHtmlSelect::renderAttributes(HtmlWriter &writer)
{
	ControlBase::renderAttributes(writer);

	if(hasID())
	{
		writer.writeAttribute(_S("id"), getTarget());
		writer.writeAttribute(_S("name"), getTarget());
	}

	if(getEventChange()->empty() == false)
		writer.writeAttribute(_S("onchange"), getEventCommand(EVENT_ONCHANGE));
	else if(getAutoPostBack())
		writer.writeAttribute(_S("onchange"), _S("javascript:return osAutoPostBack(this);"));	
}