Determine If 3 Values Are A Triangle Or Right Triangle?
Aug 2, 2009
I am attempting to write a javascript to determine if 3 input values can be a triangle? If they can be I need to create an alert. If not I also need an alert. If it is a triangle I also need to determine if it is a right angle triangle and generate an alert. I have no problem with and have solved for the is it or is it not a triangle portion with alerts but when I try to add the formulas for a right triangle and the appropriate alert I am failing.
<html>
<head>
<title>What 3 Sizes Create a Triangle</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="Javascript" type="text/javascript">
[Code].....
View 6 Replies
ADVERTISEMENT
Sep 22, 2011
I need to draw like image 1 in file attach. But after i write code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
[Code]....
View 2 Replies
View Related
Oct 10, 2011
I know very little about javascript, but was wondering if something like this can be done?
Would it be possible (with mootools or jquery) to have homepage that will rotate its home page content forwards and backwards based on either triangle or square? ie, you can rotate through 3, 4, etch home pages?
Sort of like a slider, but it rotates off a center axis of the triangle or square?
View 3 Replies
View Related
May 12, 2010
Well, not really a question but I'm pretty pleased with this JS I wrote I had to create triangles for this project I'm on, but there really isn't much out there in the way of that. Especially for things like mouseover effects.
Give it a go, let me know what you think! The only limitation atm is one side of the triangle MUST be flat, facing NSE or W. It's going to have functionality for specifying any 3 coordinates soon, and dragable capability as well a few more bits.
View 1 Replies
View Related
Sep 28, 2011
Basically what I need to do is take a number of elements, lets say 6 in this case, all of which are div's with an image child e.g.
<div class='triangle-element'>
<img src="../images/face.jpg" />
<div>
View 1 Replies
View Related
Aug 6, 2010
When we use the alert(message) method to pup out a message.
The message window has always a yellow triangle symbol. Inside the triangle there is a punctuation mark "!".
I feel this triangle is ugly. Can I remove it?
View 1 Replies
View Related
Jul 23, 2005
I have a frame's onload event calling a function which needs to know
which file was loaded. Is there any java object/method to determine
the file name or any type of file id?
View 1 Replies
View Related
Mar 30, 2006
I know it's possible to retrieve the IP address of a visitor's computer. However, I need to figure out a way to get the IP address of the server where the files are placed. Here's a description of my issue:
My application, along with some HTML Electronic manuals, are loaded onto a server in an electronic classroom. In order to get to any of these items (manuals or app), the students access the server where an index page is located in the D drive and click a link to get to any of them.
The problem is that these manuals are loaded into the D: drive while my application, because it uses ASP, is saved in the C:inetpubwwwroot folder.
The other issue is that this application will not be placed in just one classroom. Each classroom will have its own server with any number of computers accessing it. Since I don't know how each of the servers will be set up, I need to get the IP address so I can access the wwwroot folder.
What I need to do is figure out, using some non-server-side language, what the IP address or computer name of the server is so that I can access the appropriate folder in the wwwroot folder.
View 2 Replies
View Related
Nov 23, 2009
This should be an easy one. I am using a single OnChange event with several <Select> statements, and need to identify the specific <Select> control that fired off the onchange event. I'm certain there must be a way to grab the ID or Name from the specific control in the javascript function, but I haven't been able to find it.
View 2 Replies
View Related
Feb 11, 2006
is there a code for determining the resolution of the computer?
View 3 Replies
View Related
Oct 14, 2011
My spidey senses are telling me this can't be done without making an additional [XMLHttp] request, but ... Any way to read the redirected URL for an image? Suppose I have the following tag:
HTML Code:
<img src='/images/test.jpg' />
And suppose the image request redirects to /images/test.jpg?token=123.
The image src, according to JavaScript is still /images/test.jpg. Any way to determine the new URL? (short of making an AJAX request for the image and reading the response header?)
View 4 Replies
View Related
Jul 23, 2005
Is there anyway to determine if a DIV with its overflow style set to
auto has the scrollbars visible? I have a dynamically built table inside
my DIV. If the table is over a certain height and the scrollbars appear,
I want to shrink the width of my table. If the table's height doesn't
exceed the div's height, I want the table to be the same width as the
div. Any ideas?
View 2 Replies
View Related
Jul 23, 2005
I have a script that will set the focus to a particular input box. I want the script to check to see if the input box exist also.
I'm receiving the following error:
'document.ScheduleForm.txtGrossPayroll99' is null or not an object.
The txtGrossPayroll99 is a field that does not exist. I've hard-coded
this name into the script to see if it is working correctly.
I'm using the OnLoad event inside the <Body> tag to execute this
function.
var formInUse = false;
function setFocus()
{
if ((!formInUse) && (typeof(document.ScheduleForm.txtGrossPayroll99) !=
"undefined") && (typeof(document.ScheduleForm.txtGrossPayroll99) !=
null) );{
document.ScheduleForm.txtGrossPayroll99.focus();
}}
View 6 Replies
View Related
Sep 9, 2005
Is there a way to determine the object that a property is in? For
example:
function MyClass() { ... }
MyClass.prototype.myFunc = function() { ... }
var obj = new MyClass();
var sameobj = SOMEFUNCTION(obj.myFunc);
So my goal is to get a reference to the object by just having the
property.
View 3 Replies
View Related
Sep 9, 2005
I have a script that I want to run only when my input box IS NOT
disabled. Can someone tell me if something is wrong with my script? Is
"disabled" the correct property to use?
function TextChanged(i){
if (!document.ScheduleForm["txtGrossPayroll" + i].disabled) {
document.ScheduleForm.txtRecordStatus.value = "Changes Made; Record Not
Saved.";
document.ScheduleForm.txtRecordStatus.style.color = "#FF0000";
}}
View 10 Replies
View Related
Jun 30, 2006
I am writing a greasemonkey script and I can capture the click event.
What I want to know is how do I determine that the click was on a URL
and not just a normal click.
document.addEventListener('click', function(event) {
// event.target is the element that was clicked
alert(event.target.toString());
}, true);
View 3 Replies
View Related
Jul 12, 2007
I am trying to pass the slection made by a user to a javscript
function using the onchange event. The problem is I can get the index
but not the actual value. As my list is variable (dependent on a db)
I cannot hard code to a static index. I either need a way to
determine the number of items in a select control or a way to
determine the actual selection made by the user.
Can anyone enlighten me as to the code to determine what option the
user selects?
View 3 Replies
View Related
Oct 3, 2007
I know how to find a controls' position obviously (i.e.style left,
right, top, offset, etc.), but what I'm a little stumped on is, if
given two controls' positions, how can I tell if one is overlapping/
invading the space of the other?
For example, I have an AJAX dragpanel and am experiencing the common
'bleed through' of dropdown controls when I drag the panel over them.
Naturally the customer doesn't like this. I experimented a little with
the IFrame solution, but did not have much luck. It seems easier now
to just use the 'ondragend' event and show/hide dropdowns accordingly.
Does anyone have a piece of code where, given two control objects as
passing parameters, it returns true or false in regards to them
overlapping or not?
View 4 Replies
View Related
Dec 16, 2010
Im using ...
<code>
if ($("#flipid").html("Expand")) {
$( ".eqpdtl" ).hide();
$("#flipid").html("Collapse");
[Code]....
But it's not working ...(why else would I post this ...)
View 10 Replies
View Related
Nov 21, 2010
I have a form with several types of checkboxes, and I'm trying to check all but one of them to determine if any of those have been checked. I do not want to check 'all', but I want to see if any of the 'check_' or 'check2_' checkboxes have been checked. There are a variable number of checkboxes, so this is just an example with two of each. Set 1 and Set 2 will always have the same number of checkboxes as each other, though.
[Code]...
View 2 Replies
View Related
Aug 2, 2011
I have a click event that changes an element from a span that acts like a text link, to a textbox that the user types in:
Event.add(area_el_rename, 'click', function(e)
{
if(!currently_renaming)
[code].....
View 2 Replies
View Related
Nov 5, 2011
THIS IS NOT HOMEWORK this image:http://three-dog.homelinux.com/images/offsets.jpgThe image represents an "entire" web page and the bright part the area currently scrolled into by the web browser.I can get the client's screen SIZE, but I don't know how to figure how many pixels down into a page the browser happens to be.To clarify, the distance shown as a question mark would be "zero" if the browser were scrolled all the way to the top of the page and some positive number as the browser scrolls down.Is there any way for me to get this number (in Javascript).What I need it for is to position a pop-up window centered left-to-right and 1/3-2/3 top to bottom on the screen REGARDLESS of where in the page the browser is scrolled.
View 2 Replies
View Related
Dec 24, 2011
Referring to following link, I would like to determine the link for "In-Depth.xls", based on following coding, I find related information for Excel.png, does anyone have any suggestions on how to determine the URL for Excel file? http://fx.aastocks.com/en/forex/market/dbindepth.aspx?country=66970&indicator=47
<img src="../../images/common/Excel.png" id="cp_imgExcel" class="btn" onclick="window.location.href='dbindepth.aspx?country=66970&startdate=2010/12/24&enddate=2011/12/24&indicator=47&excel=1'"/>
View 2 Replies
View Related
Nov 3, 2007
<div style="display:none;width:250px;margin-left:-250px;position:absolute;background-color:#f1f1f1;" id="container">
<div id="myframe" style="filter: alpha(opacity=0); z-index:10; height: 100%; overflow: hidden; width: 250px;position: absolute;">
<iframe id="'eliframe'" style="z-index:10; width: 250px;" frameborder="0"></iframe>
</div>
<div id="overlay12" style="position: absolute;z-index:18;width:250px;border:1px solid #005cb1;position:absolute;background-color:#f1f1f1;">
-[CONTENT]-
</div>
<script type="text/javascript">
var divh = document.getElementById("container").offsetHeight;
alert(divh);
</script>
</div>
So I need the height of the iframe to reflect the height of the div. The Div height is based on the amount of content that is inserted into it on page load (so I can't set an absolute height). The iframe is to allow the help popup to tile over dropdown menus in IE.
The script above doesn't return the height of the #container element. I need it to figure out the height on page load, and I can't seem to do it for the life of me.
View 3 Replies
View Related
Nov 8, 2010
Using Javascript, how do I determine if there is a DIV with a particular CSS class name on the page? (Not an ID...) I'm writing a function to perform an action if it finds that DIV on the page.
View 2 Replies
View Related
Oct 21, 2011
I was just wondering if there is a way to load a CSS file depending on the browser that you are using. In this case I am looking to load a CSS file for Safari only. maybe another option would be to use CSS hacks (but not webkit).
View 1 Replies
View Related