Java Script Onclick
Feb 16, 2006
I have a table on a html page, on some of the <td>'s are onclick evens ... for example ...
onclick="add();"
Later on that page is a div which is hidden when the page loads, I have the following javascript that sets its visibility to visible, showing the DIV, as per below.
function add() {
MMDiv2.style.visibility='visible'
}
What I wish to do now is to send a value on the onclick. I have 1 DIV that gets displayed and hidden and several <TD> onclicks that do it. Is there some way to send a variable from the onclick of a <TD> to the div. For example, in the DIV will be a text form field, is there anyway to populate this with a value from the onclick to tell which <TD> has been clicked?
View 3 Replies
ADVERTISEMENT
Jun 7, 2009
Is it possible to set php "$variable" by java "onclick", for example: <a href='test' onclick='<?php $variable = 10; ?>'>?
View 2 Replies
View Related
Jul 23, 2005
I have a bunch of .js files that I insert into my my html file using
the <script> tag, and this works just fine. The .js files contain
info about the menu, table set up, etc. and take care of the page
format.
But now, I have a tidbit of Javascript in an htm file, and this tidbit
opens up a new window with some information on it. I want to insert
all of the menu and format javascript files on this new window that it
opens. so, my question is: how would I do this: (since this doesn't work!)
output.document.write('<SCRIPT language=JavaScript
src="/scripts/menu_array.js" type=text/javascript></SCRIPT>');
View 5 Replies
View Related
Jul 20, 2005
Anyone know a good site that'll teach you how to make a drop-down navigation
bar? I assume it is javascript
View 1 Replies
View Related
May 26, 2009
I have a drop down field that is dynamically populated using an XML sheet that looks like:
Code:
I populate the dropdown box using javascript that looks like this:
Code:
My the drop down form looks like this:
Code:
When a user clicks on the drop down box, all of the values inside "<title>" tags get displayed. Once the user has made their selection, the form is submitted and posts the user's option. My problem is that when the user clicks on the drop down box, I want them to see the content included in the "<title>" text but I want the form to post the data included in the "<xml>" tags.
For example, if the user clicks on the drop down menu and selects the option 'Animals' I want the form to post 'xml/animals.xml'. Any ideas how to handle this?
View 14 Replies
View Related
Feb 27, 2005
i have found using java script as an exam timer for displaying it to the client is more good than using php..
but i want the page to exit as soon as 40 misn are out...
if java says 40 misn out is there any way for the php to
note that and perform the rquired action?
i am thinking of parallely starting a timer at the server side in php
do u think so? or is htere any way for java script to tlel php the times out
View 1 Replies
View Related
Aug 21, 2005
I have been creating a webpage and I have added some buttons via frontpage and linked them to another page, the thing I cant figure out is how to add commands like a javascript button to enable a smaller window, no toolbars, no scroll bars etc.
is there any way i can make the buttons so when they are pressed a window opens with my dimensions etc?
View 1 Replies
View Related
Sep 4, 2010
I want to make it so that when I click on something, it changes what document.onclick does.
This is a simplified version of what I'm trying to do:
Code:
<div id="clickme" onclick="document.onclick = function(){ alert ('This should not be alerted on the first click'); }">Click here</div>
However, as you'll notice, the alert box shows up on the first click as well. The only way I have been able to get around this behaviour is to have the first onclick execute a timer that will then set the document.onclick after 1ms, however this seems very messy to me.
View 1 Replies
View Related
Jul 23, 2005
Can Java classes/objects be used from within the javascript code on the
HTML page? I.e., can I call a Java method from the javascript function?
View 2 Replies
View Related
Jul 23, 2005
in JSP, it's easy to pass value from java-variable to
javascript-variable, like
js_function(a)
{ a=<%java-class.A%>
}
I'm wondering how is the other way around? I tried
js_function(a)
{ <%java-class.A=%>a
}
but there was compiling error.
View 3 Replies
View Related
Mar 12, 2006
how is it possible to backdoor a java based chat room?
View 2 Replies
View Related
Jun 30, 2006
I basically want to be able to store and retrieve a tree structure in
greasemonkey. Unfortunately the GM_setValue and GM_getValue functions
only take string key value pairs. Is there a native javascript function
that will serialize the object so that it can be stored and retrieved
as strings?
View 18 Replies
View Related
Dec 13, 2006
i am calling a javascript which is returning NaN and is getting printed
on the broweser i want to supress it.
View 2 Replies
View Related
Jul 20, 2005
I'm looking for a javascript, that can detect which java VM is installed and
what the current version is. Can any of you give me some details?
View 1 Replies
View Related
Jul 20, 2005
I'm writing this routine that calls the length() member of
java.io.File. Is this object generally available in most mainstream
browsers, or do some of them lock it down?
View 6 Replies
View Related
Jun 3, 2009
I have the following script in my jsp. I want to cut this script and include it in a .js file But it is not working with me.
Here is the script :
Code:
<script language="javascript">
function checkForUnaddeditems() {
var mainElement = document.forms.mainentry
var quatityValue = mainElement.<%=quantityelement%>.value
var productIDValue = mainElement.<%=productIDelement%>.value
var price = ""; .....
I copied the previous code into a check.js file and referred to it in the jsp by
Code:
<SCRIPT type="text/javascript" SRC="check.js"></SCRIPT>
View 2 Replies
View Related
Nov 20, 2006
I need help with some coding (obviously I am messing something up).
I want my visitors to open up a new page .... tdtest.html.
I have it open up into a new window and at the end of the page I am using this coding to close the window:
<a href="javascript:window.close();">Close Window</A><br>
It is not working at all on either IE or Netscape.
What am I doing wrong, and what is the easiest way to do this?
View 3 Replies
View Related
Jan 10, 2008
I am trying to use the same DHTML combo box script on a web page for our church server. I post the same script on the page deleted the links and add a new link under the different icon and it shows the same links on the previous icon (Fall.gif). I want to use the same code on a different icon with different links. I know how to move the inner menu to position. I just need to make this work on the different icons, i.e. winter, spring, or summer. Code:
View 2 Replies
View Related
Sep 11, 2006
How to get the Value from Drop Down list. Using Java Script? In the Drop down list , i want to get the selected value ? How do i get it using JavaScript ??
View 3 Replies
View Related
Jun 22, 2010
Does anyone know how to use a prompt on java applet?
I was to create a very simple calculator. Two prompts will appear asking for inputs. Then the sum, product, difference, and quotient will appear on java applet.
View 2 Replies
View Related
Jun 5, 2009
I have to develop a program for translating a word in english into pig latin, I have most of it done, it runs but I can't make it define if the first letter see if it's a consonant or not, if it's a consonant take the consonant out and put"ay" at the end and if it's not consonant just put the "ay" at the end of the word, and it has to give an error message if user puts in more than one word, it's done in 2 classes, been stuck on this for hours now have done a lot of research but seems like everyone is doing a more advanced program. Here's my program:
First class
public class piglataintran
{
private String translate;
[code]....
View 1 Replies
View Related
Aug 19, 2010
Why this website works in IE7 and in IE6 on most PC's but on 1 or 2 PC's that have IE7 and IE6 it is not working? [URL]. The issue is that in some IE7's that when the user mouses over the accordion it is not opening. In most IE7's it does. On my client's home PC it is not. On his work PC it is working. I have gone through IE7 settings (tools> internet options> advanced) and made them identical to IE7's that work and it is still not doing what we want it to do.
View 5 Replies
View Related
Jan 4, 2001
When the form is submitted the user gets sent to a page which says "Thankyou for your submission..blah, blah, blah.....". I would like this page to automatically change back to the page they came from prior to filling out the form after 3 seconds, rather than having to click out of it.
I believe this could be done using "javascript:history.go(-2);" (which takes them back the two pages I require), but I haven't got a clue on how to set this to occur after a period of 3 seconds.
View 2 Replies
View Related
Apr 19, 2001
Is DHTML a language? or is it a composition of JavaScript and css? Does Java(not javascript) has something to do in it?
What is actually the best to create client-side dynamic pages?
I know JAVA is used to create applets but I am not sure of wich is the most powerful....
Also, wich are the newer versions of all the above languages?
View 15 Replies
View Related
Jul 3, 2001
I used confirm... It comes up saying ok and cancel. How do I get it to execute one script if you press ok and a different one when you press cancel.
View 4 Replies
View Related
Dec 12, 2001
How can i just get document.write('') to add to the document and not overwrite the whole code?
cheers
<html><head><title></title>
<script>
function table(a)
{
var a;
switch(a)
{
case 1:document.write("1"); break;
case 2:document.write("2"); break;
case 3:document.write("3"); break;
case 4:document.write("4"); break;
case 5:document.write("5"); break;
}
}
</script>
<head><body>
<a href = "javascript:void(0)" onclick="table(1)">First</a></font>
<a href = "javascript:void(0)" onclick="table(2)">Second</a></font>
<a href = "javascript:void(0)" onclick="table(3)">Third</a></font>
<a href = "javascript:void(0)" onclick="table(4)">Fourth</a></font>
<a href = "javascript:void(0)" onclick="table(5)">Fifth</a></font>
</body><html>
View 5 Replies
View Related