ryebooks
asked on
HOW DO U WRITE TEXT IN IFRAME ON SEPERATE LINES?
yeah hi i have this problem, ok i figured out how to write from parent into iframe but the thing is everytime a new text is written in iframe the old one gets over written, So is there any way to skip a line and make the new text made written on a new line
-------------------
Iframe code
-------------------
<IFRAME name=contact width="130" height="410">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href="searchpop.asp">to search.</A>]</IFRAME>
--------------
Code from Parent window: Writes text in IFRAME
-------------
<SCRIPT>
function results (form) {
var p = form.name.value;
address = form.address.value;
address = address.split("*");
address = address.join("");
i = frames["contact"];
i.document.open();
i.document.writeln('<table width="225" align="center"><tr align="center" bgcolor="#ECE7E7"><td>');
i.document.writeln('<font size="2" color="#903860">');
i.document.writeln(p + ' At <a href="mailto:');
i.document.writeln(address );
i.document.writeln('">');
i.document.writeln(address );
i.document.writeln('</font ></td></tr ></table>< /div>');
}
</SCRIPT>
-------------------
Iframe code
-------------------
<IFRAME name=contact width="130" height="410">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href="searchpop.asp">to search.</A>]</IFRAME>
--------------
Code from Parent window: Writes text in IFRAME
-------------
<SCRIPT>
function results (form) {
var p = form.name.value;
address = form.address.value;
address = address.split("*");
address = address.join("");
i = frames["contact"];
i.document.open();
i.document.writeln('<table
i.document.writeln('<font size="2" color="#903860">');
i.document.writeln(p + ' At <a href="mailto:');
i.document.writeln(address
i.document.writeln('">');
i.document.writeln(address
i.document.writeln('</font
}
</SCRIPT>
add <br> wherer you want the line breaks to appear or in the text add \n inside the javascript variables this will cause a new line
can you post more of the code, the form, so i can properly test
what do you want the outptut to loo like?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<SCRIPT>
function results (form) {
var p = form.name.value;
address = form.address.value;
address = address.split("*");
address = address.join("");
i = frames["contact"];
i.document.open();
i.document.writeln('<table width="225" align="center"><tr align="center" bgcolor="#ECE7E7"><td>');
i.document.writeln('<font size="2" color="#903860">');
i.document.writeln(p + ' At<br><a href="mailto:');
i.document.writeln(address );
i.document.writeln('">');
i.document.writeln(address );
i.document.writeln('</font ></td></tr ></table>< /div>');
}
</SCRIPT>
</head>
<body onLoad="results(just)">
<form name="just">
<input type="text" name="name" value="some person">
<input type="text" name="address" value="some address">
<IFRAME name=contact width="130" height="410">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href="searchpop.asp">to search.</A>]</IFRAME>
</form>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<SCRIPT>
function results (form) {
var p = form.name.value;
address = form.address.value;
address = address.split("*");
address = address.join("");
i = frames["contact"];
i.document.open();
i.document.writeln('<table
i.document.writeln('<font size="2" color="#903860">');
i.document.writeln(p + ' At<br><a href="mailto:');
i.document.writeln(address
i.document.writeln('">');
i.document.writeln(address
i.document.writeln('</font
}
</SCRIPT>
</head>
<body onLoad="results(just)">
<form name="just">
<input type="text" name="name" value="some person">
<input type="text" name="address" value="some address">
<IFRAME name=contact width="130" height="410">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href="searchpop.asp">to search.</A>]</IFRAME>
</form>
</body>
</html>
or this
formats the source of the iframe
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<SCRIPT>
function results (form) {
var p = form.name.value;
address = form.address.value;
address = address.split("*");
address = address.join("");
i = frames["contact"];
i.document.open();
i.document.writeln('<table width="225" align="center">\n\t<tr align="center" bgcolor="#ECE7E7">\n\t\t<t d>');
i.document.writeln('\n<fon t size="2" color="#903860">');
i.document.writeln(p + ' At<br><a href="mailto:' + address + '">');
i.document.writeln(address );
i.document.writeln('</font >\n\t\t</t d>\n\t</tr >\n</table >\n</div>' );
}
</SCRIPT>
</head>
<body onLoad="results(just)">
<form name="just">
<input type="text" name="name" value="some person">
<input type="text" name="address" value="some address">
<IFRAME name=contact width="130" height="410">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href="searchpop.asp">to search.</A>]</IFRAME>
</form>
</body>
</html>
formats the source of the iframe
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<SCRIPT>
function results (form) {
var p = form.name.value;
address = form.address.value;
address = address.split("*");
address = address.join("");
i = frames["contact"];
i.document.open();
i.document.writeln('<table
i.document.writeln('\n<fon
i.document.writeln(p + ' At<br><a href="mailto:' + address + '">');
i.document.writeln(address
i.document.writeln('</font
}
</SCRIPT>
</head>
<body onLoad="results(just)">
<form name="just">
<input type="text" name="name" value="some person">
<input type="text" name="address" value="some address">
<IFRAME name=contact width="130" height="410">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href="searchpop.asp">to search.</A>]</IFRAME>
</form>
</body>
</html>
ok... i misunderstood the question
instead of
i.document.writeln('<table width="225" align="center"><tr align="center" bgcolor="#ECE7E7"><td>');
i.document.writeln('<font size="2" color="#903860">');
i.document.writeln(p + ' At<br><a href="mailto:');
i.document.writeln(address );
i.document.writeln('">');
i.document.writeln(address );
i.document.writeln('</font ></td></tr ></table>< /div>');
have a global variable
strContent="";
and set it in the outptut
strrContent=strContent+ '<tr align="center" bgcolor="#ECE7E7"><td><fon t size="2" color="#903860">' + p + ' At<br><a href="mailto:'
i.document.writeln('<table width="225" align="center">);
instead of
i.document.writeln('<table
i.document.writeln('<font size="2" color="#903860">');
i.document.writeln(p + ' At<br><a href="mailto:');
i.document.writeln(address
i.document.writeln('">');
i.document.writeln(address
i.document.writeln('</font
have a global variable
strContent="";
and set it in the outptut
strrContent=strContent+ '<tr align="center" bgcolor="#ECE7E7"><td><fon
i.document.writeln('<table
hit enter by mistake.....
ok... i misunderstood the question
instead of
i.document.writeln('<table width="225" align="center"><tr align="center" bgcolor="#ECE7E7"><td>');
i.document.writeln('<font size="2" color="#903860">');
i.document.writeln(p + ' At<br><a href="mailto:');
i.document.writeln(address );
i.document.writeln('">');
i.document.writeln(address );
i.document.writeln('</font ></td></tr ></table>< /div>');
have a global variable
strContent="";
and set it in the outptut
strContent=strContent+ '<tr align="center" bgcolor="#ECE7E7"><td><fon t size="2" color="#903860">' + p + ' At <a href="mailto:' + address + '">' + address + '</font></td></tr>';
i.document.writeln('<table width="225" align="center">);
i.document.writeln(strCont ent);
i.document.writeln('</tabl e>');
now for each line you want to write just add it to the strContent variable
ok... i misunderstood the question
instead of
i.document.writeln('<table
i.document.writeln('<font size="2" color="#903860">');
i.document.writeln(p + ' At<br><a href="mailto:');
i.document.writeln(address
i.document.writeln('">');
i.document.writeln(address
i.document.writeln('</font
have a global variable
strContent="";
and set it in the outptut
strContent=strContent+ '<tr align="center" bgcolor="#ECE7E7"><td><fon
i.document.writeln('<table
i.document.writeln(strCont
i.document.writeln('</tabl
now for each line you want to write just add it to the strContent variable
ASKER
Wow, in less then 1 hours so many comments...lol..ok let me give the last sol a shot
ASKER
could u be more clear
i mean do i past
the
============
strContent="";
and set it in the outptut
strContent=strContent+ '<tr align="center" bgcolor="#ECE7E7"><td><fon t size="2" color="#903860">' + p + ' At <a href="mailto:' + address + '">' + address + '</font></td></tr>';
i.document.writeln('<table width="225" align="center">);
i.document.writeln(strCont ent);
i.document.writeln('</tabl e>');
============
in a sepearate script? like this (is it supposed to be on the parent page)
<script>
strContent="";
and set it in the outptut
strContent=strContent+ '<tr align="center" bgcolor="#ECE7E7"><td><fon t size="2" color="#903860">' + p + ' At <a href="mailto:' + address + '">' + address + '</font></td></tr>';
i.document.writeln('<table width="225" align="center">);
i.document.writeln(strCont ent);
i.document.writeln('</tabl e>');
</script>
i mean do i past
the
============
strContent="";
and set it in the outptut
strContent=strContent+ '<tr align="center" bgcolor="#ECE7E7"><td><fon
i.document.writeln('<table
i.document.writeln(strCont
i.document.writeln('</tabl
============
in a sepearate script? like this (is it supposed to be on the parent page)
<script>
strContent="";
and set it in the outptut
strContent=strContent+ '<tr align="center" bgcolor="#ECE7E7"><td><fon
i.document.writeln('<table
i.document.writeln(strCont
i.document.writeln('</tabl
</script>
try this it might give you a better idea of what i am talking about
also try not to use key/reserved word as values ie name, try to preface object names with the type eg txtName, text box or radTest, radio button
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<SCRIPT>
strContent="";
function setContent(address,name){
address = address.split("*");
address = address.join("");
strContent=strContent+ '<tr align="center" bgcolor="#ECE7E7"><td><fon t size="2" color="#903860">' + name + ' At <a href="mailto:' + address + '">' + address + '</font></td></tr>';
results(document.forms[0]) ;
}
function results (form) {
i = frames["contact"];
i.document.open();
i.document.writeln('<table width="225" align="center">');
i.document.writeln(strCont ent);
i.document.writeln('</tabl e>');
}
</SCRIPT>
</head>
<body onLoad="results(just)">
<form name="just">
<input type="text" name="tname" value="some person">
<input type="text" name="address" value="some address">
<IFRAME name=contact width="130" height="410">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href="searchpop.asp">to search.</A>]</IFRAME>
<input type="button" onclick="setContent(this.f orm.addres s.value,th is.form.tn ame.value) " value="go">
</form>
</body>
</html>
also try not to use key/reserved word as values ie name, try to preface object names with the type eg txtName, text box or radTest, radio button
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<SCRIPT>
strContent="";
function setContent(address,name){
address = address.split("*");
address = address.join("");
strContent=strContent+ '<tr align="center" bgcolor="#ECE7E7"><td><fon
results(document.forms[0])
}
function results (form) {
i = frames["contact"];
i.document.open();
i.document.writeln('<table
i.document.writeln(strCont
i.document.writeln('</tabl
}
</SCRIPT>
</head>
<body onLoad="results(just)">
<form name="just">
<input type="text" name="tname" value="some person">
<input type="text" name="address" value="some address">
<IFRAME name=contact width="130" height="410">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href="searchpop.asp">to search.</A>]</IFRAME>
<input type="button" onclick="setContent(this.f
</form>
</body>
</html>
ASKER
Also i am using a ASP so not sure if global variable is something that my server might have, i tried the above script on the PWS but got errrors "object no defined"
no the global in this case is is js so will not interfere with you asp...
did you rename the the text box?
ie
this is what i am using....
<input type="text" name="tname" value="some person">
did you rename the the text box?
ie
this is what i am using....
<input type="text" name="tname" value="some person">
ok....
try this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<SCRIPT>
strContent="";
function setContent(address,name){
address = address.split("*");
address = address.join("");
strContent=strContent+ '<tr align="center" bgcolor="#ECE7E7"><td><fon t size="2" color="#903860">' + name + ' At <a href="mailto:' + address + '">' + address + '</font></td></tr>';
results(document.forms[0]) ;
}
function results (form) {
i = frames["contact"];
i.document.open();
i.document.writeln('<table width="225" align="center">');
i.document.writeln(strCont ent);
i.document.writeln('</tabl e>');
}
</SCRIPT>
</head>
<body onLoad="results(just)">
<form name="just">
<input type="text" name="name" value="some person">
<input type="text" name="address" value="some address">
<IFRAME name=contact width="130" height="410">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href="searchpop.asp">to search.</A>]</IFRAME>
<input type="button" onclick="setContent(this.f orm.addres s.value,do cument.for ms[0].elem ents['name '].value)" value="go">
</form>
</body>
</html>
try this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<SCRIPT>
strContent="";
function setContent(address,name){
address = address.split("*");
address = address.join("");
strContent=strContent+ '<tr align="center" bgcolor="#ECE7E7"><td><fon
results(document.forms[0])
}
function results (form) {
i = frames["contact"];
i.document.open();
i.document.writeln('<table
i.document.writeln(strCont
i.document.writeln('</tabl
}
</SCRIPT>
</head>
<body onLoad="results(just)">
<form name="just">
<input type="text" name="name" value="some person">
<input type="text" name="address" value="some address">
<IFRAME name=contact width="130" height="410">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href="searchpop.asp">to search.</A>]</IFRAME>
<input type="button" onclick="setContent(this.f
</form>
</body>
</html>
ASKER
OK that did work, however when i tried implementing it into my asp script it did work.....don't know why
==========
My ASP script
==========
<html>
<head>
<title>RYEBOOKS.COM SEARCH</title>
<SCRIPT>
strContent="";
function setContent(address,name){
address = address.split("*");
address = address.join("");
strContent=strContent+ '<tr align="center" bgcolor="#ECE7E7"><td><fon t size="2" color="#903860">' + name + ' At <a href="mailto:' + address + '">' + address + '</font></td></tr>';
results(document.forms[0]) ;
}
function results (myform) {
i = frames["contact"];
i.document.open();
i.document.writeln('<table width="225" align="center">');
i.document.writeln(strCont ent);
i.document.writeln('</tabl e>');
}
</SCRIPT>
<style type="text/css">
<!--
body
{
scrollbar-base-color: #000000;
scrollbar-arrow-color: #FFFFFF;
scrollbar-darkshadow-color : #000000;
scrollbar-face-color: #903860;
scrollbar-highlight-color: #FFFFFF;
scrollbar-shadow-color: #FFFFFF;
scrollbar-3dlight-color: #000000;
}
-->
</style>
</head>
<body onLoad="results(myform);">
<table>
<tr>
<td valign="top">
<IFRAME name=main width="135" height="425">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href="nonframe.html">to search.</A>]</IFRAME>
</td>
<td valign="top">
<%
' Constants ripped from adovbs.inc:
Const adOpenStatic = 3
Const adLockReadOnly = 1
Const adCmdText = &H0001
' Our own constants:
Const PAGE_SIZE = 10 ' The size of our pages.
' Declare our variables... always good practice!
Dim strURL ' The URL of this page so the form will work
' no matter what this file is named.
Dim cnnSearch ' ADO connection
Dim rstSearch ' ADO recordset
Dim cnnSearch1 ' ADO connection
Dim rstSearch1 ' ADO recordset
Dim strDBPath ' path to our Access database (*.mdb) file
Dim strSQL ' The SQL Query we build on the fly
Dim strSearch ' The text being looked for
Dim strSearch2
Dim iRecordCount1
Dim iPageCurrent ' The page we're currently on
Dim iPageCount ' Number of pages of records
Dim iRecordCount ' Count of the records returned
Dim I ' Standard looping variable
strSearch2=0
' Retreive the URL of this page from Server Variables
strURL = Request.ServerVariables("U RL")
' Retreive the term being searched for. I'm doing it on
' the QS since that allows people to bookmark results.
' You could just as easily have used the form collection.
strSearch = Request.QueryString("searc h")
strSearch = Replace(strSearch, "'", "''")
' Retrieve page to show or default to the first
If Request.QueryString("page" ) = "" Then
iPageCurrent = 1
Else
iPageCurrent = CInt(Request.QueryString(" page"))
End If
' Since I'm doing this all in one page I need to see if anyone
' has searched for something. If they have we hit the DB.
' O/W I just show the search form and quit.
%>
<table align="center"><tr align="center">
<td>
<p align="center"><form action="<%= strURL %>" method="get"><input name="search" value="<%= strSearch %>" size="45" style="color:rgb(144,60,96 ); background-color:rgb(232,2 28,224);" /><input type="submit" name="submit" value="BOOK SEARCH" style="font-size:11; color:white; background-color:rgb(144,6 0,96);">
</font></form> </td>
</tr></table>
<%
If strSearch <> "" Then
' MapPath of virtual database file path to a physical path.
' If you want you could hard code a physical path here.
' Create an ADO Connection to connect to the sample database.
' We're using OLE DB but you could just as easily use ODBC or a DSN.
Set cnnSearch = Server.CreateObject("ADODB .Connectio n")
Set cnnSearch1 = Server.CreateObject("ADODB .Connectio n")
' This line is for the Access sample database:
cnnSearch.Open "Provider=Microsoft.Jet.OL EDB.4.0;Da ta Source=C:\Inetpub\wwwroot\ data\log3. mdb;"
cnnSearch1.Open "Provider=Microsoft.Jet.OL EDB.4.0;Da ta Source=C:\Inetpub\wwwroot\ data\log3. mdb;"
strSQL1 = "SELECT c2 " _
& "FROM tbl1 " _
& "WHERE c2 LIKE '%" & Replace(strSearch2, "'", "''") & "%' "
' We're actually using SQL Server so we use this line instead:
Set rstSearch1 = Server.CreateObject("ADODB .Recordset ")
rstSearch1.Open strSQL1, cnnSearch1, adOpenStatic, adLockReadOnly, adCmdText
' Build our query based on the input.
strSQL = "SELECT t1, t2, t3, t4, c1, c2, sr, dd1, id, dd2 " _
& "FROM tbl1 " _
& "WHERE t1 LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
& "OR t2 LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
& "OR dd1 LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
& "ORDER BY c2 DESC;"
' Execute our query using the connection object. It automatically
' creates and returns a recordset which we store in our variable.
Set rstSearch = Server.CreateObject("ADODB .Recordset ")
rstSearch.PageSize = PAGE_SIZE
rstSearch.CacheSize = PAGE_SIZE
' Open our recordset
rstSearch.Open strSQL, cnnSearch, adOpenStatic, adLockReadOnly, adCmdText
' Get a count of the number of records and pages
' for use in building the header and footer text.
iRecordCount = rstSearch.RecordCount
iPageCount = rstSearch.PageCount
If iRecordCount = 0 Then
' Display no records error.
%>
<p align="center"><FONT color='#903860'>
No records found. Please try again.
</p>
<%
Else
' Move to the page we need to show.
rstSearch.AbsolutePage = iPageCurrent
' Show a quick status line letting people know where they are:
%>
<table align=right width=100% border=0 cellpadding=0 cellspacing=0 bgcolor="#903860">
<tr>
<td align="left"> <font face="verdana" size="1" color="#FFFFFF"> THERE ARE CURRENTLY <%=rstSearch1.RecordCount% > BOOKS IN THE RYEBOOKS DATABASE</font></td>
<td align="right"><font face="verdana" size="1" color="#FFFFFF"><%=date%> </font></td>
</tr>
</table>
<p align="center"><FONT color='#903860'>
<%= iRecordCount %> Records Found.
Displaying page <%= iPageCurrent %>
of <%= iPageCount %>:
</p>
<%
' Display a table of the data in the recordset. We loop through the
' recordset displaying the fields from the table and using MoveNext
' to increment to the next record. We stop when we reach EOF.
' For fun I'm combining some fields and showwing you can do more then
' just spit out the data in the form it is in in the table.
%>
<table border="1" align="center" bgcolor='#903860'>
<tr>
<th><font color="white">BOOK TITLE</th>
<th><font color="white">BOOK AUTHOR</th>
<th><font color="white">PRICE($CDN)< /th>
<th><font color="white">COURSE CODE</th>
</tr>
<%
Do While Not rstSearch.EOF And rstSearch.AbsolutePage = iPageCurrent
%>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
<%= rstSearch.Fields("t1").Val ue %></td><td align=center><font size="2"/><%= rstSearch.Fields("t2").Val ue %></td>
<td align=center><font size="2"/> <font color="#903860"><b><%= rstSearch.Fields("t3").Val ue %></b></td><td align=center><font size="2"/><%= rstSearch.Fields("dd1").Va lue %></td></tr>
<tr BGCOLOR="white"><td><font size="2"/> <i><%= rstSearch.Fields("dd2").Va lue %></i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "<%= rstSearch.Fields("c1").Val ue %>" type="hidden" /> <input name="address" value="*<%= rstSearch.Fields("t4").Val ue %>" type="hidden"> <input type="button" value="CONTACT" onclick="setContent(this.f orm.addres s.value,do cument.for ms[0].elem ents['name '].value)" style="font-size:11; color:white; background-color:rgb(144,6 0,96);">
</form></td>
<td align=center><font size="2"/> Posted On <%= rstSearch.Fields("c2").Val ue %></td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b><%= rstSearch.Fields("sr").Val ue %></b></font></td></tr>
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<%
rstSearch.MoveNext
Loop
%>
</table>
<p>
<%
' Now we need to show our navigation links:
' Show "previous" and "next" page links which pass the page to
' view our search parameter. You could also use form buttons
' but I find this looks better.
If iPageCurrent > 1 Then
%>
<a href="<%= strURL %>?search=<%= Server.URLEncode(strSearch ) %>&page=<%= iPageCurrent - 1 %>">[<< Prev]</a>
<%
End If
' You can also show page numbers:
For I = 1 To iPageCount
If I = iPageCurrent Then
%>
<%= I %>
<%
Else
%>
<a href="<%= strURL %>?search=<%= Server.URLEncode(strSearch ) %>&page=<%= I %>"><%= I %></a>
<%
End If
Next 'I
If iPageCurrent < iPageCount Then
%>
<a href="<%= strURL %>?search=<%= Server.URLEncode(strSearch ) %>&page=<%= iPageCurrent + 1 %>">[Next >>]</a>
<%
End If
%>
</p>
<%
End If
' Close our recordset and connection and dispose of the objects
rstSearch.Close
Set rstSearch = Nothing
cnnSearch.Close
Set cnnSearch = Nothing
rstSearch1.Close
Set rstSearch1 = Nothing
cnnSearch1.Close
Set cnnSearch1 = Nothing
End If
%>
</body>
</td>
</html>
==========
My ASP script
==========
<html>
<head>
<title>RYEBOOKS.COM SEARCH</title>
<SCRIPT>
strContent="";
function setContent(address,name){
address = address.split("*");
address = address.join("");
strContent=strContent+ '<tr align="center" bgcolor="#ECE7E7"><td><fon
results(document.forms[0])
}
function results (myform) {
i = frames["contact"];
i.document.open();
i.document.writeln('<table
i.document.writeln(strCont
i.document.writeln('</tabl
}
</SCRIPT>
<style type="text/css">
<!--
body
{
scrollbar-base-color: #000000;
scrollbar-arrow-color: #FFFFFF;
scrollbar-darkshadow-color
scrollbar-face-color: #903860;
scrollbar-highlight-color:
scrollbar-shadow-color: #FFFFFF;
scrollbar-3dlight-color: #000000;
}
-->
</style>
</head>
<body onLoad="results(myform);">
<table>
<tr>
<td valign="top">
<IFRAME name=main width="135" height="425">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href="nonframe.html">to search.</A>]</IFRAME>
</td>
<td valign="top">
<%
' Constants ripped from adovbs.inc:
Const adOpenStatic = 3
Const adLockReadOnly = 1
Const adCmdText = &H0001
' Our own constants:
Const PAGE_SIZE = 10 ' The size of our pages.
' Declare our variables... always good practice!
Dim strURL ' The URL of this page so the form will work
' no matter what this file is named.
Dim cnnSearch ' ADO connection
Dim rstSearch ' ADO recordset
Dim cnnSearch1 ' ADO connection
Dim rstSearch1 ' ADO recordset
Dim strDBPath ' path to our Access database (*.mdb) file
Dim strSQL ' The SQL Query we build on the fly
Dim strSearch ' The text being looked for
Dim strSearch2
Dim iRecordCount1
Dim iPageCurrent ' The page we're currently on
Dim iPageCount ' Number of pages of records
Dim iRecordCount ' Count of the records returned
Dim I ' Standard looping variable
strSearch2=0
' Retreive the URL of this page from Server Variables
strURL = Request.ServerVariables("U
' Retreive the term being searched for. I'm doing it on
' the QS since that allows people to bookmark results.
' You could just as easily have used the form collection.
strSearch = Request.QueryString("searc
strSearch = Replace(strSearch, "'", "''")
' Retrieve page to show or default to the first
If Request.QueryString("page"
iPageCurrent = 1
Else
iPageCurrent = CInt(Request.QueryString("
End If
' Since I'm doing this all in one page I need to see if anyone
' has searched for something. If they have we hit the DB.
' O/W I just show the search form and quit.
%>
<table align="center"><tr align="center">
<td>
<p align="center"><form action="<%= strURL %>" method="get"><input name="search" value="<%= strSearch %>" size="45" style="color:rgb(144,60,96
</font></form> </td>
</tr></table>
<%
If strSearch <> "" Then
' MapPath of virtual database file path to a physical path.
' If you want you could hard code a physical path here.
' Create an ADO Connection to connect to the sample database.
' We're using OLE DB but you could just as easily use ODBC or a DSN.
Set cnnSearch = Server.CreateObject("ADODB
Set cnnSearch1 = Server.CreateObject("ADODB
' This line is for the Access sample database:
cnnSearch.Open "Provider=Microsoft.Jet.OL
cnnSearch1.Open "Provider=Microsoft.Jet.OL
strSQL1 = "SELECT c2 " _
& "FROM tbl1 " _
& "WHERE c2 LIKE '%" & Replace(strSearch2, "'", "''") & "%' "
' We're actually using SQL Server so we use this line instead:
Set rstSearch1 = Server.CreateObject("ADODB
rstSearch1.Open strSQL1, cnnSearch1, adOpenStatic, adLockReadOnly, adCmdText
' Build our query based on the input.
strSQL = "SELECT t1, t2, t3, t4, c1, c2, sr, dd1, id, dd2 " _
& "FROM tbl1 " _
& "WHERE t1 LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
& "OR t2 LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
& "OR dd1 LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
& "ORDER BY c2 DESC;"
' Execute our query using the connection object. It automatically
' creates and returns a recordset which we store in our variable.
Set rstSearch = Server.CreateObject("ADODB
rstSearch.PageSize = PAGE_SIZE
rstSearch.CacheSize = PAGE_SIZE
' Open our recordset
rstSearch.Open strSQL, cnnSearch, adOpenStatic, adLockReadOnly, adCmdText
' Get a count of the number of records and pages
' for use in building the header and footer text.
iRecordCount = rstSearch.RecordCount
iPageCount = rstSearch.PageCount
If iRecordCount = 0 Then
' Display no records error.
%>
<p align="center"><FONT color='#903860'>
No records found. Please try again.
</p>
<%
Else
' Move to the page we need to show.
rstSearch.AbsolutePage = iPageCurrent
' Show a quick status line letting people know where they are:
%>
<table align=right width=100% border=0 cellpadding=0 cellspacing=0 bgcolor="#903860">
<tr>
<td align="left"> <font face="verdana" size="1" color="#FFFFFF"> THERE ARE CURRENTLY <%=rstSearch1.RecordCount%
<td align="right"><font face="verdana" size="1" color="#FFFFFF"><%=date%> </font></td>
</tr>
</table>
<p align="center"><FONT color='#903860'>
<%= iRecordCount %> Records Found.
Displaying page <%= iPageCurrent %>
of <%= iPageCount %>:
</p>
<%
' Display a table of the data in the recordset. We loop through the
' recordset displaying the fields from the table and using MoveNext
' to increment to the next record. We stop when we reach EOF.
' For fun I'm combining some fields and showwing you can do more then
' just spit out the data in the form it is in in the table.
%>
<table border="1" align="center" bgcolor='#903860'>
<tr>
<th><font color="white">BOOK TITLE</th>
<th><font color="white">BOOK AUTHOR</th>
<th><font color="white">PRICE($CDN)<
<th><font color="white">COURSE CODE</th>
</tr>
<%
Do While Not rstSearch.EOF And rstSearch.AbsolutePage = iPageCurrent
%>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
<%= rstSearch.Fields("t1").Val
<td align=center><font size="2"/> <font color="#903860"><b><%= rstSearch.Fields("t3").Val
<tr BGCOLOR="white"><td><font size="2"/> <i><%= rstSearch.Fields("dd2").Va
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "<%= rstSearch.Fields("c1").Val
</form></td>
<td align=center><font size="2"/> Posted On <%= rstSearch.Fields("c2").Val
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<%
rstSearch.MoveNext
Loop
%>
</table>
<p>
<%
' Now we need to show our navigation links:
' Show "previous" and "next" page links which pass the page to
' view our search parameter. You could also use form buttons
' but I find this looks better.
If iPageCurrent > 1 Then
%>
<a href="<%= strURL %>?search=<%= Server.URLEncode(strSearch
<%
End If
' You can also show page numbers:
For I = 1 To iPageCount
If I = iPageCurrent Then
%>
<%= I %>
<%
Else
%>
<a href="<%= strURL %>?search=<%= Server.URLEncode(strSearch
<%
End If
Next 'I
If iPageCurrent < iPageCount Then
%>
<a href="<%= strURL %>?search=<%= Server.URLEncode(strSearch
<%
End If
%>
</p>
<%
End If
' Close our recordset and connection and dispose of the objects
rstSearch.Close
Set rstSearch = Nothing
cnnSearch.Close
Set cnnSearch = Nothing
rstSearch1.Close
Set rstSearch1 = Nothing
cnnSearch1.Close
Set cnnSearch1 = Nothing
End If
%>
</body>
</td>
</html>
can you post the compiled output, source from the browser
ASKER
html>
<head>
<title>RYEBOOKS.COM SEARCH</title>
<SCRIPT>
strContent="";
function setContent(address,name){
address = address.split("*");
address = address.join("");
strContent=strContent+ '<tr align="center" bgcolor="#ECE7E7"><td><fon t size="2" color="#903860">' + name + ' At <a href="mailto:' + address + '">' + address + '</font></td></tr>';
results(document.forms[0]) ;
}
function results (myform) {
i = frames["contact"];
i.document.open();
i.document.writeln('<table width="225" align="center">');
i.document.writeln(strCont ent);
i.document.writeln('</tabl e>');
}
</SCRIPT>
<style type="text/css">
<!--
body
{
scrollbar-base-color: #000000;
scrollbar-arrow-color: #FFFFFF;
scrollbar-darkshadow-color : #000000;
scrollbar-face-color: #903860;
scrollbar-highlight-color: #FFFFFF;
scrollbar-shadow-color: #FFFFFF;
scrollbar-3dlight-color: #000000;
}
-->
</style>
</head>
<body onLoad="results(myform);">
<table>
<tr>
<td valign="top">
<IFRAME name=main width="135" height="425">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href="nonframe.html">to search.</A>]</IFRAME>
</td>
<td valign="top">
<table align="center"><tr align="center">
<td>
<p align="center"><form action="/search.asp" method="get"><input name="search" value="physics" size="45" style="color:rgb(144,60,96 ); background-color:rgb(232,2 28,224);" /><input type="submit" name="submit" value="BOOK SEARCH" style="font-size:11; color:white; background-color:rgb(144,6 0,96);">
</font></form> </td>
</tr></table>
<table align=right width=100% border=0 cellpadding=0 cellspacing=0 bgcolor="#903860">
<tr>
<td align="left"> <font face="verdana" size="1" color="#FFFFFF"> THERE ARE CURRENTLY 835 BOOKS IN THE RYEBOOKS DATABASE</font></td>
<td align="right"><font face="verdana" size="1" color="#FFFFFF">12/8/03 </font></td>
</tr>
</table>
<p align="center"><FONT color='#903860'>
16 Records Found.
Displaying page 1
of 2:
</p>
<table border="1" align="center" bgcolor='#903860'>
<tr>
<th><font color="white">BOOK TITLE</th>
<th><font color="white">BOOK AUTHOR</th>
<th><font color="white">PRICE($CDN)< /th>
<th><font color="white">COURSE CODE</th>
</tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
THE PHYSICS OF SOLID STATE ELECTRONIC DEVICES: LECTURE NOTES... </td><td align=center><font size="2"/>Fred C. Bateman</td>
<td align=center><font size="2"/> <font color="#903860"><b>$5</b>< /td><td align=center><font size="2"/>PCS224</td></tr>
<tr BGCOLOR="white"><td><font size="2"/> <i>Lecture notes for PCS 224</i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "dharris" type="hidden" /> <input name="address" value="*mad_hookups2001@ya hoo.com" type="hidden"> <input type="button" value="CONTACT" onclick="setContent(this.f orm.addres s.value,do cument.for ms[0].elem ents['name '].value)" style="font-size:11; color:white; background-color:rgb(144,6 0,96);">
</form></td>
<td align=center><font size="2"/> Posted On 10/28/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b ></font></ td></tr>
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
Physics For Scientists and Engineers 5th Edition</td><td align=center><font size="2"/>Raymond A. Serway and Robert J. Beichner</td>
<td align=center><font size="2"/> <font color="#903860"><b>$95</b> </td><td align=center><font size="2"/>PCS125</td></tr>
<tr BGCOLOR="white"><td><font size="2"/> <i>Five books for PCS 125 and PCS 211 all for 1st year</i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "Amar" type="hidden" /> <input name="address" value="*amarMurtza@hotmail .com" type="hidden"> <input type="button" value="CONTACT" onclick="setContent(this.f orm.addres s.value,do cument.for ms[0].elem ents['name '].value)" style="font-size:11; color:white; background-color:rgb(144,6 0,96);">
</form></td>
<td align=center><font size="2"/> Posted On 10/1/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b ></font></ td></tr>
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
Physics for scientists & Engineers SOLUTION MANUAL</td><td align=center><font size="2"/>SERWAY BEICHNER</td>
<td align=center><font size="2"/> <font color="#903860"><b>$80</b> </td><td align=center><font size="2"/>PCS125</td></tr>
<tr BGCOLOR="white"><td><font size="2"/> <i>SOLUTION MANUAL, EXCELLENT CONDITION</i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "Os" type="hidden" /> <input name="address" value="*osaif@ryerson.ca" type="hidden"> <input type="button" value="CONTACT" onclick="setContent(this.f orm.addres s.value,do cument.for ms[0].elem ents['name '].value)" style="font-size:11; color:white; background-color:rgb(144,6 0,96);">
</form></td>
<td align=center><font size="2"/> Posted On 9/13/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b ></font></ td></tr>
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
Physics for Scientist & Engineers</td><td align=center><font size="2"/>Serway Beichneer</td>
<td align=center><font size="2"/> <font color="#903860"><b>$80</b> </td><td align=center><font size="2"/>PCS125211</td></ tr>
<tr BGCOLOR="white"><td><font size="2"/> <i>5 volumes good conditon</i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "ahsanzc" type="hidden" /> <input name="address" value="*achoudhu@ryerson.c a" type="hidden"> <input type="button" value="CONTACT" onclick="setContent(this.f orm.addres s.value,do cument.for ms[0].elem ents['name '].value)" style="font-size:11; color:white; background-color:rgb(144,6 0,96);">
</form></td>
<td align=center><font size="2"/> Posted On 9/12/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b ></font></ td></tr>
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
Physics (third edition, volume two)</td><td align=center><font size="2"/>R. Wolfson, J. M. Pasachoff</td>
<td align=center><font size="2"/> <font color="#903860"><b>$60</b> </td><td align=center><font size="2"/>PCS110</td></tr>
<tr BGCOLOR="white"><td><font size="2"/> <i>Book in excellent condition </i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "Danny" type="hidden" /> <input name="address" value="*king_kobra23@hotma il.com" type="hidden"> <input type="button" value="CONTACT" onclick="setContent(this.f orm.addres s.value,do cument.for ms[0].elem ents['name '].value)" style="font-size:11; color:white; background-color:rgb(144,6 0,96);">
</form></td>
<td align=center><font size="2"/> Posted On 9/11/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b ></font></ td></tr>
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
Physics 3rd Edition Volume 2</td><td align=center><font size="2"/>Wolfson & Pasachoff</td>
<td align=center><font size="2"/> <font color="#903860"><b>$60</b> </td><td align=center><font size="2"/>PCS110</td></tr>
<tr BGCOLOR="white"><td><font size="2"/> <i>Mint Condition, With Study Guide & CD-ROM</i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "Brad" type="hidden" /> <input name="address" value="*bradtothemax@hotma il.com" type="hidden"> <input type="button" value="CONTACT" onclick="setContent(this.f orm.addres s.value,do cument.for ms[0].elem ents['name '].value)" style="font-size:11; color:white; background-color:rgb(144,6 0,96);">
</form></td>
<td align=center><font size="2"/> Posted On 9/10/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b ></font></ td></tr>
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
Physics, 3rd Ed. Vol. 2</td><td align=center><font size="2"/>Wolfson and Pasachoff</td>
<td align=center><font size="2"/> <font color="#903860"><b>$100</b ></td><td align=center><font size="2"/>PCS110</td></tr>
<tr BGCOLOR="white"><td><font size="2"/> <i>WITH STUDY GUIDE AND SOFTWARE</i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "wshaikh" type="hidden" /> <input name="address" value="*wshaikh@scs.ryerso n.ca" type="hidden"> <input type="button" value="CONTACT" onclick="setContent(this.f orm.addres s.value,do cument.for ms[0].elem ents['name '].value)" style="font-size:11; color:white; background-color:rgb(144,6 0,96);">
</form></td>
<td align=center><font size="2"/> Posted On 9/7/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b ></font></ td></tr>
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
Physics with modern Physics for Scientists and Engineers</td><td align=center><font size="2"/>Richard Wolfson, Jay M. Pasachoff</td>
<td align=center><font size="2"/> <font color="#903860"><b>$ 80</b></td><td align=center><font size="2"/>PCS110</td></tr>
<tr BGCOLOR="white"><td><font size="2"/> <i>textbook is in excellent condition + study guide is included</i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "db" type="hidden" /> <input name="address" value="*db_scorpio@hotmail .com" type="hidden"> <input type="button" value="CONTACT" onclick="setContent(this.f orm.addres s.value,do cument.for ms[0].elem ents['name '].value)" style="font-size:11; color:white; background-color:rgb(144,6 0,96);">
</form></td>
<td align=center><font size="2"/> Posted On 9/6/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b ></font></ td></tr>
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
PHYSICS 3RD EDITION WITH MODERN PHYSICS</td><td align=center><font size="2"/>R.WOLFSON & J.PASACHOFF-ADDISON-WESLEY 1999</td>
<td align=center><font size="2"/> <font color="#903860"><b>$65</b> </td><td align=center><font size="2"/>PCS110</td></tr>
<tr BGCOLOR="white"><td><font size="2"/> <i>WILLING TO NEGOTIATE PRICE, BOOK IN GOOD CONDITION</i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "Kroopa" type="hidden" /> <input name="address" value="*kroopashah@yahoo.c om" type="hidden"> <input type="button" value="CONTACT" onclick="setContent(this.f orm.addres s.value,do cument.for ms[0].elem ents['name '].value)" style="font-size:11; color:white; background-color:rgb(144,6 0,96);">
</form></td>
<td align=center><font size="2"/> Posted On 9/6/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b ></font></ td></tr>
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
Grounding for the Metaphysics of Morals</td><td align=center><font size="2"/>Immanuel Kant</td>
<td align=center><font size="2"/> <font color="#903860"><b>$3</b>< /td><td align=center><font size="2"/>PHL503</td></tr>
<tr BGCOLOR="white"><td><font size="2"/> <i>Perfect Condition</i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "Maya" type="hidden" /> <input name="address" value="*msaibil@ryerson.ca " type="hidden"> <input type="button" value="CONTACT" onclick="setContent(this.f orm.addres s.value,do cument.for ms[0].elem ents['name '].value)" style="font-size:11; color:white; background-color:rgb(144,6 0,96);">
</form></td>
<td align=center><font size="2"/> Posted On 9/5/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b ></font></ td></tr>
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
</table>
<p>
1
<a href="/search.asp?search=p hysics&pag e=2">2</a>
<a href="/search.asp?search=p hysics&pag e=2">[Next >>]</a>
</p>
</body>
</td>
</html>
<head>
<title>RYEBOOKS.COM SEARCH</title>
<SCRIPT>
strContent="";
function setContent(address,name){
address = address.split("*");
address = address.join("");
strContent=strContent+ '<tr align="center" bgcolor="#ECE7E7"><td><fon
results(document.forms[0])
}
function results (myform) {
i = frames["contact"];
i.document.open();
i.document.writeln('<table
i.document.writeln(strCont
i.document.writeln('</tabl
}
</SCRIPT>
<style type="text/css">
<!--
body
{
scrollbar-base-color: #000000;
scrollbar-arrow-color: #FFFFFF;
scrollbar-darkshadow-color
scrollbar-face-color: #903860;
scrollbar-highlight-color:
scrollbar-shadow-color: #FFFFFF;
scrollbar-3dlight-color: #000000;
}
-->
</style>
</head>
<body onLoad="results(myform);">
<table>
<tr>
<td valign="top">
<IFRAME name=main width="135" height="425">
[Your user agent does not support frames or is currently configured
not to display frames. However, you may visit
<A href="nonframe.html">to search.</A>]</IFRAME>
</td>
<td valign="top">
<table align="center"><tr align="center">
<td>
<p align="center"><form action="/search.asp" method="get"><input name="search" value="physics" size="45" style="color:rgb(144,60,96
</font></form> </td>
</tr></table>
<table align=right width=100% border=0 cellpadding=0 cellspacing=0 bgcolor="#903860">
<tr>
<td align="left"> <font face="verdana" size="1" color="#FFFFFF"> THERE ARE CURRENTLY 835 BOOKS IN THE RYEBOOKS DATABASE</font></td>
<td align="right"><font face="verdana" size="1" color="#FFFFFF">12/8/03 </font></td>
</tr>
</table>
<p align="center"><FONT color='#903860'>
16 Records Found.
Displaying page 1
of 2:
</p>
<table border="1" align="center" bgcolor='#903860'>
<tr>
<th><font color="white">BOOK TITLE</th>
<th><font color="white">BOOK AUTHOR</th>
<th><font color="white">PRICE($CDN)<
<th><font color="white">COURSE CODE</th>
</tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
THE PHYSICS OF SOLID STATE ELECTRONIC DEVICES: LECTURE NOTES... </td><td align=center><font size="2"/>Fred C. Bateman</td>
<td align=center><font size="2"/> <font color="#903860"><b>$5</b><
<tr BGCOLOR="white"><td><font size="2"/> <i>Lecture notes for PCS 224</i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "dharris" type="hidden" /> <input name="address" value="*mad_hookups2001@ya
</form></td>
<td align=center><font size="2"/> Posted On 10/28/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
Physics For Scientists and Engineers 5th Edition</td><td align=center><font size="2"/>Raymond A. Serway and Robert J. Beichner</td>
<td align=center><font size="2"/> <font color="#903860"><b>$95</b>
<tr BGCOLOR="white"><td><font size="2"/> <i>Five books for PCS 125 and PCS 211 all for 1st year</i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "Amar" type="hidden" /> <input name="address" value="*amarMurtza@hotmail
</form></td>
<td align=center><font size="2"/> Posted On 10/1/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
Physics for scientists & Engineers SOLUTION MANUAL</td><td align=center><font size="2"/>SERWAY BEICHNER</td>
<td align=center><font size="2"/> <font color="#903860"><b>$80</b>
<tr BGCOLOR="white"><td><font size="2"/> <i>SOLUTION MANUAL, EXCELLENT CONDITION</i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "Os" type="hidden" /> <input name="address" value="*osaif@ryerson.ca" type="hidden"> <input type="button" value="CONTACT" onclick="setContent(this.f
</form></td>
<td align=center><font size="2"/> Posted On 9/13/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
Physics for Scientist & Engineers</td><td align=center><font size="2"/>Serway Beichneer</td>
<td align=center><font size="2"/> <font color="#903860"><b>$80</b>
<tr BGCOLOR="white"><td><font size="2"/> <i>5 volumes good conditon</i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "ahsanzc" type="hidden" /> <input name="address" value="*achoudhu@ryerson.c
</form></td>
<td align=center><font size="2"/> Posted On 9/12/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
Physics (third edition, volume two)</td><td align=center><font size="2"/>R. Wolfson, J. M. Pasachoff</td>
<td align=center><font size="2"/> <font color="#903860"><b>$60</b>
<tr BGCOLOR="white"><td><font size="2"/> <i>Book in excellent condition </i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "Danny" type="hidden" /> <input name="address" value="*king_kobra23@hotma
</form></td>
<td align=center><font size="2"/> Posted On 9/11/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
Physics 3rd Edition Volume 2</td><td align=center><font size="2"/>Wolfson & Pasachoff</td>
<td align=center><font size="2"/> <font color="#903860"><b>$60</b>
<tr BGCOLOR="white"><td><font size="2"/> <i>Mint Condition, With Study Guide & CD-ROM</i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "Brad" type="hidden" /> <input name="address" value="*bradtothemax@hotma
</form></td>
<td align=center><font size="2"/> Posted On 9/10/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
Physics, 3rd Ed. Vol. 2</td><td align=center><font size="2"/>Wolfson and Pasachoff</td>
<td align=center><font size="2"/> <font color="#903860"><b>$100</b
<tr BGCOLOR="white"><td><font size="2"/> <i>WITH STUDY GUIDE AND SOFTWARE</i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "wshaikh" type="hidden" /> <input name="address" value="*wshaikh@scs.ryerso
</form></td>
<td align=center><font size="2"/> Posted On 9/7/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
Physics with modern Physics for Scientists and Engineers</td><td align=center><font size="2"/>Richard Wolfson, Jay M. Pasachoff</td>
<td align=center><font size="2"/> <font color="#903860"><b>$ 80</b></td><td align=center><font size="2"/>PCS110</td></tr>
<tr BGCOLOR="white"><td><font size="2"/> <i>textbook is in excellent condition + study guide is included</i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "db" type="hidden" /> <input name="address" value="*db_scorpio@hotmail
</form></td>
<td align=center><font size="2"/> Posted On 9/6/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
PHYSICS 3RD EDITION WITH MODERN PHYSICS</td><td align=center><font size="2"/>R.WOLFSON & J.PASACHOFF-ADDISON-WESLEY
<td align=center><font size="2"/> <font color="#903860"><b>$65</b>
<tr BGCOLOR="white"><td><font size="2"/> <i>WILLING TO NEGOTIATE PRICE, BOOK IN GOOD CONDITION</i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "Kroopa" type="hidden" /> <input name="address" value="*kroopashah@yahoo.c
</form></td>
<td align=center><font size="2"/> Posted On 9/6/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
<tr BGCOLOR='#ECE7E7'>
<td align=center> <font size="2"/>
Grounding for the Metaphysics of Morals</td><td align=center><font size="2"/>Immanuel Kant</td>
<td align=center><font size="2"/> <font color="#903860"><b>$3</b><
<tr BGCOLOR="white"><td><font size="2"/> <i>Perfect Condition</i></td>
<td align=center><font size="2"/> <form name="myform"> <input name ="name" value = "Maya" type="hidden" /> <input name="address" value="*msaibil@ryerson.ca
</form></td>
<td align=center><font size="2"/> Posted On 9/5/03</td><td align=center><font size="2"/> Book Is For <font color="#903c60"><b>SALE</b
<tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr>
</table>
<p>
1
<a href="/search.asp?search=p
<a href="/search.asp?search=p
</p>
</body>
</td>
</html>
cahge the ifram name to contact
<IFRAME name="contact" width="135" height="425">
try not to use things like main as object names or id's they can cause problems, main is not a reserved word but it is a key word
<IFRAME name="contact" width="135" height="425">
try not to use things like main as object names or id's they can cause problems, main is not a reserved word but it is a key word
also all your forms have the same name this will cause errors
give each form a unique name eg myForm1 (get the 1 from the current row of the record set during output)
change your setContent function to this
function setContent(objForm,formadd ress,name) {
address = address.split("*");
address = address.join("");
strContent=strContent+ '<tr align="center" bgcolor="#ECE7E7"><td><fon t size="2" color="#903860">' + name + ' At <a href="mailto:' + address + '">' + address + '</font></td></tr>';
results(objForm);
}
and chnge the call to
<input type="button" value="CONTACT" onclick="setContent(this.f orm, this.form.address.value,do cument.for ms[0].elem ents['name '].value)" style="font-size:11; color:white; background-color:rgb(144,6 0,96);">
give each form a unique name eg myForm1 (get the 1 from the current row of the record set during output)
change your setContent function to this
function setContent(objForm,formadd
address = address.split("*");
address = address.join("");
strContent=strContent+ '<tr align="center" bgcolor="#ECE7E7"><td><fon
results(objForm);
}
and chnge the call to
<input type="button" value="CONTACT" onclick="setContent(this.f
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
wo..so many changes, ok will have to change the following
no i dont work for ryerson is a independent student run site aimed primarily for ryerson students
no i dont work for ryerson is a independent student run site aimed primarily for ryerson students
ASKER
worts linke a charm thanks
np... glad i could help
thanks for the points
thanks for the points