|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi
This is my code so far: <HTML> <HEAD> <TITLE>Alpaca Organizer</TITLE> <SCRIPT LANGUAGE="JavaScript"> <!-- function displayInfo() { document.write("<H1>Alpaca Name: " + this.name + "</H1></HR><PRE>"); document.write("Alpaca Number: " + this.number); document.write("The father of " + this.name + " is " + this.father + "."); document.write("The mohter of " + this.name + " is " + this.mother +"."); document.write("</PRE>"); } function alpaca() { this.name=prompt("Enter the alpaca's name","Name"); this.number=prompt("Enther the alpaca's number","Number"); this.father=prompt("Enter " + this.name + "'s father","Father"); this.mother=prompt("Enter " + this.name + "'s mother","Mother"); this.displayInfo=displayInfo; } newAlpaca=new alpaca(); --> </SCRIPT> </HEAD> <BODY> <SCRIPT LANGUAGE="JavaScript"> <!-- newAlpaca.displayInfo(); --> </SCRIP> </BODY> </HTML> Now what I want to be able to do is after it writes everything to the page, there needs to be a button at the button that says "Save it" and then it would save it to a file on the recipients harddrive. Also, I want it to be easy to edit the info so if there is a way for the recipient to easily edit say the mother's name without haveing to go through the rest I would really appreciate it if somebody could tell me. |
|
#2
|
|||
|
|||
|
If you mean the users drive, you can't do that, except with signed scripts in later versions of JavaScript. If you mean your drive, you'll need to use CGI or similar to write it to a file or database.
What you *can* do is set a cookie, which you can retrieve again on your site if needs be, but there are limitations. In your favourite search engine, search for "javascript AND cookies", or check out www.cookiecentral.com for more information. Cheers, adam |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Help with application! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|