|
| |
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
frameset problem - 4/7/2005 3:34:57
Hi again, I have a probelm with frameset. I would like to devide the screen to two screens.I used the frameset command to choose a pic (left screen) and I would like to change the picture on the right screen (look at the code) <%
dim conn,sql,rs
set conn=server.CreateObject("ADODB.connection")
conn.Open "dsn=futuremodels"
set rs=server.CreateObject("ADODB.recordset")
sql="select * from q_menu"
rs.Open sql,conn
Response.Write "<table border='0' width=80 align='left'>"
while not rs.EOF
Response.Write "<tr><td>"
Response.Write "<a href=" & "details.asp?id_detail=" & rs("id_detail") & " target='mainFrame'><IMG SRC='pictures/rightmenu/" & rs("mainfile") & "' width=80 height=122></td></tr>"
rs.MoveNext
wend
Response.Write "</table>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
%>
The problem is the left screen is waiting for a variable, so all I see is an error page until I click on one of the pic on the right screen I do I solve the problem? <%
dim id_detail
id_detail=Request.QueryString("id_detail")
dim conn,sql,rs
set conn=server.CreateObject("ADODB.connection")
conn.Open "dsn=futuremodels"
set rs=server.CreateObject("ADODB.recordset")
sql="select * from model_pic where id_detail=" & id_detail
rs.Open sql,conn
'while not rs.EOF
Response.Write "<IMG SRC='pictures/" & rs("filename") & "'>"
'rs.MoveNext
'wend
rs.Close
set rs=nothing
conn.Close
set conn=nothing
%>
|
|
|
|
rdouglass
Posts: 9270 From: Biddeford, ME USA Status: offline
|
RE: frameset problem - 4/7/2005 9:42:06
quote:
id_detail=Request.QueryString("id_detail") How about something like this in place of that line: IF trim(Request.QueryString("id_detail")&"") = "" THEN 'Put some value for a default below, maybe a default pic id? id_detail=1 ELSE Request.QueryString("id_detail") END IF Does that make any sense?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: frameset problem - 4/10/2005 2:07:28
Thanks, I did something like you said and it's working
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|