472,960 Members | 2,286 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Javascript to modify query string of request

Searching through google groups, I have not found anyone able to modify
the query string of a request. I was hoping to make the query string
as short as possible so that a search with many criteria could be
bookmarked. I had planned to have the query string be
key=value for each criteria
But with dropdowns, the default choice is always submitted. There
were other parameters that I had to use that were longer than I hoped.
And checkboxes are actually value=on. Is there anyway to modify the
query string before the form is submitted?

One possibility that I thought of was to have a hidden field in one
form and have javascript to populate the hidden field from the form
that shows. You could submit the form with the hidden field.
Is there any easier way?

Jul 23 '05 #1
1 7095

Glenn wrote:
Searching through google groups, I have not found anyone able to modify the query string of a request. I was hoping to make the query string
as short as possible so that a search with many criteria could be
bookmarked. I had planned to have the query string be
key=value for each criteria
But with dropdowns, the default choice is always submitted. There
were other parameters that I had to use that were longer than I hoped. And checkboxes are actually value=on. Is there anyway to modify the
query string before the form is submitted?

One possibility that I thought of was to have a hidden field in one
form and have javascript to populate the hidden field from the form
that shows. You could submit the form with the hidden field.
Is there any easier way?


that comes to my mind (though i never tried it)

1. prevent the submission of the form with some eventhandler
2. have javascript read the values of the form fields
3. build your custom query string
4. window.location.href = 'somefile.htm?' + your_query_string;

if your query string has the format of

?name=value&name2=value2...
it can be used like data from a form sent with method=get

micha

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.