Hi There,

I just started with protype and am really liking the concept.  I am
particularly using it to create my ajax requests to update my mysql DB
of form information.  Previously i used AJAX xmlHTTPrequest through
creating the function myself.  To conclude I had major cross-browser
issues. So i wanted to try something easier.

However, (gee my luck) i am having problems of my own implementing
Protoype's Ajax.request into my code.  I would like to send a couple
of post variables to a server side script to be inserted into a db.

here is my code:

function course_sec_id()
                var securityID = document.getElementById('secid').value;
                var course = document.getElementById('Name').value;
                var cInst = document.getElementById('cIns').value;
                var queryString = "secid=" + securityID + "&Name=" + course +
"&cIns=" + cInst;

                    var url = 'courseSecIdUpdate.php';
                        //call ajax object from Protoype.js for ajax request
                        new Ajax.Request(url,
                                method: 'post',
                                parameters: queryString,
                                onSuccess: function(transport)
                                        if(transport.status != 200)
                                onFailure: function(transport1)
                                        alert('Did not work');


Well the form sends the data.  However, the data does not get updated
into the DB to make matters short. I checked the server side script
and it is fine since it also worked before.  So Im sure it has
something to do with my javascript code.

Also this is where I call the javascript function:

<form action="trainingformSubmit.php" onsubmit="course_sec_id();"
name="trainingForm" method="post" id="trainingForm">

Help would be wonderful :D

I am a newb, so if a made a mistake plz go easy on me :) .

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to