473,785 Members | 2,842 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP - AREA tags - replace shape coords with strings

10 New Member
i am trying to generate an image map from the mouse coords of a click.
i can pass the X Y through ok as
$_POST['submit_x']
$_POST['submit_y']
how should the string be put into the AREA tag ?
i am keeping the diameter as 10

this is what i am trying:
echo "SHAPE=CIRC LE COORDS="'.$_POS T['submit_x'].',143,10">";
Sep 22 '06 #1
3 2092
tommydog
10 New Member
ok i worked it out !

COORDS={$_POST['submit_x']},{$_POST['submit_y']},10\">";
Sep 22 '06 #2
tbb9216
16 New Member
im pretty sure this will only work in IE and when you click on a submit button that uses an image.

let me know if im wrong, best of luck to you

-tim
Sep 23 '06 #3
tommydog
10 New Member
im pretty sure this will only work in IE and when you click on a submit button that uses an image.

let me know if im wrong, best of luck to you

-tim
when do i write my data to the data base?

i am building a browser based image map generator using php. each time an image is clicked the coords and a text box contents are to be saved somehow. i am expecting upto 50 lines of data for each image (x coord, y coord and text) :

sample data:
image name x y description
image7.jpg 123 123 wheel
image7.jpg 485 688 tyre
image7.jpg 456 595 bolt

later on i will display the image and create the hotspots image map with the text data (description) as html alt tags.

i have a data table in MYSQL with 4 columns:
1 image name
2 x_coord
3 y_coord
4 text for alt tags

do i collect 50 sets of data in a temp file or array or something and then write it to the database in one go or write each line of data as it is created ? my worry is that if i write to the database it may be a pain to edit any mistakes. so maybe some kind of preview table might be a good idea....
Sep 24 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
8262
by: Charles Eubanks | last post by:
The enclosed html snippet displays an area map. The behavior I want is for each area to show up (eg show the outline of the poly) when the user mouses over it. This happens nicely BUT in order for this to occur, the user must hit the tab key to set the focus into the image (or the map -- I am not sure which at this point). In any case, I need a way to automatically force the browser focus into the image (or map) -- because end-users do...
2
2061
by: Gabe Moothart | last post by:
I would like to be able to dynamically change the attributes of an <area> element in an image map. The following works in IE 6 and Opera 7: <map name="Map1"> <area shape="rect" coords="10,10,100,50" href="foo.html" id="area1"> </map> .... <script> document.area1.href = "bar.html"; </script>
1
2032
by: Mudas | last post by:
Hello I'm trying find some solution but I even don't know if it's possible. I have a map of some region and using the area I can enlarge it. But I want to set the area border=1 when mouse is on and hide border when is out. – the user must know which region will be enlarge. I know that it's possible when I'll divide my image to smallest, or if I use flash but I want to make it in html, css or java. Mayby it's possible using layers ??...
1
2703
by: Ms Yaqian Fang | last post by:
Hello, I want to highlight the clicked area on an image by placing another image on it. But it replaced the whole image, not the clicked area. My code is as following, can anyone please help me? Thank you!!!! <head> <script language="JavaScript" type="text/javascript"> function changeImagemap(newImage) { if (js > 1.0) document .src = eval(newImage + ".src"); } </script>
14
5615
by: laurence | last post by:
I am implementing a comprehensive image-map generator utility, so have been studying W3C HTML 4.01 Specification (http://www.w3.org/TR/html4/struct/objects.html#h-13.6) on image maps (among other things). I note the document specifies that block level content can be included within a <map>. Testing this in order to discover why one might wish to do this, I find the block level content is rendered in page flow order anyway, and not...
1
1947
by: Michael SL | last post by:
I have an area setup <map name="linkmap"><area shape=RECT coords="0,0,135,15" href='<%=LinkDestination1 %>' ><area shape=RECT coords=150,0,285,15 href="<%=LinkDestination2 %>" ><area shape=RECT coords=303,0,394,15 ??? ></map><img src='<%=FullHead %>' border=0 usemap="#linkmap" Where in VB FullHead = Me.Request.ApplicationPath + "\images\AdministratorHead.png LinkDestination1 = Me.Request.ApplicationPath +...
2
3131
by: spamforsteve | last post by:
Hi, all! I have an imagemap of a floor of offices. I have various events and an onclick function working just fine, but I'd like to be able to change the color of the region being hovered over. Is there any way to do this? Presumably I could just read the coords of the region, create a floating layer dynamically, and change the color, no? Unfortunately, I can't manage to read the coords property, and I'm not entirely certain how to...
3
2823
by: Rhishabh07 | last post by:
how to define coords in an image for an area shape i m using <img src="left.jpg" width="350" height="29" alt="Planets" usemap ="#planetmap" /> <map id ="planetmap" name="planetmap"> <area shape ="rect" coords ="0,0,199,29" href ="sun.htm" alt="Sun"> <area shape ="circle" coords ="200,0,350,29" href ="mercur.htm" alt="Mercury">
8
4963
by: Dan Rumney | last post by:
All, I have a web page (copied below) with 3 images on it of fixed dimensions. Each image has a map associated with it In the maps, there are a number of areas with an onClick handler registered (in this sample, just an alert) The HTML is valid.
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10153
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10093
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9952
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8976
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3654
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.