turfbult
Jan 30th, 2001, 06:15 AM
Hello,
I have some ASP code which reads thru a table and gets info from it like name, html etc.
This info is used to build a table in HTML which displays the NAME and if there is a link to a webpage it adds the hyperlink which I get from the HTML fields in my db.
This is how I do it... (not all the code...)
html = rs("html")
response.write "<tr><td width='33%'><p><font face='Arial'size='2'><a href=" & link2 & ">" & rs("name") & "</a></font><br></td>"
link2 = "Javascript:windowOpen2()"
this is a reference to a javascript function
This function looks like this...
<script language="JavaScript">
<!--
function windowOpen2()
{ window.open('<%=html%>',"NewWindow","width=500,height=320,noresize=yes,scrollbars=no,toolbar=0,menubar=0");
}
// end popup windows -->
</script>
html in this function is the HTML field read from my db.
My problem is.... how can I change link2 to have the HTML included in it. In other words, I want to pass the field HTML to my function. So link2 must look something like
link2 = "Javascript:windowOpen2(),"<%html%>" (I've got no clue how the code should look like - just trying to demonstrate what I mean)
To explain a bit more...
There can be many "NAMES" which have webpages(HTML from my db) attached to it. I want the user to be able to click on a specific name and the corresponding webpage will open in a new window. What happens now is that all names show the SAME WEBPAGE, because right at the top (check my code) I set html = rs("html"). Thats why I need to know how to change "link2" (as example above) so that each and every NAME displayed on my page will have an unique "link2".
This was NOT easy to explain - I hope you see what I'm getting at.
Thanks,
T
I have some ASP code which reads thru a table and gets info from it like name, html etc.
This info is used to build a table in HTML which displays the NAME and if there is a link to a webpage it adds the hyperlink which I get from the HTML fields in my db.
This is how I do it... (not all the code...)
html = rs("html")
response.write "<tr><td width='33%'><p><font face='Arial'size='2'><a href=" & link2 & ">" & rs("name") & "</a></font><br></td>"
link2 = "Javascript:windowOpen2()"
this is a reference to a javascript function
This function looks like this...
<script language="JavaScript">
<!--
function windowOpen2()
{ window.open('<%=html%>',"NewWindow","width=500,height=320,noresize=yes,scrollbars=no,toolbar=0,menubar=0");
}
// end popup windows -->
</script>
html in this function is the HTML field read from my db.
My problem is.... how can I change link2 to have the HTML included in it. In other words, I want to pass the field HTML to my function. So link2 must look something like
link2 = "Javascript:windowOpen2(),"<%html%>" (I've got no clue how the code should look like - just trying to demonstrate what I mean)
To explain a bit more...
There can be many "NAMES" which have webpages(HTML from my db) attached to it. I want the user to be able to click on a specific name and the corresponding webpage will open in a new window. What happens now is that all names show the SAME WEBPAGE, because right at the top (check my code) I set html = rs("html"). Thats why I need to know how to change "link2" (as example above) so that each and every NAME displayed on my page will have an unique "link2".
This was NOT easy to explain - I hope you see what I'm getting at.
Thanks,
T