943,568 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 1070
  • ASP RSS
Jan 5th, 2009
0

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

Expand Post »
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
JavaScript Syntax (Toggle Plain Text)
  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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nadineatwaroo is offline Offline
5 posts
since Jan 2009
Jan 12th, 2009
0

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

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nrvinayak is offline Offline
7 posts
since Jul 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: Need a Distinct Column in my inner join statement
Next Thread in ASP Forum Timeline: Accessing server time using javascript





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC