Refreshing a Web Page using Javascript

J

Jimbo1

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></
SELECT> list. I'd like to use this <SELECT> list's ONCHANGE event
trigger to call a Javascript Method that will, if the <OPTION> item in
the <SELECT> list 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 <OPTION> value 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
 
J

Jimbo1

Jimbo1 said the following on 12/3/2007 10:28 AM:





<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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top