|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
autofill text by a push button
hi
i am new to this stuff and i basically used frontpage 2002 extensions to make my form but i want to insert a push button that will automatically insert text in a blank text area on a different web page. the webpage's name is prod01.htm is there a way i kind do this? plz reply soon or email at URL |
|
#2
|
|||
|
|||
|
hmmm,
well, you could do it using a serverside scripting language like ASP. Or you could do it using Javascript and cookies. Have you had any experience with either of these? |
|
#3
|
|||
|
|||
|
i have experience with javascript, but i need a good code which i can't figure out
|
|
#4
|
|||
|
|||
|
i have this script but this only works with the forms being on the same page how do i do it for two different pages?
<SCRIPT LANGUAGE=JAVASCRIPT> function useBillInfo(form) { var idx; { form.ShipTo_Name_First.value= form.BillTo_Name_First.value; form.ShipTo_Name_Last.value = form.BillTo_Name_Last.value; form.ShipTo_Address.value = form.BillTo_Address.value; form.ShipTo_City.value = form.BillTo_City.value; } } </SCRIPT> where there are two forms on same page and the different values are copied from one text box to another. the names of the textboxes are given in the code. any ways i dont want the text box though but a pushc button that fills only "one" text area how can i change this script so i can use it on two different pages and use a push button instead of two blank text areas any idea |
|
#5
|
|||
|
|||
|
sounds like you need to use cookies.
You can set the var of the text box on page one to a cookie wehen the button is clicked. Then in page 2 use the onload event handler to read the cookie and set the value of textbox 2! for a good tutorial on Javascript and cookies try this link |
|
#6
|
|||
|
|||
|
i am sorry but i think i wasn't clear, you instead of these text boxes i've written below i don't want them, i wanted one button with one value that would fill in a text when clicked. i am also sorry but i don't know how to use an onload event handler. could you give me the code for the onload event handler and help me change this var into what i need? please... and is a cookie something that gives the command to start the var function or something lin onClick etc. i don't understand what a cookie is but maybe i'll figure that out somehow anyways it'll a lot of help if you could give the java code... pretty please!
form.ShipTo_Name_First.value form.ShipTo_Name_Last.value form.ShipTo_Address.value form.ShipTo_City.value |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > autofill text by a push button |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|