473,386 Members | 1,823 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,386 software developers and data experts.

page refresh with url params

219 100+
Ok, I'm very very new to javascript and am trying to use it with some coldfusion I'm doing.

I'm trying to have a page refresh when a user changes a selection in a drop down list.

Here is the code I have in my HEAD section:

Expand|Select|Wrap|Line Numbers
  1. function readDateTime(){
  2.     var n = datetimeFrm.ed_dt.selectedIndex; //get selected index value
  3.     var val = datetimeFrm.ed_dt[n].text; //get selected value
  4.     alert('You entered: ' + val);
  5.     //window.location.reload();
  6.     datetimeFrm.testingvalues.value = val;
  7.     alert(datetimeFrm.testingvalues.value);
  8.  
  9. }
  10. </script>
  11.  
I have it setup to reload, but I want to pass the "val" in the url.
I want it to be http://www...com?datetime=val
What syntax do I need to use to load a page so I can pass these values?
Sep 28 '07 #1
4 1611
gits
5,390 Expert Mod 4TB
hi ...

try to use:

Expand|Select|Wrap|Line Numbers
  1. window.location.href = window.location.href + '?datetime=' + val;
instead of reload ...

kind regards
Sep 28 '07 #2
dmorand
219 100+
hi ...

try to use:

Expand|Select|Wrap|Line Numbers
  1. window.location.href = window.location.href + '?datetime=' + val;
instead of reload ...

kind regards
Ok cool, let me give that a try
Sep 28 '07 #3
dmorand
219 100+
Ok cool, let me give that a try
Sweet it worked!! Many thanks!
Sep 28 '07 #4
gits
5,390 Expert Mod 4TB
glad to hear that you got it working ... post back to the forum anytime you have more questions ...

kind regards
Sep 28 '07 #5

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

Similar topics

6
by: user | last post by:
when i first load index.php with arguments ie: "index.php?page=x", the $_SERVERvalue is null. I then get the session id appended to each link. If i refresh the page, I get the $_SERVER I want, but...
15
by: wk6pack | last post by:
Hi, I have a problem and not quite how to go about solving it. I have a form written in asp. I wish to submit the form and have the server return back to the same page without actually...
12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
2
by: Gilles T. | last post by:
Hi, How I can refresh a modal dialog in asp.net? I open a modal dialog in first with a dropdownlist. To add a element in my dropdownlist (table), I open a second modal dialog to ask element and...
1
by: Przemek P. | last post by:
I need a button, on click you can go previous page (like histry.go(-1)) and then the page is immediately refreshed. The first page is table from database. When you click to change item, another...
6
by: Tony K | last post by:
I have the most peculiar problem with an ASP.NET page which we use for downloading a file. When the user clicks on a link, the link points to an ASPX page which downloads the file selected. ...
1
by: abdul bari | last post by:
Hi I have a standard html form which is generated by an XSL sheet. The form data is submitted to the server and is passed on to file.aspx for processing. However file.aspx is refreshed every 5...
8
by: Ed Jay | last post by:
I want to use history.go() to navigate between my previously loaded pages. I'm looking for a way to trigger a function call when a page is accessed using history.go(). Is there an event generated?...
8
by: Radx | last post by:
Here in my web application, I have a data entry page with serval controls. Some of the controls have autopostback is set true. But the problem is when two or more people are entering data at the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.