ajax doubt




Name: Time:
this is jus a prog in ajax to check if the username and password are correct???
i jus don get the three lines below:

var url="time.php";
url=url + "?q=" + y ;
url=url + "&sid =" + Math.random();

x.open("GET", url , true);
x.send(null);

how is q assigned the correct value??? of y and wht ll be the variable url while sending??

also i need to attach one more value to the url, it is z here..

in the php code, the stmt
$n=$_GET["q"];
exactly retrieves the value of q and assigns it to n...

so jus say what does that ? and = mean and how they are assigned

thnx in advance

Replies

  • sriramchandrk
    sriramchandrk
    Hi gijoe,

    This is the line which reads value of name in y
    var y=document.myform.na.value;

    When you click a submit ajaxfunction is called.

    if you write "crazyengineer" in input filed the url formed will be


    #-Link-Snipped-#

    sid will have a random number this is just to take care that each time a new url is produced or else there may be a possibility that browser cache will give old values!

    Thanks & Regards
    Sriram

You are reading an archived discussion.

Related Posts

CEans, Could you please recommend a 'good' recruitment agency with which we can tie-up for latest job openings in the engineering industry? Please post their contact details in this thread...
CEans, How nice if we could have professors recommending CE to students as well as themselves interacting with students through CE Forums? You can help CE achieve that. We request...
i have a problem with my laptop. it always shows an error like" the procedure entrypoint getprocessimagefilenamew couldnot be located in the dynamic link library PSAPI.DLL. somebody told me that...
We request you to take a minute to read this short article before you post on CE Forums. For all questions related to this site, visit: -> New Members' Joint...
Hey guys!!! this is banshee here. I'm kinda new to this so go easy on me............. I luv engineering but am crap at it so........... here's my attempt at clearing...