My client has permission to use the online financial calculators of one of the insurance companies that supplies his company. I have linked to the calculators, and am now trying to use javascript to have each calculator appear in a pre-sized new window, without leaving the client's website. I used the following code for each link (things have been left generic to protect the anonymous):
1. I know I have the URL twice - once in the javascript and once just in the link, but if I take out the second URL, my link disappears. With both there, I get my calculator in a new window just like I want it, but then it also opens in the other company's website (leaving my client's website). So there I have the calculator twice, once in a large window and once in a small one.HTML Code:<p><a onClick="window.open('http://www.URL.com/calculator.jsp', 'name', 'height=305,width=605')" href="http://www.URL.com/calculator.jsp">RRSP Calculator</a> - Start planning now so you can retire with peace of mind.</p>
2. My second problem is that the small new window only shows up for the first calculator link, not the others (there are about eight) even though my javascript code is the same except for the URL.
3. My third problem is that I can't seem to get the small window to resize when I change the height and width in the code.
Could someone please take a look at what I have and tell me what went wrong? (I know next to nothing about Javascript and am struggling with how to fix this.)





Bookmarks