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

Total NOOB needs java advice

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

Oct 27 '05 #1
4 1209
VK

ar*******@gmail.com wrote:
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.

Oct 29 '05 #2
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

Oct 30 '05 #3
VK

ducky wrote:
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
closing </head> tag)

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.

Oct 30 '05 #4
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

Oct 30 '05 #5

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

Similar topics

1
by: davestrike | last post by:
I am a noob to sql and asp programming. I am working on a db for the gaming squad I am a member of. One of the pages I created is a roster list of all the squad members. Part of this roster is...
4
by: James Greig | last post by:
hello people, i'm just learning javascript, could someone point me in the direction of an example of the following, or give me some clues as to how it might be done: what i would like to do...
0
by: Ellen Manning | last post by:
I've got an A2K form with a subform based on a query. This query has a checkbox and an amount field and returns records if checkbox is checked. I Dsum the amount field and display on the main...
11
by: Brian Blazer | last post by:
OK, I have a very simple class here: class Student: """Defines the student class""" def __init__(self, lName, fName, mi): self.lName = lName self.fName = fName self.mi = mi
4
by: Rich_C | last post by:
I'm sure this is very simple, but I have very little experience with javascript -- and what I do know isn't helping me here. I have a simple form where users can enter a quantity (qty) and cost...
6
by: plemon | last post by:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta...
9
by: Ben | last post by:
Hello, I'll bet this has been asked a million times but I can't seem to find a thread that gives the clear example I need. This PC has MySQL and IIS configured and running. The MySQL database is...
2
gekko3558
by: gekko3558 | last post by:
I have not worked with java in a while, and all i'm trying to do is read these numbers from a file into a 2D array. This is my code import java.io.*; import java.util.*; public class...
5
by: lofty | last post by:
Hi, I'm building a time report system for work and I want to show the total hours and minutes a project have taken but can't get it to work ... I have a database (MySQL) in one table I have...
1
by: surana | last post by:
A complete tutorial for all your programming language needs such as Java, .Net and many more. A one shop site for all your programming language needs http://www.computenetwork.blogspot.com
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
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:
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.