When I click on the image the form submitted to the server. As I can
see post data contains next additional values: Image1.x=121 and
Image1.y=64 These values are coordinates of clicked point relative to
image.
Can I get these values in onclick event handler (within the
beforeSubmit method)?
How to find the nearest coordinates click point on images? For example, if the user click on point on coordinates(10,20) ; then after that if the user wan find the nearest coordinates of (10,20). Let say the nearest coordinates is between (9,19), (11,21).
How find that point? If i wan fixed to 20x20 pixel for the click point, how to do?
i have to draw a line between to different coordinates which are going on google maps so for example :
[Code]...
the above coordinates are in xml format which, i later call in Java script functions and display them on the map as a simple pointers what i need is from one point of coordinates to another point of coordinates Java script would draw a line which would represent the direction from one coordinate to other .
I'm using a third-party chat application. They require that form field names be formatted "SESSIONVAR!FIELDNAME". The bang is creating headaches when I try to write validation script. How can I handle this format properly? I'm not sure how to escape the exclamation point within my code.
what's the point of using x.constructor.prototype? (highlighted in red) why not directly use x.prototype. classname to check whether 'classname' property is in this class?
I have a script that inserts a Smiley into a textarea for a forum script I'm working on.It works, except that the insertion will only appear at the end of all the existing text.Is there some way to have the smiley insert at the cursor point?
Code: function AddText(form, Action){ var AddTxt="";
I'm trying to utilized a more object-oriented approach to managing window events in javascript. Thus, I am creating a "controller" object to handle events and interact with the server. However, I apparently don't fully understand what "this" refers to. In the code below I was expecting that when the button was clicked (handleDeleteButtonClicked function) that "this" would be pointing at a ViewController object. Instead it was the Button (HtmlInputElement).
I am doing a virtual point of sales page. Once the user has paid, he should be readdressed to the original web page. But this doesn't happen. I have realized the payment bank code is window.opener.location='[URL]'. I have copied their code and changed that by window.open ("[URL]") and it perfectly works. I have replicated the situation in these links... The one that doesn't work [URL] And the one I have modified and works [URL] They insist their code is ok. Obviously I cannot modify their code located in their server.
I am looking for an autofill script to use with with a point of sale system. We would like to hook a credit card reader to our computers and when we swipe the credit card it will autofill the customers information the fields so it does not have to be done by hand on every sale.
Function below will output price value in text field based on drop-menu option. It's working but I want it's always show value in 2 decimal point.[code]...
I've created a page with an image of a man where a user is able to click on an area and a div is positioned at that point containing a white circle. This code works in all browsers except IE 6 where it creates a duplicate white circle beneath the one which is placed in the correct location. How to get rid of this second circle? The circle is essentially a div with a background image assigned.
I understand that there is no need to initialize a variable at the point of declaration. OTH, what is the default type of a [declared] variable? For example:
I wrote a regex to edit a decimal number. you're allowed 1,2, or 3 digits before the decimal point, and 0,1,2,or 3digits after the decimal point. Of course, you can't enter a decimal point without at least a digit after ("5." is invalid). So here is my regex
pattern=/^d{1,3}(.(?=d))d{0,3}$/
This works fine for every case except an integer. In other words, it tests false for entering 5, or 567.
I don't see why it tests false for integers. I'm allowing 1-3 digits before the decimal point, then a decimal point only if the next character is a digit (the lookahead clause), and then 0-3 digits after the decimal point.
I've gotten around this problem with other javascript code around the regex, but I'd just like to know why this "clean" solution doesn't work.
How can jQuery locate a non-predetermined DOM insertion point? My application relies on custom code to "bootstrap" itself. I'm wondering if similar functionality is available in jQuery?
My app works in the following fashion: - user places a script tag in their web page. - my script fires and performs the following routines: - scriptLocation = whereAmI()? (find scripts in document, length -1) - insertBefore(DIV, scriptLocation); - use DIV as canvas, DOM target for all that follows - install application in DIV
Note that my custom app does not wait for any kind of "ready" state. It has no dependencies on the surrounding document. It fires inline. My impression is that jQuery's approach ("Find something, do something") is incompatible, because it relies on a known DOM insertion point. It would seem straightforward to "query" the DOM, and find an element of known ID. That would conflict with my business constraint; I have no control over the destination page. Are my assumptions about jQuery true? Or is there a way for a jQuery script to wake up, find its location, and the install elements there?
on my contact page, I have some hidden divs. One is for a google map. This div is only shown when the user has clicked to open the div. As I am working with smarty my template looks like this: <span id="gmap"> literal}
in FCK-Editor I would like to do the following:On one page there should be severalHeaderText under the header, which is hidden, when the text is loaded and slides up and down after click on headerHtml, which is easy to edit with FCK could look like this:
<p><a href=""><span class="click">Header</span></a></p> <p><span class="text">Text under the header, which is hidden, when the text is loaded.</span></p>