popups without html

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Dec 2008
Posts: 1
Reputation: choice43015 is an unknown quantity at this point 
Solved Threads: 0
choice43015 choice43015 is offline Offline
Newbie Poster

popups without html

 
0
  #1
Dec 13th, 2008
hello I am new to this blogging thing and have decided to try it.
I am also a Noob to JS
and am late with my webpage I am trying to enlarge an inmage in it's own pop up window without useing html as you can see in my gallery page here.
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. script language="JavaScript" type="text/javascript" src="books.js">
  2. </script>
  3. <script type="text/javascript" src="bookstore1.js">
  4. </script>
  5. </head>
  6. <body>
  7. <div id="header">
  8. <div id="logo">
  9. <h1><a href="index.html">the Collecter</a></h1>
  10. <h2><a href="index5.html" title="Member Login">Member Login</a> | <a href="index7.html" title="Register">Register</a></h2>
  11.  
  12. </div>
  13. <div id="menu">
  14. <ul>
  15. <li class="active"><a href="index.html"accesskey="1" title="">Collect</a></li>
  16. <li><a href="index2.html" accesskey="2" title="">Crystal</a></li>
  17. <li><a href="index3.html" accesskey="3" title="">Chakra </a></li>
  18. <li><a href="index4.html" accesskey="4" title="">Properties</a></li>
  19. <li><a href="index5.html" accesskey="5" title="">Members</a></li>
  20. </ul>
  21. </div>
  22. </div>
  23. <hr />
  24. <div id="page">
  25. <div id="bg">
  26. <div id="content">
  27. <div class="post" style="padding-top: 57px;">
  28. <h2 class="title">Collectible BUY AND SELL!</h2>
  29. <script type="text/javascript">
  30. document.write("<b>" + Date() + ".</b>")
  31. </script>
  32. <script type="text/javascript" src="Platform.js">
  33. </script>
  34. <div class="entry">
  35. <p align="center">
  36. <script type="text/javascript" src="bookstore2.js">
  37. </script>
  38. </p>
  39. </div>
  40.  
  41. <div id="footer">
  42. <p>(c) 2008 the collecter.com. All rights reserved.</p>
  43. </div>
  44.  
  45. </body>
  46. </html>

and my two JS code sheets here
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. // This file creates common functions for the shopcart.htm
  2. // and bookstore.htm pages
  3.  
  4. // create two variables
  5. var bookDB = new Array();
  6. var total_ordered = 0;
  7.  
  8. // create the book object
  9. function book(title, number, price, quantity, lgeImg)
  10. {
  11. this.title = title;
  12. this.number = number;
  13. this.price = price;
  14. this.quantity = quantity;
  15. this.imageSrc = "images/" + number + ".jpg";
  16. this.lgeImageSrc = "images/" + lgeImg + ".jpg";
  17. }
  18.  
  19. // assign the book information to the book database array
  20. function createBookDB()
  21. {
  22. bookDB[0] = new book(" ", "01s", 54.99, 0, "01l");
  23. bookDB[1] = new book("", "02s", 14.95, 0, "02l");
  24. bookDB[2] = new book("", "03s", 38.99, 0, "03l");
  25. bookDB[3] = new book("", "04s", 35.99, 0, "04l");
  26. bookDB[4] = new book("", "05s", 32.99, 0, "05l");
  27. bookDB[5] = new book(" ", "06s", 48.95, 0, "06l");
  28. bookDB[6] = new book("", "07s", 35.99, 0, "07l");
  29. bookDB[7] = new book("", "08s", 62.95, 0, "08l");
  30. bookDB[8] = new book("", "09s", 31.99, 0, "09l");
  31. bookDB[9] = new book("", "10s", 63.00, 0, "10l");
  32. checkQuantity();
  33. }
  34.  
  35. // check quantity function
  36. function checkQuantity()
  37. {
  38. var ordersCookie = findOrder("orders");
  39. if ( ! ordersCookie)
  40. {
  41. return
  42. }
  43. var userOrders = ordersCookie.split("+");
  44. for (var n = 0; n < userOrders.length; n ++ )
  45. {
  46. var orderNum = userOrders[n];
  47. bookDB[n].quantity = orderNum;
  48. if (orderNum > 0)
  49. {
  50. total_ordered ++ ;
  51. }
  52. }
  53. }
  54.  
  55. // find order function
  56. function findOrder(findName)
  57. {
  58. var entireCookie;
  59. var cookieName;
  60. var cookieValue;
  61. var cookieArray = document.cookie.split("; ");
  62. for (var n = 0; n < cookieArray.length; n ++ )
  63. {
  64. entireCookie = cookieArray[n].split("=");
  65. cookieName = entireCookie[0];
  66. cookieValue = entireCookie[1];
  67. if (cookieName == findName)
  68. {
  69. return unescape(cookieValue);
  70. }
  71. }
  72. return null;
  73. }
  74.  
  75.  
  76. // bookstore2 check for quantities
  77. createBookDB();
  78. if (total_ordered > 0)
  79. {
  80. document.writeln('<a href=index6.html>' + 'view shopping cart</a>');
  81. }
  82. else
  83. {
  84. document.writeln('Shopping cart is empty.');
  85. }
  86. document.writeln('<hr>');
  87.  
  88. // create the online catalog
  89. for (var n = 0; n < bookDB.length; n ++ )
  90. {
  91. document.writeln('<table width="500">');
  92. document.writeln('<td align="left" height="200" width="156">');
  93. document.writeln('<a href="javascript:void%20window.open(\'' + bookDB[n].number + '\')">');
  94. document.writeln('<img src="' + bookDB[n].imageSrc + '" border="0" ' +
  95. 'alt="' + bookDB[n].title + '"></td></a>');
  96. document.writeln('<td><b>' + bookDB[n].title + '</b><br />');
  97. document.writeln('ISBN Number: ' + bookDB[n].number + '<br />');
  98. document.writeln('<i>' + 'Price CAN $' + bookDB[n].price + '</i><br />');
  99. document.writeln('<a href="javascript:addBook(\'' +
  100. bookDB[n].number + '\')">' + '<img src="images / buy.gif" alt="buy" width="50" border="0" height="50" /></a><br /></a></td>');
  101. document.write('</td></tr></table>');
  102. }

however I cannot get it to work hopeing you can help
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC