Search:
Type: Posts; User: yearbass
Search :
Search took 0.02 seconds.
criterion9, you're right
@argonz, your script should be :
page = document.myForm.page.value;
or
page = document.getElementById("page").value;
check this out: http://blog.fbxphpindonesia.com/dynamicombo/
yes... every form element has type property
window.onload = function () {
var frm = document.getElementById("frm");
frm.onsubmit = function(evt) {
evt.preventDefault();
var reqs =...
hmm... its not well tested actualy, i just wanna get random color in a single line of code instead creating a function
oops... there was a mistake in my code, it should be:
var data = [], color;
for (var i=0; i<d1.length; i++) {
color = "#"+(Math.round(0xffffff * Math.random())).toString(16);
...
is d1 always available? i mean it can be use regardless this code :
var data = [{ data: d1, label: "Ratings", color: "#333"}];
if it seems like that
var data = [], color;
for (var i=0;...
var data = [{ data: d1, label: "Ratings", color: "#333"}];
var d1 = data[0]['data']; // get d1
// your code :
var data = [];
data.push([d1[0], "Ratings", "#0a0"]);
data.push([d1[1],...
use document.getElementsByClassName("classname") or
rootElement.getElementByClassName
it will return elements (array of element)
example:
var els = document.getElementsByClassName("req");...
in edit mode, it's better to let child element(s) remain empty, but assign the retrieved data to a variable. for example :
<script>
var city_id = "<?php echo $dataFromDB['city_id']; ?>";...
there was no element named "submit", and what property of <a> you want to pass to process.php? href? text link? or ??
fyi, "submit" is a bad idea for form element name, pick another one.
some...
your code:
this.options[this.selectedIndex].value
will always return empty string, unless you set value attribute in <option>
echo "<OPTION VALUE=\"\" style=\"background-color: Black;color:...
i've tested the code, and it worked. it just some part of the code.
hmmm.... maybe i have to give you with full html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
did you mean you want to pass 2 parameters (type and measurements) to your nameRequest.php ?
is this useful?
<script type="text/javascript">
document.observe('dom:loaded', function(f){...
Ok... no problem, you're welcome :)
<script type="text/javascript">
function populateMeasurements(evt) {
var qs = 'measurements=' + $F('measurements');
new Ajax.Request('nameRequest.php',{
postBody:qs,...
the script just show you how to split each function within onclick attribute. if you like to get function name with it parameters (then execute it):
var x = document.getElementById("x");
var...
say that your nameRequest.php returns this json string:
[
{'id':'1','name':'text1'},
{'id':'2','name':'text2'},
{'id':'3','name':'text3'}, ...
]
the event handler function might be:
This is my version
prova_city.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html...
wrap with function
<script language="JavaScript">
function s1(){
(function startSearch(){
// your function body
})();
}
function s2(){
try to write your code inside window.onload event.
window.onload = function () {
div = document.getElementById('div');//there is a div with id="div" in the html form
a =...
say that your <a> has id "x", then get the onclick attribute and split afterwards.
var x = document.getElementById("x");
var func = x.getAttribute("onclick");
if(typeof func == "function") {...
change function to object
var prizes = {
prize1:25,
prize2:30,
open:function (){
myRef=window.open('popup.html','mywin','left=20,top=20,width=500,height=500,toolbar=0,resizeable=1');...
maybe helpful:
http://www.4guysfromrolla.com/webtech/100604-1.shtml
cool, you made it so simple :)
actualy the important point only at here
var validDate = new Date(theYear,theMonth,theDate);
if (validDate.getFullYear() != theYear ||
...
great, you're right :)
but how about this:
<script type="text/javascript">
function check_date (d)
{
var strMistakes="";
var datePattern = /^\d{4}-\d{2}-\d{2}$/gi;