HighDots Forums  

Javascript, DB Access, and Securing Login Info

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss Javascript, DB Access, and Securing Login Info in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
BenignVanilla
 
Posts: n/a

Default Javascript, DB Access, and Securing Login Info - 04-11-2006 , 01:55 PM






I am new to javascript coding on a web client, but recently had to put
together a basic page to do some database lookups. The code works nicely. I
am using an ADO connection object. The performance is good, and the code
works nicely, but I am concered, because my database connection string is in
my .js file.

Is there some better way to do this, like the usage of the global.asa and an
application value, that is common with ASP code?

BV.



Reply With Quote
  #2  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: Javascript, DB Access, and Securing Login Info - 04-11-2006 , 08:38 PM






BenignVanilla wrote:
Quote:
I am new to javascript coding on a web client, but recently had to put
together a basic page to do some database lookups. The code works nicely. I
am using an ADO connection object. The performance is good, and the code
works nicely, but I am concered, because my database connection string is in
my .js file.

Is there some better way to do this, like the usage of the global.asa and an
application value, that is common with ASP code?

BV.


Don't use javascript (which is client-side) to access the database. Use a
server-side language.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================


Reply With Quote
  #3  
Old   
BenignVanilla
 
Posts: n/a

Default Re: Javascript, DB Access, and Securing Login Info - 04-13-2006 , 12:53 PM



"Jerry Stuckle" <jstucklex (AT) attglobal (DOT) net> wrote

Quote:
BenignVanilla wrote:
I am new to javascript coding on a web client, but recently had to put
together a basic page to do some database lookups. The code works nicely.
I am using an ADO connection object. The performance is good, and the
code works nicely, but I am concered, because my database connection
string is in my .js file.

Is there some better way to do this, like the usage of the global.asa and
an application value, that is common with ASP code?

BV.

Don't use javascript (which is client-side) to access the database. Use a
server-side language.
That would be my preference, but we are working within a set of constriants
placed on us by the software with which we are working. We can write pages
only in HTML.

We're investigating a method by which we could use HTML to post to ASP page,
but I am not sure how to get data back from the ASP in order to update the
HTML that initiated the post. Is that possible?

BV.




Reply With Quote
  #4  
Old   
William Tasso
 
Posts: n/a

Default Re: Javascript, DB Access, and Securing Login Info - 04-13-2006 , 01:04 PM



Fleeing from the madness of the jungle
BenignVanilla <bvanilla (AT) tibetanbeefgarden (DOT) com> stumbled into
news:alt.comp.lang.javascript,alt.www.webmaster
and said:

Quote:
...
We're investigating a method by which we could use HTML to post to ASP
page,
Should be trivial enough - research http get & http post

Quote:
but I am not sure how to get data back from the ASP in order to update
the
HTML that initiated the post. Is that possible?
yes - research server.execute & server.transfer (assumes ASP/vbScript)

--
William Tasso

http://williamtasso.com/words/what-is-usenet.asp


Reply With Quote
  #5  
Old   
BenignVanilla
 
Posts: n/a

Default Re: Javascript, DB Access, and Securing Login Info - 04-13-2006 , 01:53 PM




"William Tasso" <SpamBlocked (AT) tbdata (DOT) com> wrote

Quote:
Fleeing from the madness of the jungle
BenignVanilla <bvanilla (AT) tibetanbeefgarden (DOT) com> stumbled into
news:alt.comp.lang.javascript,alt.www.webmaster
and said:

...
We're investigating a method by which we could use HTML to post to ASP
page,

Should be trivial enough - research http get & http post

but I am not sure how to get data back from the ASP in order to update
the
HTML that initiated the post. Is that possible?

yes - research server.execute & server.transfer (assumes ASP/vbScript)
My problem is that, I am working in an environment that can display HTML,
but not ASP. So right now, I had planned to collect the form information and
place in the database via javascript, then our PM decided that we'd have a
performance hit so we are investigating a way to call an ASP on a web server
from our HTML so the server side script could do the updates to the DB, but
we need some way of knowing if that succeeded in the original HTML.

BV.




Reply With Quote
  #6  
Old   
William Tasso
 
Posts: n/a

Default Re: Javascript, DB Access, and Securing Login Info - 04-13-2006 , 02:59 PM



Fleeing from the madness of the jungle
BenignVanilla <bvanilla (AT) tibetanbeefgarden (DOT) com> stumbled into
news:alt.comp.lang.javascript,alt.www.webmaster
and said:

Quote:
"William Tasso" <SpamBlocked (AT) tbdata (DOT) com> wrote in message
newsp.s7ykh5k2m9g4qz-wnt (AT) tbdata (DOT) com...
Fleeing from the madness of the jungle
BenignVanilla <bvanilla (AT) tibetanbeefgarden (DOT) com> stumbled into
news:alt.comp.lang.javascript,alt.www.webmaster
and said:

...
We're investigating a method by which we could use HTML to post to ASP
page,

Should be trivial enough - research http get & http post

but I am not sure how to get data back from the ASP in order to update
the
HTML that initiated the post. Is that possible?

yes - research server.execute & server.transfer (assumes ASP/vbScript)

My problem is that, I am working in an environment that can display HTML,
but not ASP.
Please describe that environment in more detail.

Quote:
...
we need some way of knowing if that succeeded in the original HTML.
The original HTML cannot know about that which has not yet happened.


--
William Tasso

http://williamtasso.com/words/what-is-usenet.asp


Reply With Quote
  #7  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: Javascript, DB Access, and Securing Login Info - 04-13-2006 , 03:10 PM



BenignVanilla wrote:
Quote:
"Jerry Stuckle" <jstucklex (AT) attglobal (DOT) net> wrote in message
news:eeGdnUVhgalm0aHZnZ2dnUVZ_vWdnZ2d (AT) comcast (DOT) com...

BenignVanilla wrote:

I am new to javascript coding on a web client, but recently had to put
together a basic page to do some database lookups. The code works nicely.
I am using an ADO connection object. The performance is good, and the
code works nicely, but I am concered, because my database connection
string is in my .js file.

Is there some better way to do this, like the usage of the global.asa and
an application value, that is common with ASP code?

BV.

Don't use javascript (which is client-side) to access the database. Use a
server-side language.


That would be my preference, but we are working within a set of constriants
placed on us by the software with which we are working. We can write pages
only in HTML.

We're investigating a method by which we could use HTML to post to ASP page,
but I am not sure how to get data back from the ASP in order to update the
HTML that initiated the post. Is that possible?

BV.


You can't get data back to the HTML. What you do is generate the output in the
ASP page.

Most asp pages are a combination of asp and html.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================


Reply With Quote
  #8  
Old   
Edgar Wolphe
 
Posts: n/a

Default Re: Javascript, DB Access, and Securing Login Info - 04-13-2006 , 10:07 PM



"BenignVanilla" <bvanilla (AT) tibetanbeefgarden (DOT) com> wrote:

Quote:
My problem is that, I am working in an environment that can display HTML,
but not ASP. So right now, I had planned to collect the form information and
place in the database via javascript, then our PM decided that we'd have a
performance hit so we are investigating a way to call an ASP on a web server
from our HTML so the server side script could do the updates to the DB, but
we need some way of knowing if that succeeded in the original HTML.

You'd have to convince me that your PM has the best interests of the
project in mind in placing such constrants on tools. There are many
excellent and easy to impliment ways to accomplish your objectives
using server-side tools without having to resort to such a horrible
kludge.

The only clear way to accomplish your goal I can see is to call the
ASP page that contains the acknowledgment into a HTML frame in your
pages, which then begs the question- why not do the whole thing on
the other server and be done with it?

Besides, the environment you described is not accurate. A properly
designed ASP site will deliver pure HTML, and all your javascript can
run on the server.

EW

If you add up all known religions
and cancel the contradictions, you are left with only one invariant
universal message: God needs *your* money.
----Uncle Al


Reply With Quote
  #9  
Old   
BenignVanilla
 
Posts: n/a

Default Re: Javascript, DB Access, and Securing Login Info - 04-27-2006 , 12:51 PM




"William Tasso" <SpamBlocked (AT) tbdata (DOT) com> wrote

Quote:
My problem is that, I am working in an environment that can display HTML,
but not ASP.

Please describe that environment in more detail.
--
William Tasso
William, thanks for sticking with me...

I am working within a proprietary application, I'd rather not say which,
that allows you to expand on it's interface using forms created in HTML. I
am not sure how they represent the HTML, but I do know they can present
HTML, and respond to form events, but they cannot render ASP. So if I have a
form that I want to take the results from and place it in the database,
before the host takes control back, I can do that with javascript within the
HTML, but I am afraid of resource issues, so I want to push this DB update
to the server. I could do this with javacript, but I won't know if the DB
update succeeded or not.

BV.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.