Title: How to add javascript into specific posts/pages ??
Last modified: August 22, 2016

---

# How to add javascript into specific posts/pages ??

 *  [surendra.psd](https://wordpress.org/support/users/surendrapsd/)
 * (@surendrapsd)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/how-to-add-javascript-into-specific-postspages/)
 * I have two page. In first page – a simple form with three input text fields. 
   And i want the values of these fields into another page with the same values 
   of the form. The first page form is
 *     ```
       <form name="parameters" method="GET" action="second-page-url">
             <p> Login:
               <input type="text" name="login" value="">
             </p>
             <p> Password:
               <input type="text" name="password" value="">
             </p>
       	  <p> Email:
               <input type="text" name="email" value="">
             </p>
       	<p>
               <input type="submit" name="submit" value="Send data">
             </p>
           </form>
       ```
   
 * And for Second Page – the form is
 *     ```
       <h2>Received: </h2>
       <form name="parameters" method="GET" action="">
       <fieldset>
             <p> Login:
               <input type="text" name="login" value="" id="login">
             </p>
             <p> Password:
               <input type="text" name="password" value="" id="password" readonly>
             </p>
       	  <p> Email:
               <input type="text" name="email" value="" id="email" readonly>
             </p>
            </fieldset>
           </form>
       ```
   
 * and below this form I used the javascript code to get the values of the first
   page’s form into the second page form.
 *     ```
       <script language="JavaScript">
   
       		var parameters = location.search.substring(1).split("&");
   
       		var temp = parameters[0].split("=");
       		l = unescape(temp[1]);
   
       		temp = parameters[1].split("=");
       		c = unescape(temp[1]);
   
       		temp = parameters[2].split("=");
       		e =  unescape(temp[1]);
   
       		temp = parameters[3].split("=");
       		p =  unescape(temp[1]);
   
       		document.getElementById("login").value = l;
       		document.getElementById("password").value = c;
       		document.getElementById("email").value = e;
   
       </script>
       ```
   
 * Please help – Or how it can be achieved?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Radices](https://wordpress.org/support/users/radices/)
 * (@radices)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/how-to-add-javascript-into-specific-postspages/#post-5707749)
 * You might be able to do that with a plugin such as
 * [https://wordpress.org/plugins/css-javascript-toolbox/](https://wordpress.org/plugins/css-javascript-toolbox/)
 * There are also lots of Form plugins that could do that.
 * Gravity Forms
    Formidable Forms
 *  Thread Starter [surendra.psd](https://wordpress.org/support/users/surendrapsd/)
 * (@surendrapsd)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/how-to-add-javascript-into-specific-postspages/#post-5707819)
 * Thanks! for your reply. I will come back after implementing that.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How to add javascript into specific posts/pages ??’ is closed to new 
replies.

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [surendra.psd](https://wordpress.org/support/users/surendrapsd/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/how-to-add-javascript-into-specific-postspages/#post-5707819)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
