How to place a sql query in a javascript in an asp page

Reply

Join Date: Jan 2009
Posts: 5
Reputation: nadineatwaroo is an unknown quantity at this point 
Solved Threads: 0
nadineatwaroo nadineatwaroo is offline Offline
Newbie Poster

How to place a sql query in a javascript in an asp page

 
0
  #1
Jan 5th, 2009
Hi (First time user)

I am developing a team unit leader page. On my page I have a table with one column and multiple rows with each row having a department name. I would like to do two things but i'll focus on one for now. When i click on a dept. name I would like to display the tul for that department pic. I am new to asp, but in my table that holdoing the dept name i have <tr> <td onclick="tulpic();"> and in my script
  1. <script language="javascript">
  2. function tulpic() {
  3. // here is where i am wondering is i can just put
  4. <% tulsql="select picutreurl from tb.users where tb_users.deptname= &request("deptname") and teamleader=1" %>
  5. //also how would my pic actually be display?
  6. }
  7. </script>
Ohhh help me
Last edited by peter_budo; Jan 7th, 2009 at 5:37 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 7
Reputation: nrvinayak is an unknown quantity at this point 
Solved Threads: 0
nrvinayak nrvinayak is offline Offline
Newbie Poster

Re: How to place a sql query in a javascript in an asp page

 
0
  #2
Jan 12th, 2009
Hi:

The easiest way will be to

- Read the department names and tul pic names
- display the department name and hyperlink the department names with tulpic names and use a javascript for showing the pic which will show the picture on mouseover event
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP Forum
Thread Tools Search this Thread



Tag cloud for ASP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC