xajax and radio buttons
to display a group of choices to select-only-one as radio buttons, the name and id parameters must be the same for all <input>.
the html code:
Code:
<input type="radio" name="option" id="option" value="1" onclick="xajax_click(this.value);" checked />option 1<br /> | |
<input type="radio" name="option" id="option" value="2" onclick="xajax_click(this.value);" />option 2<br /> | |
<input type="radio" name="option" id="option" value="3" onclick="xajax_click(this.value);"/>option 3<br /> |
to pass the value of radio button to xajax function, use this.value. not this.checked, as the value is always true when it’s clicked.
the xajax function:
PHP:
function click($value) { | |
$x = new xajaxResponse(); | |
switch ($value) { | |
case 1: | |
//do something | |
break; | |
case 2: | |
//do something | |
break; | |
case 3: | |
//do something | |
break; | |
} | |
} |
2008-10-24 10:28:53 • Link • Comments • Trackbacks
html to bbcode converter
Categories: html, smf, bookmark
Tags: bbcode. forum, html
2008-10-18 01:28:49 • Link • Comments • Trackbacks
drag and drop
Categories: javascript, html, bookmark, free
Tags: drag and drop, free, javascript
i was looking for drag and drop functionality / components for websites and found this javascript based library.
it seems easy for simple implementation. just download the file and follow 4-step instructions.
however fore more advanced / complicated implementation, knowledge of javascript is required. (my weakest link…) it’d be nice if i can find a php-based code. probably will have to implement this with xajax to avoid javascripts…
2008-07-17 12:55:23 • Link • Comments • Trackbacks
dreamweaver in firefox
Categories: html, firefox, addons, free
codetch is a free, open source source code editor.
the description at it’s download page says Get the feel of Dreamweaver in a Firefox extension.
i’ve never used dreamweaver and i can’t comment on that.
imo, this is a very primitive editor. knowledge of html is required.
2008-06-26 14:58:33 • Link • Comments • Trackbacks
html: tab char
Categories: html
Tags: tab
there is no tab character in html.
if you need to indent text on your web page like you do with tab in word processors, this can still be achieved.
prefix the text with the required number of space char .
or
use css. define the left margin.
2008-06-24 16:42:49 • Link • Comments • Trackbacks
