Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22
  1. #16
    New Coder
    Join Date
    Mar 2007
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i got it working

    with document.aform.type.value but unafraid i cant call the ajax from any ather way then that way.. we i must live with that

    thnx for the help

  2. #17
    Senior Coder
    Join Date
    Nov 2006
    Posts
    1,000
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Grats and welcome. :) I'm not total sure what you mean by "unafraid i cant call the ajax from any ather way then that way".

    But just in case it is useful, you could also get the form with

    alert(document.forms['aform'].type.value);
    alert(document.getElementById("aform").type.value);

    which would let you do send the name in as a parameter to a function.

    Code:
    function showUser(str, frm)
    {
    .
    .
    .
    url=url+"&type=" + document.forms[frm].type.value;
    .
    .
    .
    }
    david_kw

  3. #18
    New Coder
    Join Date
    Mar 2007
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by david_kw View Post
    Grats and welcome. I'm not total sure what you mean by "unafraid i cant call the ajax from any ather way then that way".

    But just in case it is useful, you could also get the form with

    alert(document.forms['aform'].type.value);
    alert(document.getElementById("aform").type.value);

    which would let you do send the name in as a parameter to a function.

    david_kw
    i would also like to (im dreaming:P) call it also true $_GET or $_POST

    but then i cant use a form or define it like a form

    on anther page i use AJAX just on variable ( $var) and there i can also get the variable from $_GET so i can use both..

    i dont now if u got fast a solution for that..?

  4. #19
    Senior Coder
    Join Date
    Nov 2006
    Posts
    1,000
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Actually I'm not sure what you mean. $_GET and $_POST are in PHP which is serverside. If you want something dynamic in Ajax then I'd think the serverside variables would not have the values you need.

    david_kw

  5. #20
    New Coder
    Join Date
    Mar 2007
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    $proj = $_GET['project'];
    if( isset( $proj ) )
    {
    echo"<script type=\"text/javascript\">showUser('" . $proj . "');</script>";
    }

    did i make for another page and now can i call the ajax true a form and true index.php?pagina=projecten&project=OCV25-1 project=OCV25-1

    so there i use $_GET.. and then call AJAX...

    but now the javascript needs document.aform.type.value and i cant fake that true an form

    im not very good with javascript so maybe its very easy and i dont see how i can do it..

    if its hard to make just forget it my boss is already happy the way it is right now

  6. #21
    Senior Coder
    Join Date
    Nov 2006
    Posts
    1,000
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So what value is actually in $_GET['project']?

    Or what is the exact URL including the query?

    I still don't see why the page can't be built without ajax if you are going to do it that way, but it should be able to be done. Is that value the name of the form?

    david_kw

  7. #22
    New Coder
    Join Date
    Mar 2007
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    the value of $_GET['project'] is on project of mine company like OCV25-1 or ESH01 or thinks like that.

    the url is than

    index.php?pagina=projecten&project=OCV25-1

    $pagina is the variable for the page i call and $project = the project is want to see

    then i use the code above to call the ajax and see the page with ajax.

    the problem is that i got (where u helpt me above here) the ajax ( or ecxtualy js) ask for a document.aform.type.value and document.aform.weekid.value witch i cant fake or create/call with out having to press or change somethings

    i will try to explain it next week better.. but now i got some other thinks to do that have more priority

    thnx again for the support


 
Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •