473,396 Members | 2,050 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.

java script querystring value hide

karthickkuchanur
156 100+
I want to hide the following value to hide when i call the url
Expand|Select|Wrap|Line Numbers
  1. <script>
  2.  function callEmployeeEducationalHistory()
  3.   {
  4.       document.forms[0].action='/echain/hr/EducationalHistoryFetch.echn?&employeeCode=' +document.forms[0].employeeCode.value+'&employeeName=' +document.forms[0].employeeName.value
  5.                                                                                        +'&hrUnitName='+document.forms[0].hrUnitName.value+'&type='+"EMPLOYEE";
  6.       document.forms[0].submit();
  7.  
  8.   }
  9. </script>

i want to hide the query string value when i submit
Mar 7 '08 #1
22 4193
hsriat
1,654 Expert 1GB
I want to hide the following value to hide when i call the url
<script>
function callEmployeeEducationalHistory()
{
document.forms[0].action='/echain/hr/EducationalHistoryFetch.echn?&employeeCode='+docum ent.forms[0].employeeCode.value+'&employeeName='+document.form s[0].employeeName.value
+'&hrUnitName='+document.forms[0].hrUnitName.value+'&type='+"EMPLOYEE";
document.forms[0].submit();

}
</script>


i want to hide the query string value when i submit
Show your HTML employed for displaying input fields.
Mar 7 '08 #2
karthickkuchanur
156 100+
Show your HTML employed for displaying input fields.
<html:text property="employeeCode" styleClass="TextboxFont" />
Mar 7 '08 #3
hsriat
1,654 Expert 1GB
<html:text property="employeeCode" styleClass="TextboxFont" />
Is there any special reason for you using JavaScript for submitting the form?
Use the post method to submit. Set the url as action of the form and name all the other inputs according to the variables you need to post.
Mar 7 '08 #4
karthickkuchanur
156 100+
Is there any special reason for you using JavaScript for submitting the form?
Use the post method to submit. Set the url as action of the form and name all the other inputs according to the variables you need to post.
Actually i want link three form in single form sir
Mar 7 '08 #5
hsriat
1,654 Expert 1GB
Actually i want link three form in single form sir
Then just change the action attribute, don't join variables with that.
And use method as post.
Mar 7 '08 #6
karthickkuchanur
156 100+
Then just change the action attribute, don't join variables with that.
And use method as post.
please alter this i cant able to get u
Expand|Select|Wrap|Line Numbers
  1. document.forms[0].action='/echain/hr/EducationalHistoryFetch.echn?&employeeCode=' +document.forms[0].employeeCode.value+'&employeeName=' +document.forms[0].employeeName.value +'&hrUnitName='+document.forms[0].hrUnitName.value+'&type='+"EMPLOYEE";
Mar 7 '08 #7
hsriat
1,654 Expert 1GB
please alter this i cant able to get u
document.forms[0].action='/echain/hr/EducationalHistoryFetch.echn?&employeeCode='+docum ent.forms[0].employeeCode.value+'&employeeName='+document.form s[0].employeeName.value
+'&hrUnitName='+document.forms[0].hrUnitName.value+'&type='+"EMPLOYEE";

What are the URLs for all the three buttons?
Mar 7 '08 #8
karthickkuchanur
156 100+
What are the URLs for all the three buttons?
echain/hr/EducationalHistoryFetch.echn
echain/hr/EmployeeBackGroundFetch.echn


the query string value are

http://localhost:6060/echain/hr/Educ...loyeeCode=0052 &employeeName=A%20%20B&hrUnitName=CDS-HR&type=EMPLOYEE
i want to hide the above query striing value
Mar 7 '08 #9
hsriat
1,654 Expert 1GB
[html]<form method="post">
<input type="text" name="employeeCode" value="" />
<input type="text" name="employeeName" value="" />
<input type="text" name="hrUnitName" value="" />
<input type="hidden" name="type" value="EMPLOYEE" />
<input type="submit" name="Get employee details" onclick="document.forms[0].action = 'echain/hr/EducationalHistoryFetch.echn'; return true;" />
</form>[/html]Keep all the other three submit buttons in similar way, but different name. And for onclick event, add the action of the form accordingly.

Try this and tell me if it works.
Mar 7 '08 #10
karthickkuchanur
156 100+
[html]<form method="post">
<input type="text" name="employeeCode" value="" />
<input type="text" name="employeeName" value="" />
<input type="text" name="hrUnitName" value="" />
<input type="hidden" name="type" value="EMPLOYEE" />
<input type="submit" name="Get employee details" onclick="document.forms[0].action = 'echain/hr/EducationalHistoryFetch.echn'; return true;" />
</form>[/html]Keep all the other three submit buttons in similar way, but different name. And for onclick event, add the action of the form accordingly.

Try this and tell me if it works.

Actually i called the javascript method out form the form ,like

[HTML]<html:form action="/EmployeeAdditionalInfoAction" method="post">
<table width="90%" cellspacing="5px" cellpadding="0px" border="0" align='center'>.............
[/HTML]
Here some code for buitton when i click the buttton it will call javascript method
like i put the code below



Expand|Select|Wrap|Line Numbers
  1. </form>
  2.  
  3. function callEmployeeEducationalHistory()
  4.   {
  5.  
  6.       document.forms[0].action='/echain/hr/EducationalHistoryFetch.echn?&employeeCode=' +document.forms[0].employeeCode.value+'&employeeName=' +document.forms[0].employeeName.value                                                                                      +'&hrUnitName='+document.forms[0].hrUnitName.value +'&type='+"EMPLOYEE";
  7.       document.forms[0].submit();
  8.  
  9.   }
  10.  
  11.  
if do like that i will the value in the browser,just i want to hide that info
Mar 7 '08 #11
hsriat
1,654 Expert 1GB
Ok, the main point is: That can only be hidden if you use post method.

And don't call callEmployeeEducationalHistory() function, as the form will itself post all the inputs, you don't have to join them manually.
Mar 7 '08 #12
karthickkuchanur
156 100+
Ok, the main point is: That can only be hidden if you use post method.

And don't call callEmployeeEducationalHistory() function, as the form will itself post all the inputs, you don't have to join them manually.
what i have to do with this,whether i able to hide the information
Mar 7 '08 #13
karthickkuchanur
156 100+
Ok, the main point is: That can only be hidden if you use post method.

And don't call callEmployeeEducationalHistory() function, as the form will itself post all the inputs, you don't have to join them manually.
please give me some solution sir
Mar 7 '08 #14
hsriat
1,654 Expert 1GB
please give me some solution sir
I have already given you the solution. But somehow you are not able to explain properly what you need.
Post your code, not just snippets, with proper [code] or [HTML] tags. Then I can try.
Mar 7 '08 #15
acoder
16,027 Expert Mod 8TB
Karthick, as a full member now, you should know that we expect your code to be posted in [code] tags (See How to Ask a Question).

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

Please use the tags in future.

MODERATOR.
Mar 7 '08 #16
karthickkuchanur
156 100+
Karthick, as a full member now, you should know that we expect your code to be posted in [code] tags (See How to Ask a Question).

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

Please use the tags in future.

MODERATOR.
Why i am not able to post the code means,i have doubts while i develop the code for my company,i am not have rights to post the code tp public sorry sir
Mar 8 '08 #17
karthickkuchanur
156 100+
Karthick, as a full member now, you should know that we expect your code to be posted in [code] tags (See How to Ask a Question).

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

Please use the tags in future.

MODERATOR.
Why i am not able to post the code means,i have doubts while i develop the code for my company,i am not have rights to post the code to public sorry sir
Mar 8 '08 #18
hsriat
1,654 Expert 1GB
Why i am not able to post the code means,i have doubts while i develop the code for my company,i am not have rights to post the code to public sorry sir
Karthick,

I have helped you as much as I could although it was difficult for me to understand your problem. I would suggest you to search for some good tutorials on google.

Harpreet
Mar 8 '08 #19
acoder
16,027 Expert Mod 8TB
Why i am not able to post the code means,i have doubts while i develop the code for my company,i am not have rights to post the code to public sorry sir
I was referring to the code that you've already posted which was not enclosed within [code] tags.
Mar 8 '08 #20
acoder
16,027 Expert Mod 8TB
Expand|Select|Wrap|Line Numbers
  1. </form>
  2.  
  3. function callEmployeeEducationalHistory()
  4.   {
  5.  
  6.       document.forms[0].action='/echain/hr/EducationalHistoryFetch.echn?&employeeCode=' +document.forms[0].employeeCode.value+'&employeeName=' +document.forms[0].employeeName.value                                                                                      +'&hrUnitName='+document.forms[0].hrUnitName.value +'&type='+"EMPLOYEE";
  7.       document.forms[0].submit();
  8.  
  9.   }
  10.  
  11.  
if do like that i will the value in the browser,just i want to hide that info
The values show because you added them to the action URL. If, instead, as hsriat has explained, you don't add them to the action URL,but let things be, the values will be POST-ed to the server. The only difference is that in your server-side code, you will need to retrieve them as POST values, not GET values.
Mar 8 '08 #21
karthickkuchanur
156 100+
Karthick,

I have helped you as much as I could although it was difficult for me to understand your problem. I would suggest you to search for some good tutorials on google.

Harpreet
thank u very much for uderstandiing me
Mar 10 '08 #22
hsriat
1,654 Expert 1GB
thank u very much for uderstandiing me
You are welcome.

Harpreet
Mar 10 '08 #23

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

Similar topics

6
by: Robert Cohen | last post by:
Hi All, I have what is an easy question for you all, but I have not idea (this is in vbscript). I have this script below that works great. It figures out the user logged in and gives the AD...
2
by: . . | last post by:
Hi I need some help with java script . I have a ASPX page that is pulling a user message heading from the table on the page . The user message header has message body which suppose to dispay...
3
by: Cantekin Guneser | last post by:
in my project i ahave frame sets i want to main frame to direct a url with query string when press a button that is at left frame vit java script code thanks in advance for ayn hepl or idea
1
by: CR1 | last post by:
I found a great cookie script below, but don't know how to make it also pass the values sent to the cookie, to a querystring as well for tracking purposes. Can anyone help? If there was a way to...
0
by: jegray | last post by:
I am very much a beginner in dealing with connection statments. I am getting the following error: Microsoft OLE DB Provider for ODBC Drivers error '80004005' Data source name not found and no...
5
by: rn5a | last post by:
A MS-Access database table has 2 columns - UserID (unique) of number data type & UserName (text) along with some other columns. When users come to a particular page, say, AllUsers.asp, all the...
2
by: emily224 | last post by:
Hello, I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer...
5
by: sandipon | last post by:
I have used the following Pagination script to display database records in a series of pages, but only the first page shows up properly, and on clicking the links of subsequent pages or the NEXT ,...
2
by: ganesh22 | last post by:
Hi, How to Hide QueryString Value in asp.net? ex: iam having the link like this http://forums.asp.net/AddPost.aspx?ForumID=22 so i want to hide ForumID value there in some urls i saw like...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.