473,569 Members | 2,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[Javascript] Checkbox values

66 New Member
[Javascript] Checkbox values

Hello.

I have a problem with this code ASP / Javascript.

The problem is JavaScript; try this LINK and select value cespiti

1) With ASP language is populated a secondary form, generated by a main form with a series of checkboxes, text fields and select;

2) Selecting different checkbox from a secondary form and compiled other fields, this values must be copied to a single field hidden in the principal form;

If the checkbox returned by the query SQL, is unique, the string:

Expand|Select|Wrap|Line Numbers
  1.  return LG.substr(); 
is right and compiled values in the field hidden in principal form.

But if the checkbox returned by the query SQL are different, the string:

Expand|Select|Wrap|Line Numbers
  1.  return LG.substr(); 
response with:

Expand|Select|Wrap|Line Numbers
  1. undefined;undefined;undefined;undefined  
Can you help me?

kind regards
mike
Sep 3 '08 #1
22 2725
acoder
16,027 Recognized Expert Moderator MVP
Can you explain what you mean by "checkbox returned by the query SQL is unique/different"?
Sep 3 '08 #2
Mike1961
66 New Member
Can you explain what you mean by "checkbox returned by the query SQL is unique/different"?
checkbox unique in the secondary form:

Expand|Select|Wrap|Line Numbers
  1. <input type="checkbox" name="DETTAGLIO_1" value="CS7">

checkbox different in the secondary form:

Expand|Select|Wrap|Line Numbers
  1.  
  2. <input type="checkbox" name="DETTAGLIO_1" value="CS7">
  3.  
  4. <input type="checkbox" name="DETTAGLIO_2" value="CS20">
  5.  
  6. <input type="checkbox" name="DETTAGLIO_3" value="NCS24">
  7.  
  8.  
Sep 3 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
How do you generate the LG string?
Sep 3 '08 #4
Mike1961
66 New Member
How do you generate the LG string?
Open this link:
http://users1.titanichost.com/MiguelRivero61/

Select "cespiti" value in the main form;

In the popup page I have secondary form;

Select checkbox and the other fields and click in the button "salva".

Generate LG string
Sep 4 '08 #5
Mike1961
66 New Member
I have change the code.

This is main form:

Expand|Select|Wrap|Line Numbers
  1.  
  2. <html>
  3. <head>
  4. <script language="javascript" type="text/javascript">
  5. <!--
  6.  
  7. // Variabile globale contenente l'istanza 'window' del popup corrente
  8. var popup = null;
  9.  
  10. function Forum(fld, tbl, col, w, h)
  11. {
  12.   var pw = Math.floor((screen.width - w) / 2);
  13.   var ph = Math.floor((screen.height - h) / 2);
  14.  
  15.   // Crea il popup solo se non è già stato aperto
  16.   if (!popup || popup.closed) popup = window.open("popup.htm?f=" + fld + "&t=" + tbl + "&c=" + col, "scelte",
  17.                                                   "width=" + w + ",height=" + h + ",top=" + ph + ",left=" + pw);
  18.  
  19.   // Attiva il popup (portalo in primo piano)
  20.   if (popup) popup.focus();
  21. }
  22.  
  23. //-->
  24. </script>
  25.  
  26. </head>
  27.  
  28. <body> 
  29.  
  30. <form name=myform action="?upload=1" method="POST">
  31.  
  32. <INPUT TYPE="hidden" NAME="dati_aggiuntivi" VALUE="xxxx">
  33.  
  34. <select size="1" name="dettaglio_visita" style="font-size: 8 pt; font-family: Verdana" onchange="Forum(this.value, 'tbl_mac_visite_ispettive_dett', 'DETTAGLIO_VERIFICA', 700, 500); this.selectedIndex = 0;">">
  35.  
  36. <option>Seleziona</option>
  37. <option value="14-Cespiti">Cespiti</option>
  38. </select> 
  39.  
  40. </form>
  41.  
  42. </body>
  43. </html>
  44.  
  45.  

This is secondary form:

Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3.  
  4. <html>
  5. <head>
  6.  
  7. <title>Popup</title>
  8. <link rel=stylesheet href=/mac/css/applicativi.css>
  9. <link rel=stylesheet href=/mac/css/menu.css>
  10.  
  11. <script language="javascript" type="text/javascript">
  12. <!--
  13.  
  14. function insertf1(f1) {
  15.  
  16.         window.opener.document.myform.dati_aggiuntivi.value=f1;
  17.         //alert("Dati aggiuntivi correttamente salvati.");
  18.         //window.close();
  19.  
  20.         return f1.substr();
  21.  
  22. }
  23.  
  24. //-->
  25. </script>
  26.  
  27. </head>
  28.  
  29. <body>
  30.  
  31. <form name="myform">
  32.  
  33.  
  34.  
  35. <p>&nbsp;</p>
  36.  
  37. <div align="center">
  38.   <table border="0" id="table1">
  39.  
  40. <tr>
  41.    <td class=blub align="center">Sottodettaglio<br>Verifica</td>
  42.    <td class=blub align="center">&nbsp;</td>
  43.    <td class=blub align="center">Eseguita?</td>
  44.    <td class=blub align="center">&nbsp;</td>
  45.    <td class=blub align="center">Esito della verifica</td>
  46.    <td class=blub align="center">&nbsp;</td>
  47.    <td class=blub align="center">Totale items<br>verificati</td>
  48.    <td class=blub align="center">&nbsp;</td>
  49.    <td class=blub align="center">di cui<br>items KO</td>
  50. </tr>   
  51.  
  52.  
  53.  
  54. <tr>
  55.    <td class=blub align="center">&nbsp;</td>
  56.    <td class=blub align="center">&nbsp;</td>
  57.    <td class=blub align="center">&nbsp;</td>
  58.    <td class=blub align="center">&nbsp;</td>
  59.    <td class=blub align="center">&nbsp;</td>
  60.    <td class=blub align="center">&nbsp;</td>
  61.    <td class=blub align="center">&nbsp;</td>
  62.    <td class=blub align="center">&nbsp;</td>
  63. </tr>   
  64.  
  65. <tr>
  66.    <td class=blub align="center">CS7</td>
  67.    <td class=blub align="center">&nbsp;</td>
  68.    <td class=blub align="center"><input type="checkbox" name="SOTTODETTAGLIO_VERIFICA_1" value="CS7"></td>
  69.    <td class=blub align="center">&nbsp;</td>
  70.    <td class=blub align="center">
  71.  
  72. <select size="1" name="Esito">
  73.    <option>Seleziona Esito</option>
  74.    <option value="Sufficiente">Sufficiente</option>
  75.    <option value="Insufficiente">Insufficiente</option>
  76.    <option value="Sufficiente con osservazioni">Sufficiente con osservazioni</option>
  77.    <option value="Dettagliato in verbale">Dettagliato in verbale</option>
  78. </select></td>
  79. <td class=blub align="center">&nbsp;</td>
  80.  
  81. <td class=blub align="center"><input type="text" name="ITEMS_1" size="5"></td>
  82. <td class=blub align="center">&nbsp;</td>
  83. <td class=blub align="center"><input type="text" name="ITEMS_KO_1" size="5"></td>
  84.  
  85. </tr>
  86.  
  87.  
  88.  
  89. <tr>
  90.    <td class=blub align="center">&nbsp;</td>
  91.    <td class=blub align="center">&nbsp;</td>
  92.    <td class=blub align="center">&nbsp;</td>
  93.    <td class=blub align="center">&nbsp;</td>
  94.    <td class=blub align="center">&nbsp;</td>
  95.    <td class=blub align="center">&nbsp;</td>
  96.    <td class=blub align="center">&nbsp;</td>
  97.    <td class=blub align="center">&nbsp;</td>
  98. </tr>   
  99.  
  100. <tr>
  101.    <td class=blub align="center">CS20</td>
  102.    <td class=blub align="center">&nbsp;</td>
  103.    <td class=blub align="center"><input type="checkbox" name="SOTTODETTAGLIO_VERIFICA_2" value="CS20"></td>
  104.    <td class=blub align="center">&nbsp;</td>
  105.    <td class=blub align="center">
  106.  
  107. <select size="1" name="Esito">
  108.    <option>Seleziona Esito</option>
  109.    <option value="Sufficiente">Sufficiente</option>
  110.    <option value="Insufficiente">Insufficiente</option>
  111.    <option value="Sufficiente con osservazioni">Sufficiente con osservazioni</option>
  112.    <option value="Dettagliato in verbale">Dettagliato in verbale</option>
  113. </select></td>
  114. <td class=blub align="center">&nbsp;</td>
  115.  
  116. <td class=blub align="center"><input type="text" name="ITEMS_2" size="5"></td>
  117. <td class=blub align="center">&nbsp;</td>
  118. <td class=blub align="center"><input type="text" name="ITEMS_KO_2" size="5"></td>
  119.  
  120. </tr>
  121.  
  122.  
  123.  
  124. <tr>
  125.    <td class=blub align="center">&nbsp;</td>
  126.    <td class=blub align="center">&nbsp;</td>
  127.    <td class=blub align="center">&nbsp;</td>
  128.    <td class=blub align="center">&nbsp;</td>
  129.    <td class=blub align="center">&nbsp;</td>
  130.    <td class=blub align="center">&nbsp;</td>
  131.    <td class=blub align="center">&nbsp;</td>
  132.    <td class=blub align="center">&nbsp;</td>
  133. </tr>   
  134.  
  135. <tr>
  136.    <td class=blub align="center">NCS24</td>
  137.    <td class=blub align="center">&nbsp;</td>
  138.    <td class=blub align="center"><input type="checkbox" name="SOTTODETTAGLIO_VERIFICA_3" value="NCS24"></td>
  139.    <td class=blub align="center">&nbsp;</td>
  140.    <td class=blub align="center">
  141.  
  142. <select size="1" name="Esito">
  143.    <option>Seleziona Esito</option>
  144.    <option value="Sufficiente">Sufficiente</option>
  145.    <option value="Insufficiente">Insufficiente</option>
  146.    <option value="Sufficiente con osservazioni">Sufficiente con osservazioni</option>
  147.    <option value="Dettagliato in verbale">Dettagliato in verbale</option>
  148. </select></td>
  149. <td class=blub align="center">&nbsp;</td>
  150.  
  151. <td class=blub align="center"><input type="text" name="ITEMS_3" size="5"></td>
  152. <td class=blub align="center">&nbsp;</td>
  153. <td class=blub align="center"><input type="text" name="ITEMS_KO_3" size="5"></td>
  154.  
  155. </tr>
  156.  
  157.  
  158.  
  159. <tr>
  160.    <td class=blub align="center">&nbsp;</td>
  161.    <td class=blub align="center">&nbsp;</td>
  162.    <td class=blub align="center">&nbsp;</td>
  163.    <td class=blub align="center">&nbsp;</td>
  164.    <td class=blub align="center">&nbsp;</td>
  165.    <td class=blub align="center">&nbsp;</td>
  166.    <td class=blub align="center">&nbsp;</td>
  167.    <td class=blub align="center">&nbsp;</td>
  168. </tr>   
  169.  
  170. <tr>
  171.    <td class=blub align="center">NCS25</td>
  172.    <td class=blub align="center">&nbsp;</td>
  173.    <td class=blub align="center"><input type="checkbox" name="SOTTODETTAGLIO_VERIFICA_4" value="NCS25"></td>
  174.    <td class=blub align="center">&nbsp;</td>
  175.    <td class=blub align="center">
  176.  
  177. <select size="1" name="Esito">
  178.    <option>Seleziona Esito</option>
  179.    <option value="Sufficiente">Sufficiente</option>
  180.    <option value="Insufficiente">Insufficiente</option>
  181.    <option value="Sufficiente con osservazioni">Sufficiente con osservazioni</option>
  182.    <option value="Dettagliato in verbale">Dettagliato in verbale</option>
  183. </select></td>
  184. <td class=blub align="center">&nbsp;</td>
  185.  
  186. <td class=blub align="center"><input type="text" name="ITEMS_4" size="5"></td>
  187. <td class=blub align="center">&nbsp;</td>
  188. <td class=blub align="center"><input type="text" name="ITEMS_KO_4" size="5"></td>
  189.  
  190. </tr>
  191.  
  192.  
  193.  
  194. <tr>
  195.    <td class=blub align="center">&nbsp;</td>
  196.    <td class=blub align="center">&nbsp;</td>
  197.    <td class=blub align="center">&nbsp;</td>
  198.    <td class=blub align="center">&nbsp;</td>
  199.    <td class=blub align="center">&nbsp;</td>
  200.    <td class=blub align="center">&nbsp;</td>
  201.    <td class=blub align="center">&nbsp;</td>
  202.    <td class=blub align="center">&nbsp;</td>
  203. </tr>   
  204.  
  205. <tr>
  206.    <td class=blub align="center">CS21</td>
  207.    <td class=blub align="center">&nbsp;</td>
  208.    <td class=blub align="center"><input type="checkbox" name="SOTTODETTAGLIO_VERIFICA_5" value="CS21"></td>
  209.    <td class=blub align="center">&nbsp;</td>
  210.    <td class=blub align="center">
  211.  
  212. <select size="1" name="Esito">
  213.    <option>Seleziona Esito</option>
  214.    <option value="Sufficiente">Sufficiente</option>
  215.    <option value="Insufficiente">Insufficiente</option>
  216.    <option value="Sufficiente con osservazioni">Sufficiente con osservazioni</option>
  217.    <option value="Dettagliato in verbale">Dettagliato in verbale</option>
  218. </select></td>
  219. <td class=blub align="center">&nbsp;</td>
  220.  
  221. <td class=blub align="center"><input type="text" name="ITEMS_5" size="5"></td>
  222. <td class=blub align="center">&nbsp;</td>
  223. <td class=blub align="center"><input type="text" name="ITEMS_KO_5" size="5"></td>
  224.  
  225. </tr>
  226.  
  227.  
  228.  
  229. <tr>
  230.    <td class=blub align="center">&nbsp;</td>
  231.    <td class=blub align="center">&nbsp;</td>
  232.    <td class=blub align="center">&nbsp;</td>
  233.    <td class=blub align="center">&nbsp;</td>
  234.    <td class=blub align="center">&nbsp;</td>
  235.    <td class=blub align="center">&nbsp;</td>
  236.    <td class=blub align="center">&nbsp;</td>
  237.    <td class=blub align="center">&nbsp;</td>
  238. </tr>   
  239.  
  240. <tr>
  241.    <td class=blub align="center">CS29</td>
  242.    <td class=blub align="center">&nbsp;</td>
  243.    <td class=blub align="center"><input type="checkbox" name="SOTTODETTAGLIO_VERIFICA_6" value="CS29"></td>
  244.    <td class=blub align="center">&nbsp;</td>
  245.    <td class=blub align="center">
  246.  
  247. <select size="1" name="Esito">
  248.    <option>Seleziona Esito</option>
  249.    <option value="Sufficiente">Sufficiente</option>
  250.    <option value="Insufficiente">Insufficiente</option>
  251.    <option value="Sufficiente con osservazioni">Sufficiente con osservazioni</option>
  252.    <option value="Dettagliato in verbale">Dettagliato in verbale</option>
  253. </select></td>
  254. <td class=blub align="center">&nbsp;</td>
  255.  
  256. <td class=blub align="center"><input type="text" name="ITEMS_6" size="5"></td>
  257. <td class=blub align="center">&nbsp;</td>
  258. <td class=blub align="center"><input type="text" name="ITEMS_KO_6" size="5"></td>
  259.  
  260. </tr>
  261.  
  262.  
  263.  
  264.   </td>
  265.     </tr>
  266.  
  267. <tr>
  268.    <td class=blub align="center">&nbsp;</td>
  269.    <td class=blub align="center">&nbsp;</td>
  270.    <td class=blub align="center">&nbsp;</td>
  271.    <td class=blub align="center">&nbsp;</td>
  272.    <td class=blub align="center">
  273.  
  274. &nbsp;</td>
  275. <td class=blub align="center">&nbsp;</td>
  276.  
  277. <td class=blub align="center">&nbsp;</td>
  278. <td class=blub align="center">&nbsp;</td>
  279. <td class=blub align="center">&nbsp;</td>
  280.  
  281. </tr>
  282.  
  283. <tr>
  284.    <td class=blub align="center" colspan="9">
  285.    <div align="center">
  286.      <table border="0" id="table3">
  287.        <tr>
  288.          <td><p align="center">
  289.             <a href="javascript:insertf1(document.myform.SOTTODETTAGLIO_VERIFICA_6.value+';'+document.myform.Esito.value+';'+document.myform.ITEMS_6.value+';'+document.myform.ITEMS_KO_6.value)">
  290.             <img border="0" src="salva_button.gif" width="84" height="16"></a></td>
  291.          <td>&nbsp;</td>
  292.          <td><p align="center"><a href="javascript:void(0);" onclick="window.close()">
  293.              <input type="image"src="chiudi_button.gif" border="0" align="middle" name="I5"></a></td>
  294.        </tr>
  295.      </table>
  296.    </div>
  297.    </td>
  298.  
  299. </tr>
  300.  
  301. <tr>
  302.    <td class=blub align="center">&nbsp;</td>
  303.    <td class=blub align="center">&nbsp;</td>
  304.    <td class=blub align="center">&nbsp;</td>
  305.    <td class=blub align="center">&nbsp;</td>
  306.    <td class=blub align="center">
  307.  
  308. &nbsp;</td>
  309. <td class=blub align="center">&nbsp;</td>
  310.  
  311. <td class=blub align="center">&nbsp;</td>
  312. <td class=blub align="center">&nbsp;</td>
  313. <td class=blub align="center">&nbsp;</td>
  314.  
  315. </tr>
  316.  
  317.   </table>
  318. </div>
  319.  
  320. </form>
  321.  
  322. </body>
  323. </html>
  324.  
  325.  
Sep 4 '08 #6
acoder
16,027 Recognized Expert Moderator MVP
The problem is line 286:
Expand|Select|Wrap|Line Numbers
  1. <a href="javascript:insertf1(document.myform.SOTTODETTAGLIO  _VERIFICA_6.value+';'+document.myform.Esito.value+  ';'+document.myform.ITEMS_6.value+';'+document.myf  orm.ITEMS_KO_6.value)">
What do you actually want to happen? For example, if I select checkbox 1, do you want anything to appear, or do you always want to pass the last row data?
Sep 4 '08 #7
Mike1961
66 New Member
The problem is line 286:
Expand|Select|Wrap|Line Numbers
  1. <a href="javascript:insertf1(document.myform.SOTTODETTAGLIO  _VERIFICA_6.value+';'+document.myform.Esito.value+  ';'+document.myform.ITEMS_6.value+';'+document.myf  orm.ITEMS_KO_6.value)">
What do you actually want to happen? For example, if I select checkbox 1, do you want anything to appear, or do you always want to pass the last row data?
Ok I understand.

I need insert in the string:

Expand|Select|Wrap|Line Numbers
  1. <a href="javascript:insertf1(document.myform.SOTTODETTAGLIO  _VERIFICA_6.value+';'+document.myform.Esito.value+  ';'+document.myform.ITEMS_6.value+';'+document.myf  orm.ITEMS_KO_6.value)">
all the values selected in the secondary form and insert this string in the hidden field of the main form; whether a value or more values.
Sep 4 '08 #8
acoder
16,027 Recognized Expert Moderator MVP
Is there a particular reason why the elements are named differently? You can use the same name, just not the same ID. If you have the same name, you can use document.getEle mentsByName() to get a list/array of elements which you can loop over. Check the checked property of the checkboxes to see if that row is one of the selected ones to pass the values through.
Sep 4 '08 #9
Mike1961
66 New Member
Is there a particular reason why the elements are named differently? You can use the same name, just not the same ID. If you have the same name, you can use document.getEle mentsByName() to get a list/array of elements which you can loop over. Check the checked property of the checkboxes to see if that row is one of the selected ones to pass the values through.

Ok, I try this but response with error 'Object required', why?:


Expand|Select|Wrap|Line Numbers
  1.  
  2. function insertf1(stringa) 
  3.  
  4. {
  5.  
  6.    var s = "";
  7.    for( var i = 0; i < 7; i++)
  8.  
  9.   {
  10.  
  11.       s += "," + document.getElementById('test_'+i).value;
  12.  
  13.    }   
  14.         window.opener.document.myform.dati_aggiuntivi.value=s;
  15.  
  16.         return s.substr();
  17.  
  18. }
  19.  
  20. <select size="1" id=test_1" name="test_1">
  21. ...
  22. </select>
  23.  
  24. <select size="1" id=test_2" name="test_2">
  25. ...
  26. </select>
  27.  
  28. <select size="1" id=test_3" name="test_3">
  29. ...
  30. </select>
  31.  
  32. <input type="checkbox" name="SOTTODETTAGLIO_VERIFICA_1" value="NCS43">
  33.  
  34. <input type="checkbox" name="SOTTODETTAGLIO_VERIFICA_2" value="NCS44">
  35.  
  36. <input type="checkbox" name="SOTTODETTAGLIO_VERIFICA_3" value="NCS28">
  37.  
  38. <a href="#" onclick="insertf1();return false;">
  39.  
  40.  
Sep 4 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

6
2519
by: den 2005 | last post by:
Hi everybody, Question 1: How do you set the values from server-side to a client-side control or how do you execute a javascript function without a button click event? Question 2: How do you get response from a Confirm() popup window to uncheck all server-side checkboxes placed in a panle of a web user control? I am using ASP.Net 2.0, ...
13
39415
by: Oleg Konovalov | last post by:
Hi, I am working on a web application which among other things uses DHTML, Java and Javascript. It populates web page based on the contents of the database (resultset), and next to each row there is a checkbox (v1) allowing to select that row for changes (e.g. delete, update, etc.) So we are creating an array of checkbox, correct ? Of...
3
2086
by: anthonybrough | last post by:
I have an asp page that has a form to collect user data in a form. when the user clicks submit the input is validated. If any fields are not acceptable the user clicks on a button to go back to the original form to correct the input. This all works fine until I try to incorporate a javascript to display a popup calendar which posts the...
0
7697
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7672
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.