[thelist] help need in text populted
Dan McCullough
dan.mccullough at gmail.com
Fri Jun 23 10:37:02 CDT 2006
Does that work for you?
On 6/23/06, Dan McCullough <dan.mccullough at gmail.com> wrote:
> Okay this is a really quick hack.
>
> <script src="js/prototype.js" type="text/javascript"></script>
> <script src="js/scriptaculous.js" type="text/javascript"></script>
> <script type="text/javascript">
> function getPatientInfo()
> {
> var PatNum = $F('PatientNo');
> var url = 'http://localhost/TextBlur.asp';
> var pars = 'pn=' + PatNum;
> var myAjax = new Ajax.Request( url, { method: 'get', parameters:
> pars, onComplete: showResponse });
>
> }
>
> function showResponse(originalRequest)
> {
> myArray = originalRequest.responseText.split('|');
> $('FirstName').value = myArray[0];
> $('MidName').value = myArray[1];
> }
> </script>
>
> Your HTML form should have the input fields with id="FirstName" and
> match the $("FirstName") and so on. Also you will need to download
> the scriptaculous.js library for this to work. Lastly your asp output
> needs to be delimited, like <FirstName>|<MidName>|...
>
> As a disclaimer I dont work with AJAX and ASP so I dont know if there
> are ASP and AJAX specific libraries that are better, also this is my
> approach and this is not the only way to implement AJAX and possibly
> isnt even the best. So what I am saying is that there are other ways
> and other AJAX specific ways to accomplish this.
>
>
>
>
> On 6/23/06, Dan McCullough <dan.mccullough at gmail.com> wrote:
> > I take it you dont want the person to have to submit a form to get the
> > form to populate. If thats the case then look into something like
> > Ajax.
> >
> > There was a very simple demo for this I'll see if I can find it.
> >
> > On 6/22/06, shan yuan <lotusqu at yahoo.com> wrote:
> > > I am wondering if you would help me with this?
> > >
> > > I am using _vbscript or _javascript with asp to doing web application.
> > > In the form(TextBlur.asp), first time you have to put PatientNo and patient last and first name, mid name information by type. After push submit button, these four fields data send to database table named tblTextBlur.
> > > Ever since then when you come to filling this form, you want after you typed PatientNo, the rest three fields will automatical populated.
> > > How can you complete it?
> > > Appreciated!
> > >
> > > tblTextBlur
> > > UniqueID PatientNo LastName FirstName MidName
> > > 1 C21192-01 Martin Charles H.
> > > 10 21201-01 Tolbert Jimmie L.
> > > 2 C21192-01 Martin Charles H.
> > > 3 21167-01 Stepherson Ronald
> > > 4 C21194-01 Richardson Keith B.
> > > 5 21183-01 Dupra Ann S.
> > > 6 21163-02 Lindemuth Randall S.
> > > 7 21184-01 Sobelson Glenn M.
> > > 8 C21180-01 Mitchell Polly M.
> > > 9 C21187-01 Joseph Etzer
> > >
> > > in the tblTextBlur, UniqueID is auto number, the rest are text.
> > >
> > >
> > > <html>
> > > <head>
> > >
> > >
> > > <title>Text Blur Testing</title>
> > > </head>
> > >
> > > "#000000" leftmargin=0 topmargin=0 marginheight="0" marginwidth="0">
> > > <form actionfiltered="/TextBlur.asp" method="post" name="TestBlur">
> > > <div align="center">
> > > <table border=0 cellspacing=0 cellpadding=2 width="641">
> > >
> > >
> > > <tr>
> > > <td bgcolor="#eeeeff" width="251"><font face="arial, helvetica" size=2><b>Unique ID</font></B></td>
> > > <td width="379"><input size=20 maxlength=30 name="UniqueID" value="<%=UniqueID%>"></td>
> > >
> > > </tr>
> > >
> > > <tr>
> > > <td bgcolor="#eeeeff" width="140"><font face="arial, helvetica" size=2><b>Patient No</font></B></td>
> > > <td><input size=20 name="PatientNo"></td>
> > > <td bgcolor="#eeeeff" width="189"><font face="arial, helvetica" size=2><b>Last Name</font></B></td>
> > > <td><input type="text" size=20 maxlength=30 name="LastName" value="<%=LastName%>"></td>
> > > </tr>
> > > <tr>
> > > <td bgcolor="#eeeeff" width="140"><font face="arial, helvetica" size=2><b>First Name</font></B></td>
> > > <td><input type="text" name="FirstName" value="<%=FirstName%>"></td>
> > > <td bgcolor="#eeeeff" width="134"><font face="arial, helvetica" size=2><b>Mid Name</font></B></td>
> > > <td width="134"><input type="text" size=20 name="MidName" value="<%=MidName%>"></td>
> > > </tr>
> > >
> > >
> > > <tr><td><br></td></tr>
> > >
> > >
> > > <tr align=middle>
> > > <td colspan=4 bgcolor="#ffffff" width="570"><input type="submit" name="Action" value="Submit" style="HEIGHT: 24px; WIDTH: 125px">
> > > <input type="reset" value="Reset" name=reset style="HEIGHT: 24px; WIDTH: 121px"></td>
> > > </tr></table>
> > > </div>
> > > </form>
> > > <br>
> > > <br>
> > >
> > >
> > >
> > > </html>
> > >
> > >
> > >
> > >
> > >
> > > ---------------------------------
> > > Yahoo! Sports Fantasy Football '06 - Go with the leader. Start your league today!
> > > --
> > >
> > > * * Please support the community that supports you. * *
> > > http://evolt.org/help_support_evolt/
> > >
> > > For unsubscribe and other options, including the Tip Harvester
> > > and archives of thelist go to: http://lists.evolt.org
> > > Workers of the Web, evolt !
> > >
> >
>
More information about the thelist
mailing list