|
Home > Archive > dBASE Web Applications > August 2005 > Using IE as a subform
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Using IE as a subform
|
|
| John Jay 2005-07-06, 8:23 pm |
| Hi All,
I posted a question in the 3rd party ng on how to click on a image and
move the record pointer in a table. Ivar Jessen replied with a good example
using a text field. The images I need this for are scanned pages out of a
paper catalog and many are unreadable at normal size so need to be resized.
They are then larger than the screen and need to be moved in the image
field. The example Ivar has cannot do dynamic repositioning of the text
fields. I have a supplier that has this functionality on their webb
site.They use java script. My first question is can I setup IE as a subform
of a desktop form to take advantage of the java script functionality? Second
can ths be done just to display the image, not all the IE tool bars ect?
If this is not a clear explanation of this dynamic functionality I will be
glad to post directions to the site along with how to access the java script
they use.
tia
John Jay,
Best marine
Charter member 504
| |
| Ronnie MacGregor 2005-07-07, 3:24 am |
| In article <id71V1ngFHA.1812@news-server>, beat_nospam_mar@sbcg
lobal.net
says...
> They are then larger than the screen and need to be moved in the image
> field.
Hi John
You can do this with dBASE ....
Try the quickly thrown together code below.
If this is of interest let me know and I'll turn it into a custom
control and tidy it up a bit ... when time permits.
--
Ronnie MacGregor
Scotland
( Watch out for line wrap )
clear
** END HEADER -- do not remove this line
//
// Generated on 07/07/2005
//
parameter bModal
local f
f = new ImageScrollForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class ImageScrollForm of FORM
with (this)
metric = 6 // Pixels
height = 352.0
left = 201.0
top = 285.0
width = 396.0
text = ""
endwith
this.CONTAINER1 = new CONTAINER(this)
with (this.CONTAINER1)
left = 10.0
top = 10.0
width = 300.0
height = 300.0
endwith
this.CONTAINER1.IMAGE1 = new IMAGE(this.CONTAINER1)
with (this.CONTAINER1.IMAGE1)
height = 400.0
left = 0.0
top = 0.0
width = 600.0
dataSource = 'FILENAME "QR3Back.jpg"'
alignment = 4 // True Size
pageno = 0
endwith
this.CONTAINER1.SLIDE_HOR = new SLIDER(this.CONTAINER1)
with (this.CONTAINER1.SLIDE_HOR)
onChange = class::SLIDE_HOR_ONC
HANGE
height = 20.0
left = 0.0
top = 277.0
width = 280.0
pageno = 0
value = 1
rangeMax = 10
rangeMin = 1
tics = 2 // None
vertical = false
enableSelection = false
startSelection = -1
endSelection = -1
endwith
this.CONTAINER1.SLIDE_VER = new SLIDER(this.CONTAINER1)
with (this.CONTAINER1.SLIDE_VER)
onChange = class::SLIDE_VER_ONC
HANGE
height = 277.0
left = 277.0
top = 0.0
width = 20.0
pageno = 0
value = 1
rangeMax = 10
rangeMin = 1
tics = 2 // None
vertical = true
enableSelection = false
startSelection = -1
endSelection = -1
endwith
function SLIDE_HOR_onChange
tp = this.parent
this.rangeMax := this.parent.Image1.width - tp.width + 20 + 3
tp.Image1.left := 0 - this.value
return
function SLIDE_VER_onChange
tp = this.parent
this.rangeMax := this.parent.Image1.height - tp.height + 20 + 3
tp.Image1.top := 0 - this.value
return
endclass
| |
| Claus Mygind 2005-07-07, 9:23 am |
| John,
Here is an approach where the expanded image could be displayed in it own
window without any of tool bars menus etc. Use window.open( ) to specify
exactly the size and shape of the window you want the image to appear in.
Pass parameters to the window. In the example below the page is streamed
out form dBASE on the server, but it could just as well be a standard .html
page to do that just strip out the puts(' ').
In the page header, place your javaScript to open the new window. In the
body of the page place the smaller image in an anchor which will call the
javaScript with the "onClick" event handler.
window.open( ) has these properties that lets you define how the new window
with the larger image looks when it is opened.
width = value "number" defines width of new window in pixels
height = value "number" defines height of new windo in pixels
directories = value "yes,no, 1, 0) defines if new window has directory
buttons
location = value "yes,no, 1, 0) defines if new window has a location box
menubar = value "yes,no, 1, 0) defines if new window has a menubar
scrollbars = value "yes,no, 1, 0) defines if new window has scrollbars if
the content is more than the size of the window
status = value "yes,no, 1, 0) defines if new window has a status bar at
bottom of window
toolbar = value "yes,no, 1, 0) defines if new window has a with forward,
back, stop etc. buttons
Then just select the options you want to include in the window. If you
leave options out it is the same as saying "no or 0)
window.open("newpage.html","new_window_name","selected attributes from list
above seperated by commas");
for best results make sure that the window.open( ) is all on one line of
code.
puts('<HEAD>')
puts('')
puts('<TITLE> My Catalouge </TITLE>')
puts('')
puts(' <SCRIPT LANGUAGE="JavaScript">')
puts(' <!-- Hide script from older browsers')
/*
In my example I use the same window in a number of different locations. By
passing it parameters I can format it and the actions it carries out a
number of differnt ways.
*/
// call a search window
/*
My search window takes these parameters
cTemplate = title displayed in search window
cLength = lenght of search query input box
cMax = maximum length of search string
cTable = lookup table
cIndex = table index to be used in search
cFieldName = anchor field in search result
cParsePhone = yes or no
cResultsWindow = 'showJob' or 'showClient'
*/
puts(' function
CallSearch(cTemplate
,cLength,cMax,cTable
,cIndex,cFieldName,c
ParsePhone,cResu
ltsWindow)')
puts(' { ')
//here is my code that opens a new small window to alow the user to search
for a record.
/*I included some attributes for the window
which you could just omit like scroll bars.
However I did make it resziable.
*/
puts([
window.open("Search.exe?Descriptor="+cTemplate+"&LineLength="+cLength+"&MaxL
ength="+cMax+"&Table="+cTable+"&Index="+cIndex+"&FieldName="+cFieldName+"&Pa
rsePhone="+cParsePhone+"&ResultsWindow="+cResultsWindow,])
puts('
"searchWindow"," scrollbars,resizable
,height=350,width=50
0");')
puts(' }')
puts(' --> ')
puts(' </SCRIPT>')
puts(' </HEAD>')
//the following appears in the body of the page.
cTemplate = "Client Name"
cTable = "My_dbaseTable"
cIndex = " Name_of_Index_I_Want
_To_Use"
cFieldName = "MyKeyField"
cLength = "35"
cMax = "30"
cParsePhone = "yes"
cResultsWindow = "showClient"
puts([ <a ])
puts([ href="#" ])
puts([
onClick=" CallSearch(']+cTempl
ate+[',']+cLength+[',']+cMax+[',']+cTable+[',']
+cIndex+& #91;',']+cFieldName+
& #91;',']+cParsePhone
+& #91;',']+cResultsWin
dow+[');"])
puts([ >])
puts([ <IMG ])
puts([ SRC="/images/search.jpg" ])
puts([ WIDTH="22" ])
puts([ HEIGHT="22"])
puts([ BORDER="0" ])
puts([ >Name])
puts([ </a>])
Claus
"John Jay" < beat_nospam_mar@sbcg
lobal.net> wrote in message
news:id71V1ngFHA.1812@news-server...
> Hi All,
> I posted a question in the 3rd party ng on how to click on a image and
> move the record pointer in a table. Ivar Jessen replied with a good
example
> using a text field. The images I need this for are scanned pages out of a
> paper catalog and many are unreadable at normal size so need to be
resized.
> They are then larger than the screen and need to be moved in the image
> field. The example Ivar has cannot do dynamic repositioning of the text
> fields. I have a supplier that has this functionality on their webb
> site.They use java script. My first question is can I setup IE as a
subform
> of a desktop form to take advantage of the java script functionality?
Second
> can ths be done just to display the image, not all the IE tool bars ect?
> If this is not a clear explanation of this dynamic functionality I will
be
> glad to post directions to the site along with how to access the java
script
> they use.
> tia
> John Jay,
> Best marine
> Charter member 504
>
>
| |
| John Jay 2005-07-07, 9:23 am |
| Ronnie ,
I will give this a try I like to use Dbase whenever possible, but have no
desire to make a career out of reinventing the wheel. I thought the IE idea
was a option when I found a working example on my supplier's webb site.
John Jay
Best Marine
| |
| John Jay 2005-07-07, 9:23 am |
| Claus,
My Webb skills are less than great so your example will be a great help. I
will test this and post results.
Thanks
John Jay
Best Marine
| |
| John Jay 2005-07-07, 1:23 pm |
|
Ronnie ,
Tested the form. I am combing it with a form Ivar B. Jessen posted 7-2
in third party ng. Looks like I might be able to make it work.
Going to try Glaus's posted suggestion next.
Thanks again
John Jay
Best Marine
| |
| Ronnie MacGregor 2005-07-07, 8:24 pm |
| In article <HSMg11xgFHA.444@news-server>, beat_nospam_mar@sbcg
lobal.net
says...
> Tested the form. I am combing it with a form Ivar B. Jessen posted 7-2
> in third party ng. Looks like I might be able to make it work.
Do it as a custom control, which can then simply be dropped onto any
form needing this functionality.
If you get it working ... post the result.
If you get stuck .... just shout.
> Thanks again
You're welcome.
--
Ronnie MacGregor
Scotland
| |
| John Jay 2005-07-07, 8:24 pm |
|
Ronnie,
to on 7-2[color=darkred]
>
After trying to add the functionality from Ivar's post I found I could not
combine them as I thought.
He used the image as the form background and a text field with
transparent=true
and mouse pointer as 13 /hand so you see no text fields on the form, but
when you mouse over one the pointer turns to a hand, clicking there moves
the record pointer and displays the correct record.
I cannot make the transparent=true work over a image field, the text
feild is not transparent. If you want to see what I mean unzip Ivar's
attachment to my post in third party ng . For exactly what I want look at
the site I posted to him in my last replay. That is what I need in a working
demo, but in java script on the webb, not Dbase on my desktop.
John Jay
| |
| Ronnie MacGregor 2005-07-08, 3:23 am |
| In article <pLxD8s1gFHA.320@news-server>, beat_nospam_mar@sbcg
lobal.net
says...
> That is what I need in a working
> demo, but in java script on the webb, not Dbase on my desktop.
Sorry John ...
I should have realised from the group you were posting in that you
needed a web solution.
--
Ronnie MacGregor
Scotland
| |
| Claus Mygind 2005-07-08, 9:23 am |
| John,
I downloaded your example from the 3rd party ng. But I am trying to figure
out what it is that you want to do.
1. Do you just want to show a blowup of thumbnail size picture (the whole
image enlarged)
2. Do you want to show a blowup of a detail in the thumbnail picture
3. Do you have a series of images stored and you want to call up a specific
image
4. Do you have a .dbf table with a reference to specific images
5. Are you storing your image in a .dbf table.
I see in Ivar's example that when the mouse moves off the "Hot Spot" the
other image closes.
It is possible with javaScript to do any of these things. You can swap
images, layer images, make them transparent etc.. Some of these options are
not equally acceptable to all types and versions of browsers. And based on
your current skill level in javaScript, if I was you I would stick to
simpler solutions that are not browser specific (like the example I gave
you). With that you should be able to open a second window and display an
image which you either retrieved from a table or simply from a directory of
image files. It is even fairly simple to have the window close when the
mouse moves off the image with the "window.close( )"
The nice thing about javaScript for us dBASE programmers, it is very easy to
learn. It is very similar to our current coding techniques. There are
places you can go online and learn javaScript like
http://webmonkey.wired.com/webmonkey/. Eventually though you will get
frustrated with that as you have specific problems to solve and need
solutions right away. So I would recommend a couple of books, which I have
found very helpful. Start with "JavaScript A Beginner's Guide" by John
Pollock published by Osborne/McGraw-Hill. Nothing wrong with admitting you
are a beginner. This will give you a good foundation and overview of
javaScript. Then get "JavaScript & DHTML Cookbook" by Danny Goodman
published by O'Reilly. It comes with what the author calls recipes. All
his examples described in the book can be downloaded. I have found I can
simply plug the examples in and figure out how they work later. What's nice
about the book also it tells you which browsers they work with. And he also
shows how to make things work across differnet bowsers. By the way he has
examples for your current questions, although they are a little more
advanced. Both Webmonkey and the Beginner's Guide give examples of image
swapping.
Think of JavaScript as the .wfm of your applications. Most things you do in
dBASE for the User Interface can be replicated in JavaScript on your web
page.
| |
| John Jay 2005-07-08, 11:23 am |
|
Ronnie
> That is what I need in a working
>
>
> I should have realised from the group you were posting in that you
> needed a web solution.
I did not make myself clear,I am looking for a desktop solution, but have
not been able to acomplish the task. The site I mentioned demonstrates just
what I need. My post here was a attempt to solve the problem another way. My
thought was to use IE perhaps with a html document with java script, which
is on most computers, in a subform or some other way on the desktop form.
By inspecting the source of that site you can get a complete html, with
comments on how they do it. Check out the site directions and the attachment
I posted in the third party ng for a clearer understanding of what I am
trying to acomplish.
Sorry for being unclear.
John Jay
| |
| John Jay 2005-07-08, 1:23 pm |
|
Claus
I now have a invoice program that opens a form with 2 tables table 1 has 2
fields for the directory and image file name. table 2 is linked to table 1
by image filename with a index on imagefilename+str(va
l(reference
number)).The images are copies of parts books with reference numbers that
correspond to reference numbers in table 2. my form has the image displayed
plus a grid with the images parts in it listed numerically by reference
number. I look at the image get the reference number for the needed part and
click on the grid at the record with the reference number. The on left mouse
up event loads several fields on the form with the record's values including
the default quanity needed. I change the quanity field if needed then click
a select button that adds the selected fields to the parent form's parts
table. What I need is shown at site below.
goto
http://www.evinrude.com/
on the map select
north America / English
from the list on the top select parts & accessories
from the list on the left select engine diagrams
click on the image on the right
next to products "Evinrude" click go
drill down through any year,any horsepower,to any illistration
click on any reference number on the image
then zoom in. Then use the sliders to reposition the image in the field.
notice that the hot spots move and size to match the size and position of
the image
That repositioning of the hotspots is what I cannot do in my desktop app.The
image.hotspot.onmouseup event could then duplicate my program's form.grid.
onleftmouseup event
To see how they do it.
right click on the image
select View source.
if you cannot get the complete html page this way unzip the attachment
EmpartISPI[6].zip I posted in the third party ng this morining
| |
| Claus Mygind 2005-07-11, 9:23 am |
| John,
The Evinrude site is slick and I get the concept you are trying to
implement. I cannot give you specific code suggestions, but perhaps I can
point you in a direction to research.
The concept they are using is layers with Cascading Style Sheets. You
should keep in mind this will not work equally well on all browsers. By the
way I read your posting in the 3rd party ng and there is more to the
evinrude page than the code you put in the zip file. In a couple of lines
below you can see they linked an external Style Sheet with the page. This
is essential code you are not seeing. Also there are a couple of javaScript
file calls also made that you do not see.
<LINK REL="StyleSheet" TYPE="text/css" HREF="include/genContent.css">
<SCRIPT LANGUAGE="JavaScript" SRC="Include/genFunc.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="Include/iplFunc.js"></SCRIPT>
<script language="JavaScript" src="JFuncs.js"></script>
With a cascading style sheet you can use one element (the diagram) as a
container for the other elements (your links to your database table). So
when the image is moved around the hot spots stay relative to the location
on the diagram.
Most likely from what I can gather you do not want to use text based
controls (such as text boxes and buttons) as your link back to the table as
you will not be able to adequatly hide them (so use anchors or blank images,
which you should be able to hide). In the z-order these controls will
appear in front of the diagram image.
Just a follow up to what I started with. I could view the Evinrude page
fine with my IE v6 browser but when I tried using Fire Fox v1.0.4 I had to
down load Macromedia Flash Player 7.0.
As I said in an earlier posting this concept is explained with detailed code
in "JavaScript & DHTML Cookbook" by Danny Goodman published by O'Reilly
chapter 13. Copyright laws prevent me for just copying and pasting code
here. Go to your local computer store and find this book. Check out
chapter 13. If it sounds like what you need buy the book, then download the
code, plug it in and save yourself a lot of development time.
"John Jay" < beat_nospam_mar@sbcg
lobal.net> wrote in message
news:N4Gv3T%23gFHA.444@news-server...
>
> Claus
> I now have a invoice program that opens a form with 2 tables table 1 has 2
> fields for the directory and image file name. table 2 is linked to table 1
> by image filename with a index on imagefilename+str(va
l(reference
> number)).The images are copies of parts books with reference numbers that
> correspond to reference numbers in table 2. my form has the image
displayed
> plus a grid with the images parts in it listed numerically by reference
> number. I look at the image get the reference number for the needed part
and
> click on the grid at the record with the reference number. The on left
mouse
> up event loads several fields on the form with the record's values
including
> the default quanity needed. I change the quanity field if needed then
click
> a select button that adds the selected fields to the parent form's parts
> table. What I need is shown at site below.
>
> goto
> http://www.evinrude.com/
> on the map select
> north America / English
> from the list on the top select parts & accessories
> from the list on the left select engine diagrams
> click on the image on the right
> next to products "Evinrude" click go
> drill down through any year,any horsepower,to any illistration
> click on any reference number on the image
> then zoom in. Then use the sliders to reposition the image in the field.
> notice that the hot spots move and size to match the size and position of
> the image
> That repositioning of the hotspots is what I cannot do in my desktop
app.The
> image.hotspot.onmouseup event could then duplicate my program's form.grid.
> onleftmouseup event
>
> To see how they do it.
> right click on the image
> select View source.
> if you cannot get the complete html page this way unzip the attachment
> EmpartISPI[6].zip I posted in the third party ng this morining
>
>
| |
| John Jay 2005-07-11, 8:23 pm |
|
>
> As I said in an earlier posting this concept is explained with detailed
code
> in "JavaScript & DHTML Cookbook" by Danny Goodman published by O'Reilly
> chapter 13. Copyright laws prevent me for just copying and pasting code
> here. Go to your local computer store and find this book. Check out
> chapter 13. If it sounds like what you need buy the book, then download
the
> code, plug it in and save yourself a lot of development time.
>
Claus,
Thanks for the update, over the weekend I worked on the desktop solution
using examples from Ivar and Ronnie. I feel it will work as they outlined
it, but you now presented me with the webb solution. I am going to finish
the desk top app, and then move it to the webb using your examples . I am
also going to read those books and especially chapter 13. That will take a
little time but I do have one question. The desktop approach will have me
putting the row & column coordinates into a file as a % from 0 (of the
hotsopt in relation to 0 left for col, 0 top for row) of the image .Will the
webb approach you are suggesting be able to use these entries for the
hotspot layer ?
Thanks again.
John Jay
Best Marine
| |
| Ivar B. Jessen 2005-07-12, 7:26 am |
| <eqyqY5hhFHA.1768@news-server> datefromnewsgroupssu
bject
>As I said in an earlier posting this concept is explained with detailed code
>in "JavaScript & DHTML Cookbook" by Danny Goodman published by O'Reilly
>chapter 13. Copyright laws prevent me for just copying and pasting code
>here. Go to your local computer store and find this book. Check out
>chapter 13. If it sounds like what you need buy the book, then download the
>code, plug it in and save yourself a lot of development time.
The code for the examples in the book may be downloaded from
http://examples.oreilly.com/jvdhtmlckbk/
The file name is: jsdhtmlcb-examples.zip
Ivar B. Jessen
| |
| John Jay 2005-07-12, 11:23 am |
|
Ivar,
> The file name is: jsdhtmlcb-examples.zip
I downloaded it and will check it out.
Thanks
John Jay
| |
| Claus Mygind 2005-07-13, 7:23 am |
| John,
I don't believe so. The functions will read the document (html page)
retrive the current information about location X, Y and Size of the hotspot
object and then resize and move the objects. All you have to provide is the
object "Id". But since I have not done this I am not quite sure.
Claus
"John Jay" < beat_nospam_mar@sbcg
lobal.net> wrote in message
news:$e7btpmhFHA.1188@news-server...
>
> code
> the
> Claus,
> Thanks for the update, over the weekend I worked on the desktop
solution
> using examples from Ivar and Ronnie. I feel it will work as they outlined
> it, but you now presented me with the webb solution. I am going to finish
> the desk top app, and then move it to the webb using your examples . I am
> also going to read those books and especially chapter 13. That will take
a
> little time but I do have one question. The desktop approach will have me
> putting the row & column coordinates into a file as a % from 0 (of the
> hotsopt in relation to 0 left for col, 0 top for row) of the image .Will
the
> webb approach you are suggesting be able to use these entries for the
> hotspot layer ?
> Thanks again.
> John Jay
> Best Marine
>
>
| |
| John Jay 2005-07-13, 8:23 pm |
|
Claus
> I don't believe so. The functions will read the document (html page)
> retrive the current information about location X, Y and Size of the
hotspot
> object and then resize and move the objects.
I was hoping to use dbase to stream out dynamic html pages including
the array with the coodinates from my table, then let the java script do the
rest. It souds like I might have to do 8000 static pages. Will research this
when I have the 2 books.
John Jay
Best Marine
| |
| Claus Mygind 2005-07-16, 7:23 am |
| In addition to the examples you can learn a lot from his discussion in the
book. It gives a good description of the process and how the various
components help to equalize various browsers that access your sight
"John Jay" < beat_nospam_mar@sbcg
lobal.net> wrote in message
news:BE581ZvhFHA.432@news-server...
>
> Ivar,
> I downloaded it and will check it out.
> Thanks
> John Jay
>
>
| |
| Claus Mygind 2005-07-18, 7:23 am |
| John,
Yeah, I see what you mean. I think we were comming at this from 2 different
angles. Of course you can stream out the pages with dBASE and having the
coordinates stored in a table.
My thought was that each master page (the smaller thumbnail) would be
streamed from your dBASE table, then the blow up pages would receive the
relative coordinate and size properties of the hot spots from the master
page, thereby reducing the number of pages for which you would have to store
information (perhaps that is what you are already doing, I have not studied
the suggested coding that your are working with).
| |
| John Jay 2005-07-19, 8:23 pm |
|
Claus
The images are stored in directories by vendor and are changed at various
times so I decided not to put them in a field in table # 1.
I have 2 tables .
table 1 fields
1. directory image file is in
2. filename
3 unique group identifier for indexing
4 display by order field
table 2 fields
1. filename
2. X coordinate (as a % from 0 row)
3. Y coordinate (as a % from 0 col)
4. item deatil a
5. item detail b
Using macro substituion I can stream out image file using table 1
then build array from table 2 for hot spots.
When the user comes over a hot spot the mouse pointer turns to a hand,
on mouse click moves the record pointer to proper record by rowset.first()
rowset.next(array col #)
I now have accessed the proper record to do whatever process that is needed.
By indexing table 1 on group+str(val(displa
y by order field) I can loop
through the
pictures by any order I want.
I have the system working in my desktop app, except for the loop throught
the table,
Time has been in short supply.
John
> My thought was that each master page (the smaller thumbnail) would be
> streamed from your dBASE table, then the blow up pages would receive the
> relative coordinate and size properties of the hot spots from the master
> page, thereby reducing the number of pages for which you would have to
store
> information (perhaps that is what you are already doing, I have not
studied
> the suggested coding that your are working with).
| |
| Claus Mygind 2005-07-22, 1:23 pm |
| John
Based on what you are describing here, you should be able to plug that into
a javaScript function, which is streamed out by dBASE to the HTML page. The
book I mentioned has a receipe (13.6) for centering an element (hot spot) on
top of another element (your image). A little tweaking of that receipe
would position your hot spots in an html page.
puts(' function centerOnElement(base
ElemID, posElemID) { ')
puts(' baseElem = document. getElementById(baseE
lemID); ')
puts(' posElem = document. getElementById(posEl
emID); ')
puts(' var offsetTrail = baseElem; ')
puts(' var offsetLeft = '+ <your table 2 x value> +'; ')
puts(' var offsetTop = '+ <your table 2 y value> +'; ')
// account for IE 6 CSS compatibility mode
puts(' while (offsetTrail) { ')
puts(' offsetLeft += offsetTrail.offsetLeft; ')
puts(' offsetTop += offsetTrail.offsetTop; ')
puts(' offsetTrail = offsetTrail.offsetParent; ')
puts(' } ')
puts(' if (navigator.userAgent.indexOf("Mac") != -1 && ')
puts(' typeof document.body.leftMargin != "undefined") { ')
puts(' offsetLeft += document.body.leftMargin; ')
puts(' offsetTop += document.body.topMargin; ')
puts(' } ')
// the next 2 lines would have to be tweaked so as to not just center the
hot spot but just locate at appropriate spot.
puts(' posElem.style.left = offsetLeft +
arseInt(baseElem.offsetWidth/2) -parseInt(posElem.offsetWidth/2) + "px" ')
puts(' posElem.style.top = offsetTop + parseInt(baseElem.offsetHeight/2) -
parseInt(posElem.offsetHeight/2)+ "px" ')
puts(' } ')
"John Jay" < beat_nospam_mar@sbcg
lobal.net> wrote in message
news:WRfuYwKjFHA.432@news-server...
>
> Claus
> The images are stored in directories by vendor and are changed at
various
> times so I decided not to put them in a field in table # 1.
> I have 2 tables .
> table 1 fields
> 1. directory image file is in
> 2. filename
> 3 unique group identifier for indexing
> 4 display by order field
>
> table 2 fields
> 1. filename
> 2. X coordinate (as a % from 0 row)
> 3. Y coordinate (as a % from 0 col)
> 4. item deatil a
> 5. item detail b
> Using macro substituion I can stream out image file using table 1
> then build array from table 2 for hot spots.
> When the user comes over a hot spot the mouse pointer turns to a hand,
> on mouse click moves the record pointer to proper record by
rowset. first()
> rowset.next(array col #)
> I now have accessed the proper record to do whatever process that is
needed.
>
> By indexing table 1 on group+str(val(displa
y by order field) I can loop
> through the
> pictures by any order I want.
> I have the system working in my desktop app, except for the loop throught
> the table,
> Time has been in short supply.
> John
>
> store
> studied
>
>
| |
| John Jay 2005-08-02, 8:23 pm |
|
Claus
Just a quick update, Bought the books, very good read, but this is going to
take me some time , I have the desktop method for this almost complete, am
making it a .cc
John
As I said in an earlier posting this concept is explained with detailed
code
> in "JavaScript & DHTML Cookbook" by Danny Goodman published by O'Reilly
> chapter 13. Copyright laws prevent me for just copying and pasting code
> here.
|
|
|
|
|