473,396 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how do you get query variables into a text field??

hi i have been writting some HTML code and i have a web page that sends a username and password via a form post (can also use get) to another HTML page. I need to get the variables out of the query string and into 2 textboxes, these will then be passed into an IFrame containing a webpage from a third party.

here is the query string i get in the navigation bar using the get method.

http://localhost/black%20box/test.html?Uid=testing&PWD=TEST56789&Submit=Logon+. ..

here is the code for the HTML page containing the text boxes.

Expand|Select|Wrap|Line Numbers
  1. <html>
  2.     <HEAD>
  3.         <script language="JavaScript" id="log_in" type="text/javascript">
  4.             t = null;
  5.             var str = "";
  6.             var fullURL = "";
  7.             var xxx = "";
  8.             function getInfo()
  9.             {
  10.  
  11.             }
  12.             function post_info()
  13.             {
  14.                 document.postInfo.submit();
  15.             }
  16.             function post_info2()
  17.             {
  18.                 document.postInfo2.submit();
  19.             }
  20.             function change_page();
  21.             {
  22.                 str += "http://62.231.143.98/guardnet/Online.ASP?WCI=Login&WCE=Login&WCU="
  23.                 window.location = str;
  24.             }
  25.         </script>
  26.     </HEAD>
  27.     <BODY onload="post_info()">
  28.         <iframe name="ourSite" src="http://localhost/black%20box/monlog.shtml"></iframe>
  29.         <iframe name="theirSite" src="http://62.231.143.98/guardnet/Online.asp?WCI=Welcome&amp;WCI=Home"></iframe>
  30.         <!--<frameset cols="0%,100%">
  31.     <frame name="theirSite" src="http://62.231.143.98/guardnet/Online.ASP?WCI=Login&WCE=Login&WCU=">
  32.     <frame name="ourSite" src="http://localhost/black%20box/monlog.shtml">
  33. </frameset>-->
  34.         <form method="post" target="theirSite" name="postInfo" ID="Form1">
  35.             <div align="center" runat="server">
  36.                 <table ID="Table1">
  37.                     <tr>
  38.                         <td>
  39.                             <input type="hidden" name="Uid" ID="Uid"><br>
  40.                             <input type="hidden" name="PWD" ID="PWD">
  41.                         </td>
  42.                     </tr>
  43.                 </table>
  44.             </div>
  45.         </form>
  46.     </BODY>
  47. </html>
  48.  
how do i get the information - testing and test56789 out of the query string and into the 2 hidden boxes?
Oct 23 '07 #1
1 1751
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!

Normally, you'd use server-side code for this and especially when usernames and passwords are involved.

Anyway, you could use the String object methods to parse the location.search property.
Oct 23 '07 #2

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

Similar topics

3
by: Steve Macleod | last post by:
Hi there, Newbie at this, so here goes: I am attempting to build a page that updates multiple records. The page uses as its input, a series of dynamically generated text boxes from the...
6
by: Martin Lacoste | last post by:
Ok, before I headbutt the computer... don't know why when I add criteria in a query, I get an 'invalid procedure call'. I also don't know why after searching the help in access, the various access...
1
by: Eskil | last post by:
Hi I have a form that supplies my query with information on two different variables. The form uses a lookup to display a list of 5 different customer types and 5 different types of...
7
by: rednexgfx_k | last post by:
All, Problem Summary: I've running about 30 make table queries via VBA in Access 2000, and my database goes from 14,000k to over 2,000,000k. In addition, the longer the procedure runs, the...
6
by: jjturon | last post by:
Can anyone help me?? I am trying to pass a Select Query variable to a table using Dlookup and return the value to same select query but to another field. Ex. SalesManID ...
3
by: george.lengel | last post by:
Hello experts, I have been struggling for days to solve this problem and every suggestion I find via Google does not work for me. There is probably a solution out there that will do what I want,...
3
accessbunnie
by: accessbunnie | last post by:
Hello Access Users! I am a bit of an Access novice and am currently creating a database and have come up against a huge (for me!) road block. I do not write in Access code and instead, tend to...
3
by: pbd22 | last post by:
Hi. I need some help with structuring my query strings. I have a form with a search bar and some links. Each link is a search type (such as "community"). The HREF for the link's anchor looks...
4
by: zion4ever | last post by:
Hello good people, Please bear with me as this is my first post and I am relative new to ASP. I do have VB6 experience. I have a form which enables users within our company to do an intranet...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.