471,343 Members | 1,354 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,343 software developers and data experts.

printing an <html> ... </html> string using <href>

Hi

var poster="<html><head..... etc .... </html>";
var animal='dog';

The string contains images and text that changes.

Originally I wanted to do something like

print "<a href=" + poster + ">Choose Poster of a " + animal + "</a>";

When you click the 'Chose Poster of a Dog' another page would appear which
could be printed.

I now realise that <hrefcannot work in this context.

What construct should I be using?

Regards
John


--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 99008 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!
Mar 31 '07 #1
1 2112
On 31 Mar, 07:47, "John" <john1...@yahoo.comwrote:
Hi

var poster="<html><head..... etc .... </html>";
var animal='dog';

The string contains images and text that changes.

Originally I wanted to do something like

print "<a href=" + poster + ">Choose Poster of a " + animal + "</a>";

When you click the 'Chose Poster of a Dog' another page would appear which
could be printed.

I now realise that <hrefcannot work in this context.

What construct should I be using?

Regards
John

--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 99008 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!
just
var poster="/html/dog.html";
var animal='dog';
or use an iframe

markup---
<iframe src="" name="animal" ></iframe>
<a href="/html/dog.html" target="animal">Choose Poster of a dog</a>
<a href="html/cat.html" target="animal">Choose Poster of a cat</a>
and so on for sheep, bats, and crickets.
Mar 31 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by josh dismukes | last post: by
2 posts views Thread by Gregor Horvath | last post: by
6 posts views Thread by snacktime | last post: by
2 posts views Thread by Amir Eshterayeh | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.