473,396 Members | 1,784 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.

Refreshing a Web Page using Javascript

Hi there,

I'm new to this group, so first of all I'd like to say a big "Hello"!

Moving on, I'm a database developer who has found himself in a grey
zone between the database and the web front end. I'm making some
enhancements to an Oracle database that's using a (now obsolete and
unsupported) utility called "WebDB" to provide a related web
application.

I'm making changes to some really horrible legacy stuff; HTML embedded
in native Oracle PL/SQL code.

I have what I believe to be a reasonable basic grasp of Javascript
(I'm aware of the DOM and how to reference HTML items in a Web Form),
but occasionally I'm coming unstuck. This is one such occasion.

I have a web page in which I'm planning to include an HTML <SELECT></
SELECTlist. I'd like to use this <SELECTlist's ONCHANGE event
trigger to call a Javascript Method that will, if the <OPTIONitem in
the <SELECTlist has changed, refresh the web page via an HTTP
request (I'm not sure if I should be using a GET or POST request, but
a GET ought to be sufficient for my purposes).

When I call the page URL, I want to pass a parameter back to it (based
on the <OPTIONvalue selected) to dictate which data will be
returned, so I cannot use a simple page refresh.

If anyone reading this could suggest the best/most efficient way I
could do this based on my limited Javascript knowledge, then that
would be great?

Thanks in advance.

James
Dec 3 '07 #1
2 2000
Jimbo1 said the following on 12/3/2007 10:28 AM:
Hi there,
<snip>
I have a web page in which I'm planning to include an HTML <SELECT></
SELECTlist. I'd like to use this <SELECTlist's ONCHANGE event
trigger to call a Javascript Method that will, if the <OPTIONitem in
the <SELECTlist has changed, refresh the web page via an HTTP
request (I'm not sure if I should be using a GET or POST request, but
a GET ought to be sufficient for my purposes).

When I call the page URL, I want to pass a parameter back to it (based
on the <OPTIONvalue selected) to dictate which data will be
returned, so I cannot use a simple page refresh.
<select name="something" onchange="this.form.submit()">

And then have the server read the value of the select element named
"something" and return the data you want returned for that value.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 3 '07 #2
On 3 Dec, 18:20, Randy Webb <HikksNotAtH...@aol.comwrote:
Jimbo1 said the following on 12/3/2007 10:28 AM:
Hi there,

<snip>
I have a web page in which I'm planning to include an HTML <SELECT></
SELECTlist. I'd like to use this <SELECTlist's ONCHANGE event
trigger to call a Javascript Method that will, if the <OPTIONitem in
the <SELECTlist has changed, refresh the web page via an HTTP
request (I'm not sure if I should be using a GET or POST request, but
a GET ought to be sufficient for my purposes).
When I call the page URL, I want to pass a parameter back to it (based
on the <OPTIONvalue selected) to dictate which data will be
returned, so I cannot use a simple page refresh.

<select name="something" onchange="this.form.submit()">

And then have the server read the value of the select element named
"something" and return the data you want returned for that value.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/
That's great. Thanks for your help Randy. ;o)
Dec 4 '07 #3

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

Similar topics

10
by: Philo Del Middleston | last post by:
I've been searching, but apparently not phrasing my search right, so I'm going to float a question out here in the meantime... I'm wondering how to go about refreshing the content of a control...
3
by: John Ortt | last post by:
I appologise for reposting this but I have been trying to find a solution all week with no avail and I was hoping a repost might help somebody more knowledgable than myself to spot the message... ...
2
by: jdi | last post by:
Hello, I have a seemingly basic question about ASP.NET. I would like to create a page containing an image, which keeps swapping the url of the image source, without refreshing the entire page. ...
4
by: Dan | last post by:
Hi, i'm not sure to understand the difference between refreshing the pagina by clicking on 'refresh' in the browser and a postback. What i think it is: Suppose a page with a form containing a...
13
by: honey99 | last post by:
Hi! I have to fix a problem in JSP.Actually,i have a JSP page say Ex1.jsp.In this Ex1.jsp i have an anchor tag which links into another JSP page i.e when i click on the link another pop-up window...
3
polymorphic
by: polymorphic | last post by:
I have succeeded in embedding PDF files in a dynamic iframe. The problem is that I need the PDF to cache. If the PDF remains the same from page load to page load then the pdf is somehow cached with...
2
by: stevemtno | last post by:
I've got a problem with a web page I'm working on. I have 4 modules - one of them has 2 tabs, two of them have 4 tabs. When the user clicks on the tabs, the content below them changes. However, when...
8
by: CF FAN | last post by:
We have an issue with refreshing pages using JavaScript. We have got three pages. From page 1, page 2 is opened by window.open and from page 2, page 3 open up by window.open and also closes page 2....
1
by: Bali | last post by:
Default.aspx is the starting page containing a control(ascx) which has asp:button control on it. On the button click event it has to open a new page as a modal control. Since refreshing a page in...
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:
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
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...

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.