Total NOOB needs java advice

A

areese801

i am using a website with a form that passes criteria to a javascript
to run a query rather than just appending my criteria to parts of the
URL.

i need to import a bunch of records into MS access from this site. this
would be very easy to do if i could just change part of the url and
programatically navigate there. unfortunatly this javascript is doing
all of the querying.

is there a good place to start to be able to get around this?
should i be trying to hack a cookie?
should i (try to) write my own javascript?

...or are there too many variables, and it is just to hard to do?


any help is appreciated. thanks!

ducky
 
V

VK

i am using a website with a form that passes criteria to a javascript
to run a query rather than just appending my criteria to parts of the
URL.

i need to import a bunch of records into MS access from this site. this
would be very easy to do if i could just change part of the url and
programatically navigate there. unfortunatly this javascript is doing
all of the querying.

is there a good place to start to be able to get around this?
should i be trying to hack a cookie?
should i (try to) write my own javascript?

..or are there too many variables, and it is just to hard to do?

You can use document.location methods:

var s = '';
for (key in myRequestObject) {
s+= escape(key) + '=' + escape(myRequestObject[key]) +'&';
}
document.location.search = s;

That should navigate you properly using GET method. Be aware though
that IE imposes 2048 bytes limit on URL length (including all parts of
URL). So you cannot make GET request too long.

If the GET limit is not big enough for your case you have to use POST
method instead and set the above shown "s" value to some hidden field.
There are many other options.
 
D

ducky

cool. thanks for the starting point... where would i insert this code?
how would i 'link' it to the website i'm working with?

ducky
 
V

VK

ducky said:
where would i insert JavaScript code?

ooh... eh...

JavaScript code is placed between tags

<script type="text/javascript">
// your code goes here
</script>

This block has to inserted in the head section of the document (before
how would i 'link' it to the website i'm working with?
If you place your script statements directly in <script> section they
are going to be executed immediately.

If you place your script statements into some function, they will be
executed upon function call.

To call a function you're using interface elements (like buttons) or
events (like "onload").

You really should start then from reading
<http://www.jibbering.com/faq/#FAQ3_2> and looking on code samples in
this group.
 
D

ducky

thanks VK. this is a great place to start. i'll read at the link you
gave me and see what i can come up with

ducky
 

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