Connecting Tech Pros Worldwide Help | Site Map

Refreshing a Web Page using Javascript

Jimbo1
Guest
 
Posts: n/a
#1: Dec 3 '07
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
Randy Webb
Guest
 
Posts: n/a
#2: Dec 3 '07

re: Refreshing a Web Page using Javascript


Jimbo1 said the following on 12/3/2007 10:28 AM:
Quote:
Hi there,
<snip>
Quote:
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/
Jimbo1
Guest
 
Posts: n/a
#3: Dec 4 '07

re: Refreshing a Web Page using Javascript


On 3 Dec, 18:20, Randy Webb <HikksNotAtH...@aol.comwrote:
Quote:
Jimbo1 said the following on 12/3/2007 10:28 AM:
>
Quote:
Hi there,
>
<snip>
>
Quote:
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).
>
Quote:
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)
Closed Thread