473,407 Members | 2,320 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,407 software developers and data experts.

Need java script assistnace

Hi,

This is my requirement & i woudl arppreciate any assistance on this.

I ahve a scanned form which has data entered by User.

I want to have a web page which woudl display this scanned form as a
top part (a frame) and the second frame (bottom part) woudl be a HTML
Form.

Using JS when i am on a particular text field say account number, i
want the image at the top to show only the account number section of
hte image (which is @ a known co-ordinate)

Appreciate any assistnace and pointers

Manglu

Dec 1 '06 #1
4 1251
Mangalaganesh Balasubramanian wrote:
Hi,

This is my requirement & i woudl arppreciate any assistance on this.

I ahve a scanned form which has data entered by User.

I want to have a web page which woudl display this scanned form as a
top part (a frame) and the second frame (bottom part) woudl be a HTML
Form.

Using JS when i am on a particular text field say account number, i
want the image at the top to show only the account number section of
hte image (which is @ a known co-ordinate)

Appreciate any assistnace and pointers

Manglu
Hi,

The functions that will help you with scrolling are named scrollBy() and
scrollTo().

But I think what you want is near impossible.

You can move the scrollbars in the above frame by means of Javascript so you
can automate the scrolling, but I think it is very difficult for you to
tell how much pixels it must scroll to display the right part of the image.

Regards,
Erwin Moller

Dec 1 '06 #2
Mangalaganesh Balasubramanian wrote:
Hi,

This is my requirement & i woudl arppreciate any assistance on this.

I ahve a scanned form which has data entered by User.

I want to have a web page which woudl display this scanned form as a
top part (a frame) and the second frame (bottom part) woudl be a HTML
Form.

Using JS when i am on a particular text field say account number, i
want the image at the top to show only the account number section of
hte image (which is @ a known co-ordinate)

Appreciate any assistnace and pointers

First put your scanned image inside a named and styled <div>

<div id='scannedImage' class='imageClass'><img
"somegiantscannedimage.png"></div>

Next set up a CSS style.

..imageClass {
position: absolute;
}

The position MUST be absolute or none of this will work.

Next in your javascript code set the starting .left and .top elements...

document.getElementById('scannedImage').style.top= 0px;
document.getElementById('scannedImage').style.left =0px;

And then finally the command which will let you do what you want to do..

document.getElementById('scannedImage').style.clip ='rect("0px, 1000px,
1000px, 0px")';

clip basically clips a rectangle from your division and shows only the
coordinates expressed in rect. The values of rect correspond to (top,
right, bottom, left) in that order. By creating clips and then altering
style.top and style.left you can create a rectangle of any size you want
showing any spot on in the division.

You'll have to fiddle around with it but just changing the values and
seeing how that affects what you see in the web page will get you up to
speed at a fairly good clip (heh).

Good luck.


>
Manglu

--
---------------------------------------------------------------------------
http://www.hunlock.com -- Permanently under construction (And proud of it!)
$FA
Dec 1 '06 #3
ASM
pcx99 a écrit :
>
document.getElementById('scannedImage').style.top= 0px;
document.getElementById('scannedImage').style.left =0px;
document.getElementById('scannedImage').style.clip ='rect("0px, 1000px,
1000px, 0px")';
in my FF2, Opera, Safari, that works much more better like that :

var ref = document.getElementById('scannedImage').style;

ref.top = '0px'; // '0px' with '
ref.left = '0px';
ref.clip = 'rect(25px, 150px, 80px, 74px)'; // without "
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Dec 1 '06 #4
ASM wrote:
pcx99 a écrit :
>>
document.getElementById('scannedImage').style.top =0px;
document.getElementById('scannedImage').style.lef t=0px;
document.getElementById('scannedImage').style.cli p='rect("0px, 1000px,
1000px, 0px")';

in my FF2, Opera, Safari, that works much more better like that :

var ref = document.getElementById('scannedImage').style;

ref.top = '0px'; // '0px' with '
ref.left = '0px';
ref.clip = 'rect(25px, 150px, 80px, 74px)'; // without "

Yes. I really screwed up the quotes in the example. I blame it on the
cold medicine, that's my story and I'm sticking to it :D

---------------------------------------------------------------------------
http://www.hunlock.com -- Permanently under construction (And proud of it!)
$FA
Dec 1 '06 #5

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

Similar topics

0
by: James Hong | last post by:
Help please, I try to sending an email from my html page using the java applet. but it give error on most of the PC only very few work, what is the error i make the java applet show as below ...
8
by: Johnny Knoxville | last post by:
I've added a favicon to my site (http://lazyape.filetap.com/) which works fine if you add the site to favourites the normal way, but I have some JavaScript code on a couple of pages with a link,...
1
by: Roberto Gallo | last post by:
Hi, I have an applet running inside an html document and I need to read and to set some of html form's textfield and textarea input from my applet. How can I do that? Do I need a javascript? ...
3
by: RC | last post by:
Dear Dudes, I post this in multiple groups for opening brain storm. Sometime I need to query the data from database server then display them into user's browser in HTML <table>. But if the...
4
by: Brie_Manakul | last post by:
I need to set up an if else to show different weather scripts based on the city selection they choose. Any help on this would be great. Thanks! <%@ page language="java" import="java.util.*,...
9
by: Mickey Segal | last post by:
The long-simmering Eolas patent dispute: http://www.microsoft.com/presspass/press/2003/oct03/10-06EOLASPR.mspx has led to an optional Microsoft Update: http://support.microsoft.com/kb/912945/en-us...
4
by: Quill_Patricia | last post by:
I have a Python script which is used to load data into a database. Up to now this script has been run by customers from the Windows command prompt using "python edg_loader.pyc". Any error messages...
1
by: =?Utf-8?B?TGlsRDJ1?= | last post by:
I recently got help on setting up a pp file with my midi sounds. I burned a disc and it works like charm - thanks to some of you. The problem I'm having now is I can figure out how to send my...
0
by: tosreejithp | last post by:
Hi, My first problem was i am not able to compiled a file from java script to java class.Now its clear and working fine..now i can convert a java script file to java class by Rhino Java Script...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.