Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > printing an <html> ... </html> string using <href>

Reply
Thread Tools

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

 
 
John
Guest
Posts: n/a
 
      03-31-2007
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 <href> cannot 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!


 
Reply With Quote
 
 
 
 
shimmyshack
Guest
Posts: n/a
 
      03-31-2007
On 31 Mar, 07:47, "John" <john1...@yahoo.com> wrote:
> 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 <href> cannot 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 2 11-27-2010 12:12 PM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:52 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:50 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:28 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-18-2007 10:11 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57