Click here to Skip to main content
15,888,527 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: CSS overflow: auto not producing horiz bar Pin
Shog98-Feb-06 12:31
sitebuilderShog98-Feb-06 12:31 
GeneralRe: CSS overflow: auto not producing horiz bar Pin
bjsiders13-Feb-06 6:22
bjsiders13-Feb-06 6:22 
QuestionSOAP Pin
MrChefman7-Feb-06 23:22
MrChefman7-Feb-06 23:22 
QuestionCrystal + ASP Pin
Rajkamal_dfine7-Feb-06 21:43
Rajkamal_dfine7-Feb-06 21:43 
AnswerRe: Crystal + ASP Pin
VMSSanthosh7-Feb-06 22:19
VMSSanthosh7-Feb-06 22:19 
GeneralRe: Crystal + ASP Pin
Rajkamal_dfine8-Feb-06 17:22
Rajkamal_dfine8-Feb-06 17:22 
AnswerRe: Crystal + ASP Pin
darkelv11-Feb-06 15:26
darkelv11-Feb-06 15:26 
QuestionPostback / database query / asp nightmare Pin
TofuBug247-Feb-06 11:38
TofuBug247-Feb-06 11:38 
I'm starting to hate posting questions like this on these forums but my hands are so tied on this subject my fingers are turning blue.

Here's the problem, my company runs a old (but still functional) cms system writting entirely in classic asp with 95% vbscript now there are a few pages that have drop down boxes that should have parent / child data relationships

if the user selects an option from box A then box b is cleared and filled from the database based on the ID of the selected item of box A. ok that's cake got that working fine now here's where my head starts hurting.

I've been told that i have to get it working without posting back to the server....

the site itself is one monster include (the seven levels of hell seem like a good vacation spot compared to this site) now in the pages that this funtion is needed there are multiple input boxes and checkboxes and other fun stuff that's generation is burried in multiple include files of which NONE of them have their viewstate property set. so even if i wanted to post back and load box B i'd loose all the information on the page. and i can't just strip and rewrite this part of the cms cause it's just to complicated for one person to do on their own plus this was supposed to be a "quick" fix.

so i wrote 2 client side scripts in vbscript the first clears any existing option elemenets from the second select element it then calls the second that opens a database and runs a stored procedure the when passed the ID from the selecteditem of the first select element it spits out the applicable child records. works great only two huge problems.

1. if internet security is not set to allow database connections from another domain then it will crash and keep popping up a message (i got it to work on my test computer but i can't obviously set every users internet security settings)

2. My connection string with EVERYTHING including password is there in plain text for all to see

if anyone has any ideas how to get around this i would greatly appreciate the help.

here's the script part of the page for reference

<script language="vbscript" type="text/vbscript">
Sub GetCategory()
    ConStr = "Driver={SQL Server};Server=x.x.x.x;Database=db;Uid=uid;Pwd=pwd"
    Set Conn = CreateObject("ADODB.Connection")
    Conn.open ConStr
    Rs = CreateObject("ADODB.RecordSet")
    Set Rs = Conn.Execute("EXEC dbo.SelectCategoryByClassID @ClassID = " & Document.All.sClass(Document.All.sClass.SelectedIndex).Value)
    do while not rs.eof
	Set oOption = Document.CreateElement("OPTION")
        oOption.Text = rs("CategoryTitle")
        oOption.Value = rs("CategoryTitle")
	Document.All.sCategory.Add( oOption )
        Rs.movenext
    loop
    Set oOption = Nothing
    Rs.Close
    Set Rs = Nothing
    CreateObject
  End Sub

  Sub changeCats()
    Do Until Document.All.sCategory.Length = 1
      Document.All.sCategory.Remove( 1 )
    Loop
    Call GetCategory()
  End Sub
  
  </script>


Ryan
AnswerRe: Postback / database query / asp nightmare Pin
Edbert P7-Feb-06 12:49
Edbert P7-Feb-06 12:49 
AnswerRe: Postback / database query / asp nightmare Pin
Guffa7-Feb-06 13:28
Guffa7-Feb-06 13:28 
QuestionForm button minimum width Pin
Bruce Duncan7-Feb-06 9:06
Bruce Duncan7-Feb-06 9:06 
GeneralRe: Form button minimum width Pin
Bruce Duncan8-Feb-06 7:01
Bruce Duncan8-Feb-06 7:01 
QuestionAutomatic Generation of Image Maps Pin
Kevin McFarlane7-Feb-06 5:04
Kevin McFarlane7-Feb-06 5:04 
AnswerRe: Automatic Generation of Image Maps Pin
VMSSanthosh7-Feb-06 23:00
VMSSanthosh7-Feb-06 23:00 
QuestionWeb services shares common data objects Pin
Lkotzer7-Feb-06 3:01
Lkotzer7-Feb-06 3:01 
QuestionConnection Strings Pin
Illegal Operation7-Feb-06 2:58
Illegal Operation7-Feb-06 2:58 
GeneralRe: Connection Strings Pin
Guffa7-Feb-06 8:32
Guffa7-Feb-06 8:32 
QuestionHow can i get a machine name using client side scripting like java script? Pin
mbilal_ishaq6-Feb-06 23:34
mbilal_ishaq6-Feb-06 23:34 
QuestionWhy can't I make an addition properly? Pin
Cursed Feanor6-Feb-06 5:04
Cursed Feanor6-Feb-06 5:04 
AnswerRe: Why can't I make an addition properly? Pin
Guffa6-Feb-06 9:56
Guffa6-Feb-06 9:56 
QuestionJSCript Pin
militiaware6-Feb-06 5:01
militiaware6-Feb-06 5:01 
AnswerRe: JSCript Pin
Guffa6-Feb-06 10:18
Guffa6-Feb-06 10:18 
AnswerRe: JSCript Pin
[Marc]6-Feb-06 13:36
[Marc]6-Feb-06 13:36 
GeneralRe: JSCript Pin
militiaware6-Feb-06 22:37
militiaware6-Feb-06 22:37 
AnswerRe: JSCript Pin
Guffa6-Feb-06 23:10
Guffa6-Feb-06 23:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.