By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,837 Members | 1,660 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,837 IT Pros & Developers. It's quick & easy.

URGENT>>> HTML and Javascript question

P: n/a
Hello all

I am using a datafeed that provides me with a Javascript that spits
out a bunch of hyperlinks to other locations.

Her is what it looks like:

<script language="javascript"
src=http://datafeed.XXXXXX.com/YYY.asp?area=XX&stories=10&url=www.ABC.com>
</script>

<script language="javascript">
for (row= 0;row < Docs.length; row++)
{
document.writeln(" <li class=\"style1\" target=\"_blank\">" +
Docs[row] + " </li> <br>");
}
</script>

This will spit out a bunch of hyperlinks with bullets

* link1
* link2
* link3

The problem is that these links DO NOT pop up a new window. Instead,
they just open in the current window.

Since I do not have access to hyperlink HTML code to insert a
target=_blank tag, I am stuck and can not figure out what to do. I
need each link to pop open in a new window.

Given that I can insert HTML tags insire the document.writeln, is
there anything that I can put there that would solve my problem.

Please advise ASAP.

Thank you in advance
Albert
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
In article <45**************************@posting.google.com >,
al****@saabconsulting.com enlightened us with...

Given that I can insert HTML tags insire the document.writeln, is
there anything that I can put there that would solve my problem.


Yes.
See my little example.
Apply as appropriate.
Tested in IE6.

<html>
<head>
<title> New Document </title>
</head>

<body>
<base target="_blank">
New<br>
<a href="http://www.google.com">Google</a><br>
<a href="http://www.yahoo.com">Yahoo</a><br>
<base target="_self">
Self<br>
<a href="http://www.google.com">Google</a><br>
<a href="http://www.yahoo.com">Yahoo</a><br>

</body>
</html>

--
--
~kaeli~
Murphy's Law #2030: If at first you don't succeed, destroy
all evidence that you tried.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2

P: n/a
> <script language="javascript">
for (row= 0;row < Docs.length; row++)
{
new_win =
window.open('','new_win','resizable=yes,scrollbars =yes,width=800,height=625,left=200,top=10');
new_win.document.open("text/html");
new_win.document.writeln("<html><body><ul>");
new_win.document.writeln("<li class=\"style1\" target=\"_blank\">" +
Docs[row] + " </li>");
new_win.document.writeln("</ul></body></html>");
new_win.document.close();
}
</script>


Dont know why you would want this but try that.

Mike
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.