Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Textfield value in Form

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,33110
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Textfield value in Form
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Textfield value in Form - 4/5/2006 1:11:41 AM   
  Pfishy

 

Posts: 4
Score: 0
Joined: 4/5/2006
From: Netherlands
Status: offline
I think this is really to silly but I'vd been struggling with it for quite some time now so I hope one of you guys can give me the answer

I have a form with a field called gebruikersnaam, after changing te value I want to call a function that checks the value that was entered againt a database.

All goed well except for the fact that I am not able to retrieve en send the entered value to my function

HELP!!!

In the source below a call upon the function and I want to pass  the entered value to the function (where it now says ??????)

         <td colspan="3" class="leftreaddata"><input name="gebruikersnaam" onchange=<%=ControleerDubbel(??????,"Logingegevens","gebruikersnaam")%> type="text" id="gebruikersnaam"  size="25" maxlength="25" />
 
 
Post #: 1
 
 RE: Textfield value in Form - 4/5/2006 5:58:24 AM   
  ehvbs

 

Posts: 2204
Score: 50
Joined: 6/22/2005
From: Germany
Status: offline
Hi Pfishy,

maybe I misunderstand your problem, but AFAIK you can't ask your webserver
to insert the value of a text input at delivery time.

But this code

      
shows, how you can use "Me" to pass the current HTML element to a (client side) VBScript Sub.

(in reply to Pfishy)
 
 
Post #: 2
 
 RE: Textfield value in Form - 4/6/2006 1:58:42 AM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
correct,

you cannot check data with server-end languages immediatly. Therefore there are nice script languages like VBScript, JavaScript and ofcourse AJAX who greatly contribute in Client-side usage.

But in order to check the name with the Database entry, you will have to communicate back to the server with the information (which AJAX does 'on the fly') and then you will need to create a function in ASP where you will read the SERVER_REQUEST that will be shown in the URL. i.e. http://www.yournamehere.com/login.asp?naam=Jan&achternaam=Klaassen and your function will grab the 'naam' and 'achternaam' and parse it.

i.e. strNaam = Request.Form("frmNaam")

_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to ehvbs)
 
 
Post #: 3
 
 RE: Textfield value in Form - 4/7/2006 9:07:51 PM   
  Pfishy

 

Posts: 4
Score: 0
Joined: 4/5/2006
From: Netherlands
Status: offline
Thanks for the replies, for me it's stays confusion what is possible iin which language and what's not.

The reason I thought is should be possible is that the code below does retrieve the entered value on the fly and reacts on it without submitting the form, I'm just not sure which language this is...:-(

         <input name="newcat" type="text" id="newcat" size="25" maxlength="25" onChange="categorie.options[categorie.length] = new Option(this.value, this.value);this.form.categorie.value=this.value;"/>

I did change my approach and created a function that is called upon when submitting and it works fine now!



(in reply to Snipah)
 
 
Post #: 4
 
 RE: Textfield value in Form - 4/8/2006 8:46:44 PM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
To create a new function for it is much better, it is better to overview your code.....

And the language in your example looks like JavaScript...

_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to Pfishy)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Textfield value in Form Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts