Former post : added feature to a online bookstore (still need help)

They have: 318 posts

Joined: Mar 1999

This message was was deleted from the old TWF site so here goes...

At my online bookstore (in affiliation with amazon.com) I want users to have a way to list links of books they can visit in the future in order to future investigate which books would suit their wants. Here is a site that has a good examople of what I mean: http://www.insidedhtml.com/scriptlets/controls/listbox/page1.asp

Take a look, as you can see, if you type something in, it will automatically be transfered to the little html box. I would like to have a similar type for my site (this isn't as a shopping cart - merely a way so people find books they like and they add the title to a small html box).

But there is one thing that does discourages me - the use of forms. I would like people to just click a link saying "Add to Check Out List" and when they click it, the name of the book is added to a special list in a new window (or separate frame). I made this picture from Photoshop as a test to how I'd like it to appear: .

I want to find a place where I can find out how to achive this using dhtml, javascript or whatever.

Thank you in advance,
Sabrina

------------------
47177219

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

Interesting. I like the image, it helps to see what you mean.

This sounds possible, but with JS I doubt the window could be saved. Perhaps a cookie could save the links?

I'll see what I can find out. If Lloyd stops by he might have some more ideas as well.

I'll post if I get something going or find a workable script for you.

------------------
John Pollock
http://www.pageresource.com
http://www.javascriptcity.com

They have: 5,633 posts

Joined: Jan 1970

What you would need to do is use JavaScript to create a new html document which can be displayed in a new window. Store the new document html in a variable:

htmlString = '<html><head><title>etc...'

Then prepare the code to open new window:

var windowFeatures = 'height=NUM,width=NUM,';
windowFeatures += 'screenX=NUM,screenY=NUM,top=NUM,left=NUM,';
windowFeatures += 'location=Y/N,menubar=Y/N,resizable=Y/N,';
windowFeatures += 'scrollbars=Y/N,status=Y/N,toolbar=Y/N';

newWindow = window.open('','',windowFeatures);
newWindow.document.write(htmlString);

I know this is brief but hopefully you get the idea.

------------------

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.