www.webdeveloper.com

Search:

Type: Posts; User: yearbass

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    13
    Views
    2,842

    criterion9, you're right @argonz, your script...

    criterion9, you're right

    @argonz, your script should be :

    page = document.myForm.page.value;
    or

    page = document.getElementById("page").value;
  2. Replies
    4
    Views
    4,777

    AJAX check this out:...

    check this out: http://blog.fbxphpindonesia.com/dynamicombo/
  3. yes... every form element has type property ...

    yes... every form element has type property


    window.onload = function () {
    var frm = document.getElementById("frm");
    frm.onsubmit = function(evt) {
    evt.preventDefault();
    var reqs =...
  4. Replies
    7
    Views
    1,463

    hmm... its not well tested actualy, i just wanna...

    hmm... its not well tested actualy, i just wanna get random color in a single line of code instead creating a function
  5. Replies
    7
    Views
    1,463

    oops... there was a mistake in my code, it should...

    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);
    ...
  6. Replies
    7
    Views
    1,463

    is d1 always available? i mean it can be use...

    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;...
  7. Replies
    7
    Views
    1,463

    var data = [{ data: d1, label: "Ratings", color:...

    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],...
  8. use document.getElementsByClassName("classname")...

    use document.getElementsByClassName("classname") or
    rootElement.getElementByClassName
    it will return elements (array of element)

    example:
    var els = document.getElementsByClassName("req");...
  9. Replies
    4
    Views
    4,777

    AJAX in edit mode, it's better to let child element(s)...

    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']; ?>";...
  10. Replies
    4
    Views
    1,063

    there was no element named "submit", and what...

    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...
  11. your code: ...

    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:...
  12. Replies
    8
    Views
    3,798

    i've tested the code, and it worked. it just some...

    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"...
  13. Replies
    8
    Views
    3,798

    did you mean you want to pass 2 parameters (type...

    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){...
  14. Replies
    3
    Views
    827

    Ok... no problem, you're welcome :)

    Ok... no problem, you're welcome :)
  15. Replies
    8
    Views
    3,798

    function...

    <script type="text/javascript">
    function populateMeasurements(evt) {
    var qs = 'measurements=' + $F('measurements');
    new Ajax.Request('nameRequest.php',{
    postBody:qs,...
  16. Replies
    3
    Views
    1,658

    the script just show you how to split each...

    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...
  17. Replies
    8
    Views
    3,798

    say that your nameRequest.php returns this json...

    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:
  18. Replies
    3
    Views
    827

    This is my version prova_city.html ...

    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...
  19. Replies
    1
    Views
    1,386

    wrap with function

    wrap with function


    <script language="JavaScript">
    function s1(){
    (function startSearch(){
    // your function body
    })();
    }
    function s2(){
  20. Thread: Dropdown menu

    by yearbass
    Replies
    10
    Views
    1,834

    try to write your code inside window.onload...

    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 =...
  21. Replies
    3
    Views
    1,658

    say that your has id "x", then get the...

    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") {...
  22. Replies
    3
    Views
    2,991

    change function to object var prizes = {...

    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');...
  23. Replies
    3
    Views
    1,669

    maybe helpful: ...

    maybe helpful:
    http://www.4guysfromrolla.com/webtech/100604-1.shtml
  24. Replies
    12
    Views
    6,114

    cool, you made it so simple :) actualy the...

    cool, you made it so simple :)

    actualy the important point only at here

    var validDate = new Date(theYear,theMonth,theDate);
    if (validDate.getFullYear() != theYear ||
    ...
  25. Replies
    12
    Views
    6,114

    great, you're right :) but how about this: ...

    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;
Results 1 to 25 of 171
Page 1 of 7 1 2 3 4
HTML5 Development Center



Recent Articles