frameset problem (Full Version)

All Forums >> [Web Development] >> ASP, PHP, and Database



Message


wizard_oz -> 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 -> 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?




wizard_oz -> RE: frameset problem (4/10/2005 2:07:28)

Thanks, I did something like you said and it's working




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.109375