|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Dynamic document list
Thanks for taking the time for reading my post.
Desire: Build dynamic page using SQL database. The page is just a list of Form Number/ Form Name. I am using an SQL database which comprises: Dept. Number/ Form Number/ Form Name. The form number is a concatination of the dept. number and form number (Dept=10, form=100, form number on WEB page list =10100). These forms are in Word and Excel format. I use the following ASP code to display the form list and it works fine: <% rs.Open "SELECT * FROM eForms ORDER BY Dept, Number", Conn %> </head> <table width="95%" border="0"> <% Do While Not rs.EOF %> <tr> <td width="20" valign="top"><%=rs("Dept")%><%=rs("Number")%></td> <td width="20" valign="top"></td> <td valign="top"><%=rs("Name")%></td> </tr> <% rs.Movenext Loop %> </table> Now that I have the list, I am trying to make the form number and form names hyperlinks to the form location. The trick is, I want the form to open in the appropriate format (word or excel) in a browser window on the client side, not server side. If I hard code the document location and use straight HTML it works fine, but when I try to build the file location dynamically nothing happens. I think because it is using ASP it is trying to open it on the server side. No office products there though. This is the code I am using to build the form location (just with form number until I get it right). It makes the form number a hyperlink, but when you click on it nothing happens. <tr> <td width="20" valign="top"> <a href="file://///Bchapp/BCHNet/Forms/&<%=rs("Dept")%>&"/"&<%=rs("Dept")%><%=rs("Number")%>"> <%=rs("Dept")%><%=rs("Number")%></a></td> <td width="20" valign="top"></td> <td valign="top"><%=rs("Name")%></td> </tr> I am afraid that after the initial list is built and displayed, when I click on the hyperlink to go to the document, the variable (even if it soes work) will be pointing to the last file read from SQL. Is there any code that I can use that: 1 - will link the form number and name to the appropriate location 2 - open the document on the client side Any help or suggestions would be greatly appreciated. David Stewart - Baptist Childrens Homes of NC djstewart@bchfamily.org |
|
#2
|
||||
|
||||
|
so you need this link, when clicked, to open a file that exists on the client computer? For example, if I clicked the link, it would (in theory) open an office document that exists on my hard drive?
Secondly, i'm not following your concern about "the variable will be pointing to the last file read from SQL". Could you please clarify what you mean? I'm feeling a little slow mentally today ![]()
__________________
If you found a post of mine helpful, please click on the on my post to add to my reputation.
|
|
#3
|
|||
|
|||
|
Thanks for all the help. Sorry for the delay ... family crisis. I am back now (haven't decided if that is a good thing or a bad thing).
The error were bad syntax. Dumb newbie mistakes. All responses were needed though. Much thanks. |
|
#4
|
||||
|
||||
|
OH MY GOD... THIS PERSON IS CRAZY!!
look here to see load of those posts. shamrog, do this forum a huge favor and ban this weirdow before he floods all the forum! |
|
#5
|
||||
|
||||
|
I'll keep an eye on it. We'll presume that it's human error causing duplicate posts and not (human) intentional "spamming."
|
|
#6
|
||||
|
||||
|
this can't be any human error shamrog... he posted that same message at least 15 times, in different forums. also, I have sent him private message about it, he said he has no idea what I'm talking about.
so I assume we're talking about hacker here, who hacked into his account for some sick reason. can you verify this by checking the IP address in the log files? |
|
#7
|
||||
|
||||
|
Well the problem doesn't seem to be reoccurring so I imagine this issue will be ignored for now but if another moderator or admin decides to do something about it then I guess that'll be that. Computer have glitches sometimes too so I'm going to assume good intentions this one time. Thanks for looking for the good of the forums though.
I don't have access to log files. Only administrators would have that access I imagine. I can see his posts so I know what you are talking about. Just let us know if you see this happen again. |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Dynamic document list |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|