CALLING function that writes data to database

Results 1 to 2 of 2

Thread: CALLING function that writes data to database

  1. #1
    Rigmor Guest

    Default CALLING function that writes data to database

    I wanna to something like that...<BR>&#060;@Language = JScript%&#062;<BR>&#060;%<BR>var name = Resquest.Form("name");<BR>%&#062;<BR>&#060;input type = button onClick=write_name_to_database()&#062;<BR><BR>What must be the function ??<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: CALLING function that writes data to database

    You can&#039t really do it that way.<BR><BR>Well, you can, with something called "remote scripting", but that&#039s a topic for a *very* advanced user.<BR><BR>You are mixing up client-side events with server-side work. You need to write the data to the DB on the server, so you have to make a full "round trip" to an ASP page on the server. Which means that the current page the user is seeing "disappears" and is replaced by the page you invoke.<BR><BR>Oh, there are sneaky ways around this. Multiple frames, for example, where you post in a hidden frame and then send a result back to the non-hidden frame. But, again, I think such an answer is beyond you at this point.<BR><BR>I recommend that you go back and reread the first two or three chapters of a good basic ASP book. Work on understanding the roles of the browser and the server and how they are different and how they have to cooperate.<BR><BR>Good luck!<BR><BR>

Posting Permissions

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