DTC AND CLIENT SIDE SCRIPTING

Results 1 to 3 of 3

Thread: DTC AND CLIENT SIDE SCRIPTING

  1. #1
    krish Guest

    Default DTC AND CLIENT SIDE SCRIPTING

    I am developing a data bound web form and I am using<BR>client side DTC scripting method ( DHTML). I noticed one problem<BR>with this approch ie when we view the page source we can see<BR>full data base connection string including username and password.<BR>Like following<BR><BR>&#060;SCRIPT LANGUAGE="JavaScript"><BR>function _initForecastRs()<BR>{<BR>ForecastRs.setRecordSour ce(&#039DSN=FFS;User<BR>Id=iusr_ffs;PASSWORD=xyz;D escription=FFS -<BR>KRISH;SERVER=(local);UID=iusr_ffs;APP=Microsof t Development<BR>Environment;WSID=abc;DATABASE=FFS&# 039, &#039Select * from "Forecast_cycle"&#039);<BR>ForecastRs.open();<BR>< BR>}<BR><BR>Any help<BR>thanks<BR>krish

  2. #2
    Join Date
    Dec 1969
    Posts
    940

    Default RE: DTC AND CLIENT SIDE SCRIPTING

    One way to avoid this is to use the Javascript as a seperate file. In other words, take all of your Javascript code and cut it out of your html document, then paste it into a new file. Then save the new file with a .js extension. Then in your HTML code simply point to the js file. It is similar to an include file in ASP.<BR><BR>Example:<BR><BR>&#060;body><BR>&#060;s cript language="javascript" src="filename.js" type="text/javascript">&#060;/script><BR>&#060;/body><BR><BR>The only problem with this is that an experienced internet developer will be able to view the source code of your HTML and see that you link to an external JS file. Then they can type the address of the JS file into their browser and download the file, depending on your web server you may be able to prevent the download though. I hope this helps. You may want to consider using ASP because then you can use an include file instead of the JS file and you can have the extension of the include file be .asp which cannot be veiwed or downloaded.<BR><BR>If you have any more questions you may e-mail me at edl2@hotmail.com

  3. #3
    krish Guest

    Default RE: DTC AND CLIENT SIDE SCRIPTING

    thanks eric for your response. My problem is some what different type. I forgot to mention that I am using VI 6.0 with client side<BR>scripting (DHTML, RDS). If you create a new html file and drag and drop recordset design time control you can see VI putting <BR>java script routines which are non editable.<BR><BR>thanks<BR>krish

Posting Permissions

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