JavaScript File Writing and Forms

Writing to specific line and variables

Page 1 of 1

3 Replies - 2372 Views - Last Post: 09 March 2006 - 05:08 AM

#1 the_hangman  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 13
  • View blog
  • Posts: 602
  • Joined: 18-January 06

JavaScript File Writing and Forms

Posted 06 March 2006 - 08:13 AM

Ok first off, I'll be honest. I'm definately not new to coding, especially html and whatnot. But I am relatively new to writing Javascript. I have a form that my company uses to write quotes. Don't ask me why they did it in HTML because I dont know. Anyway it's like all in Javascript because it writes to a file and creates other html pages with the quote.


They want me to fix it and make it better.
So I want to make it so that certain options change certain things and I want the form to be expanded onto multiple pages that display only the necessary parts of the form.
The catch is that I have to make it write an exact amount of lines into the file and write certain information on exact lines. How do I do this? Can it be done? Can anyone at least point me in the right direction??

Is This A Good Question/Topic? 0
  • +

Replies To: JavaScript File Writing and Forms

#2 Arbitrator  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 51
  • View blog
  • Posts: 530
  • Joined: 26-January 05

Re: JavaScript File Writing and Forms

Posted 06 March 2006 - 09:23 PM

Quote

Don't ask me why they did it in HTML because I dont know. Anyway it's like all in Javascript because it writes to a file and creates other html pages with the quote.

This seems rather contradictory: it's done "in HTML" ... "but all in Javascript". Are you talking about Server Side Includes (SSI)?

Quote

How do I do this? Can it be done?

Your description of the current process and what you need to accomplish is a bit vague and added that we have never seen the website of which you speak. It would also help to have a copy of the script and a more precise description of what it's currently doing and should be doing (or a look at the webpage).

Quote

Can anyone at least point me in the right direction??

Learn Javascript. ;)

Just Googling around for information on scripts, provided I know what I'm trying to accomplish in advance, seems to work even though I don't really know much about the language. Then again, I have the advantage of being acquainted with the text-book basics already due to a Java competition I ended up unexpectedly joining. :p
Was This Post Helpful? 0
  • +
  • -

#3 the_hangman  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 13
  • View blog
  • Posts: 602
  • Joined: 18-January 06

Re: JavaScript File Writing and Forms

Posted 08 March 2006 - 09:33 PM

What I meant by the first comment was that the company uses Microsoft Access, Timberline, and some other form of SQL, but this workup file is done as an HTML file LIKE a web page. The funny part is that it's not even on a web server... they e-mail the html file to each other and then e-mail back. On top of that the company owns their own web server.
The "Javascript statement" is that it uses some form of javascript to write all of the form field entries into a file that is importable into our databases. Each line has a preset value for a field name, but all of the lines have to be in an exact order for them to be imported right. I honestly don't know enough about the subject to really elaborate any more than that.

But it apparently can't be too hard because I figured it out and I ended up rewriting the pre-existing 8,000 lines into five 1,000 line codes. What I did to sort of "back door" it, was I wrote all of the fields into a cookie that resorts all of the fields into the right order on a "Final Page" and sends in the workup. I also developed the page into a CSS form to eliminate all of the bulky table coding, which in the end made it run alot faster...


Now I just have to convince them to put it all on the web
Was This Post Helpful? 0
  • +
  • -

#4 Arbitrator  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 51
  • View blog
  • Posts: 530
  • Joined: 26-January 05

Re: JavaScript File Writing and Forms

Posted 09 March 2006 - 05:08 AM

Quote

Now I just have to convince them to put it all on the web

I know the feeling, heh. A group I'm in wanted a better webpage so I made one using XHTML and divisions but their current webmasters don't know what either of those are and didn't like it, heh... Probably because they can't understand the code.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1