Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Someone please help me :(

Status
Not open for further replies.

Mjj1998

Programmer
May 26, 2000
2
AU
Hi,<br><br>I'm hoping someone can help me with this. I have to create a &quot;bookmark&quot; tool which stores a list of names, url's and unique positions in a HTML document using javascript and cookies to store the information. I need to be able to generate a second document (based on this bookmark list) with two frames(left & right). On the left are &lt; INPUT type=&quot;buttons&quot;&gt; generated by javascript (one per bookmark listed). The url and site name are stored as cookies (two separate ones) and the cookies are referenced to display the name of the button and url location. Now, the command:<br><br>document.writeln(&quot;&lt;input type=\&quot;button\&quot; name=\&quot;butt&quot; +i+ &quot; \&quot; value=\&quot; &quot; +getCookie(&quot;name&quot;+i)+ &quot; \&quot; onClick=\&quot;jumper(i)\&quot;&gt;&quot;);<br><br><br>works correctly (ie: the button displays the correct NAME.) The 'onClick=\&quot;jumper(i)\&quot; ' command points to this function:<br><br>function jumper(address)<br>{<br>parent.right.location.href=&quot;+ getCookie(\&quot;name\&quot;+i)+&quot;<br>}<br>&nbsp;which is *supposed* to insert the url value for the unique url site and load it into the right frame, but instead I get an error message like: netscape cannot find the file C¦/my_hdd/work/+ getCookie(\&quot;name\&quot;+i)+<br><br>If i replace + getCookie(\&quot;name\&quot;+i)+ with http: //<A HREF=" TARGET="_new"> it loads correctly, but not when I use the cookie. Could anyone please help??<br>*******************************<br>&nbsp;Here is a copy of the entire left.html code:<br>&lt;html&gt;<br>&lt;head&gt;<br>&lt;script language=&quot;javascript&quot; src=&quot;cookie.js&quot;&gt; &lt;/script&gt;<br><br>&lt;script language=&quot;javascript&quot;&gt;<br><br><br>function buttongen()<br><br>{<br>document.writeln(&quot;&lt;form&gt;&quot;);<br><br> for (i=1;i&lt;=getCookie(&quot;maxposn&quot;);i++)<br><br> {<br> document.writeln(&quot;&lt;input type=\&quot;button\&quot; name=\&quot;butt&quot; +i+ &quot; \&quot; value=\&quot; &quot; +getCookie(&quot;name&quot;+i)+ &quot; \&quot; onClick=\&quot;jumper(i)\&quot;&gt;&quot;);<br> document.writeln(&quot;&lt;br&gt;&quot;);<br> }<br><br>document.writeln(&quot;&lt;/form&gt;&quot;);<br>}<br><br>function jumper(address)<br><br>{<br>parent.right.location.href=&quot;+ getCookie(\&quot;name\&quot;+i)+&quot;<br>}<br><br>&lt;/script&gt;<br><br>&lt;/head&gt;<br><br>&lt;body&gt;<br><br>&lt;script language=&quot;javascript&quot;&gt;<br>javascript:buttongen();<br>&lt;/script&gt;<br><br>&lt;/body&gt;<br>&lt;/html&gt;<br>*********************************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top