/    Sign up×
Community /Pin to ProfileBookmark

Populating a text box from a graphic map?

Hi, I am creating a cubicle program for work and it’s using a graphic map and the building schematics. We start on the “EmployeeSelectionPage.jsp” and there is the employee name, their old cubicle, an editable text box, and a “map” button for each employee.

When the map button is clicked it takes you to a graphic map that looks like the building. A cubicle is clicked (the coordingates are already mapped for each cube) and we want that cube # to populate the editable text box corresponding to that specific employee. This is a condensed version of the map’s code:

[code=php]

<table id = “GraphicMap” border=”1″ width=”266″ height=”144″>
<img src= “Images/SoftwareDevelopment-NE.bmp” align=”center” style=”position:absolute; top:210px; left:290px””
width=”476″ height=”450″
usemap=”#SoftwareDevMap”>

<map id=”SoftwareDevMap” name=”SoftwareDevMap”>

<area id = “308” shape=”square”
coords=”9, 135, 23, 148″
alt=”308″
href = “EmpSelectionPage.jsp?EmpSysId=<%//=request.querystring(“EmpSysId”)%>&ORIGINATE=SendCubeNumber308″>

<area id = “307” shape=”square”
coords=”32, 135, 44, 151″
alt=”307″
href = “EmpSelectionPage.jsp?EmpSysId=<%//=request.querystring(“EmpSysId”)%>&ORIGINATE=SendCubeNumber307″>

<area id = “306” shape=”square”
coords=”49, 135, 66, 151″
alt=”306″
href = “EmpSelectionPage.jsp?EmpSysId=<%//=request.querystring(“EmpSysId”)%>&ORIGINATE=SendCubeNumber306″>

<area id = “305” shape=”square”
coords=”75, 136, 92, 150″
alt=”305″
href = “EmpSelectionPage.jsp?EmpSysId=<%//=request.querystring(“EmpSysId”)%>&ORIGINATE=SendCubeNumber305″>
</map>
</table>[/code]

Thanks in advance for your response! I super appreciate it!!

<3 Jadie

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@jim_kellerSep 10.2008 — This sounds like a great time to use AJAX and JSON. You will benefit from JQuery here, which will make AJAX calls simple. Basically what you'll want to do is have an AJAX call happen when someone clicks a specific employee. That call will pull data from the server as an array, then use JQuery to populate the textboxes. It sounds a lot more complicated than it is, here are some places you can start:

The JQuery home page: http://www.jquery.com/

JQuery's getJSON method: http://docs.jquery.com/Ajax/jQuery.getJSON

AJAX in JQuery: http://docs.jquery.com/Ajax

the Fuse PHP MVC Framework

Why you should be doing your PHP development in FUSE
×

Success!

Help @JadieGlitch spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...