Variable Doesn't Save Enters In IE?
Oct 1, 2009
I'm having a problem with IE, while it works in FF: the var doesn't save any aka enter.
I have the following code:
<script type="text/javascript">
function addu() {
var message = window.prompt("Enter the text that needs to be underlined below");
if (message != "" && message != "null") {
[Code].....
View 2 Replies
ADVERTISEMENT
Dec 6, 2010
Code: //Define the class
class author{
function author(a:String,b:String,c:int)
{
this.name = a;
this.lastname = b;
this.age = c;
}
[Code]...
in this code the variable "newBook" to save the whole object, returns to save only the last one that was created...
View 1 Replies
View Related
Jan 24, 2010
I need the text in the function to save to a variable. It will run through each of the child text and than attach to data. I'm willing to switch stuff up/rewrite a different way, I just need to know a way of getting this done
$("#navigation").click(function(){
var data;
$("#navigation ul span li").each(function(){
[Code]....
View 3 Replies
View Related
Mar 2, 2010
I used the command toUTCString() with a Date() object and now I would like to extrapolate the hour, to convert the string in number and to save it into a new javascript variable.Esampre:
PHP Code:
<html>
<body>
<script type="text/javascript">[code]....
because 'ora' is not rigth when I use DST in my script.I am writing a code into a file .php then I can use php as well into the script.
View 3 Replies
View Related
Jul 20, 2005
In my site I show low quality pictures. When someone right clicks an
image and selects 'Save Picture As...', I wish to let him save the
high quality picture.
View 5 Replies
View Related
Jul 29, 2011
I'm using a version of the tab system shown here: URL... and I was wondering how I would go about a couple of things...
1) When the tab loads, bring it to the foreground
2) If someone enters a tab title that already exists, then load that tab rather than creating a new one.
View 2 Replies
View Related
Dec 3, 2009
how would i display the numbers the user enters and display the average of their numbers?
<html>
<head>
<title>CSC107, while loops</title>
[code]....
View 1 Replies
View Related
May 22, 2010
I'm trying to set a cookie when a user enters a page. The cookie is for youtube to make videos default to widescreeen.
I know that the cookie name is wide, the value should be set to 1, the domain should be .youtube.com but I dont know how to do it properly. Ive been trying to set it from a link, so when a user clicks the link and it opens in a frame, the cookie is set so that the youtube video opens as widescreen in the frame.
however, whenever I look at my list of cookies, it isnt being created.
is this the best way to do this?
(I found how the cookie is created by checking the values of the cookies when I pressed the 'right turn' arrow on a youtube video)
View 1 Replies
View Related
Jun 29, 2000
When you right click on a link you get the option to save target as...(ie) and save link as...(netscape). Is there some JavaScript to call this function like the JavaScript to open a new window?
View 3 Replies
View Related
Dec 30, 2010
Here is what I have for an ajax call
If you are not familiar w/ CF - the double octothorpe is simply to escape istself
Ok - if incNotes.cfm simply contains some text - the text is output in notesDiv as expected.
If the incNotes file simply says to dump a query - it does so as expected
If I say to dump the url variables - then the url variable ID is blank. It simply does not populate.
Here is the incNotes.cfm file....
Here is an image of the results I get when called via .load
View 2 Replies
View Related
Feb 19, 2010
I have an input form that accepts numbers. I am trying to compare the last field value to the current field value. My problem is that when I use the variable name of the last field in an object path, I get the error "null or not an object". The var 'L' is the problem in the statement below. If I manually type the field name in place of 'L', it works fine. How do I have to write this statement so 'L' works?
Problem statement:
c=window.document.save_info.L.value;
Here is my code: Form element:
Code:
<input style="border:1px solid gray; background-color: #FF9;" onkeyup="moveOnTwo('frm_score1',<?PHP echo $num_holes; ?>,this,'frm_score2')" size="1" maxlength="3" name="frm_adjsc1" id="frm_adjsc1" />
JavaScript Function:
Code:
function moveOnTwo(lastFieldID,holes,field,nextFieldID){
var L = lastFieldID ; var N = nextFieldID;
[code]...
View 3 Replies
View Related
Nov 27, 2011
I'm working on a script that will take the selected div and add an input to it.
If the div id="3" then when I alert it it works right but if the div id="post_3" then I get an alert of "object HTMLdivElement"
The javascript is simple(so far)
function create_reply_input(post_id){
alert(post_id);
}
And here's the php i'm using to populate the page with the posts
<li><a href='javascript:create_reply_input(post_$div_id);'>Reply</a></li>
View 1 Replies
View Related
Sep 22, 2010
I want to automatically calculate the result when user enters values.. but keypress or keyup is not working...
Code:
<label>No 1</label>
<input type="text" name="n1"/><span></span>
<label>No 2</label>
[Code]....
View 1 Replies
View Related
Aug 11, 2010
User enters integer values into an editable gridview. JS is meant to keep a running total in the gridview footer template while user enters the values. User clicks 'Save' button. The values are saved to database table.
Problems:
1. JS does not keep a running total if there is already values saved in a database table. (Explaination: If user clicks 'select all', the previously added values are loaded. Can edit these and running total works. But, if user is entering numbers for the first time into a blank editable gridview, the js does not work).
2. Cannot access label in gridview footer template. 'Object reference not set to an instance of an object'. If label is placed in normal gridview row, it is fine. However, it needs to be in the footer.
javascript function
Meant to be in footer template but placed in normal row for now:
View 4 Replies
View Related
Jun 21, 2010
I have this part of php code...
when I click an unitid, The alert message doesn't work
what's wrong? (i'm newbie to javascript/php/....)
View 5 Replies
View Related
Aug 26, 2009
Code:
$('.openDialog').click(function(event){
var width=$(this).attr('width');
var height=$(this).attr('height');
[code]...
I'm trying to do something like above, where I pass the width and height into the Dialog box but it doesn't take the variable.It only works if I put an actual number here instead of a variable.
$('#dialog').dialog('option', 'width', width);
View 3 Replies
View Related
Dec 6, 2011
[Code]...
Result is undefined. I am setting global variable for javascript but it doesn't work?
View 7 Replies
View Related
Jul 23, 2005
I am trying to put up a page for my students for them to be able to enter
their class number into a field and instantly get a personalized text
message. (ie student number 5 enters "5" and gets a message like
"Congratulations on your homerun in Kickball Bobby!"
View 5 Replies
View Related
Sep 10, 2007
I am working on a online video portal build on flash/actionScript.
If I enter a url of a video when another video is playing, it doesn't playing the new video but it keeps on playing the old video. The reason I think is as it is a RIA, it doesn't refreshes the page and looks for a flash object and its already cached so it doesn't makes any http request in order to play the new video.
So I am planning to claer the cache.
how to clear the cache when a user enters something in address bar and press enter key?
View 1 Replies
View Related
Sep 28, 2011
I need to know when the client enters fullscreen mode and can't figure it out. I've tried to create an alert when self fullscreen equals yes but can't get the alert to work. code...
View 21 Replies
View Related
Nov 19, 2010
The following script sets values for various input elements and I want exactly the same function to run for the on blur event of at least two fields. The first half of the script works fine - however when I take the $('#prod_id2unit_price').blur(function() and script it as a separate function and then call it from
$('#prod_id2unit_price').blur(tvf());
$('#prod_id2qty').blur(tvf());
it all stops working -
</script>
<script language="JavaScript" >
$(document).ready(function(){
unitprice0 = $('#prod_id0unit_price').val();
[Code]....
View 2 Replies
View Related
Feb 16, 2010
I'm using ajax to grab a response from a PHP page, on success, the ajax sets a variable. After the line that calls the ajax function is the line the returns the variable (a global variable). Problem is, because the variable is returned right after the ajax function is fired, it doesn't give the ajax enough time to set the variable. The work around I've thought about would be using the ajax function as a variable, and returning that variable in the initial return line.
Here's some code for reference:
The function that will return the response I'm trying to collect:
The ajax code:
View 2 Replies
View Related
May 31, 2011
I have this code in a function.
[Code]...
Alert 1 is to check if the program enters the function. And it does in all browsers. But when it comes to alert 2, Firefox does not execute the alert. So I assume there is something wrong with firefox executing the onreadystatechange. By the way this is the code for initAjaxObject()
[Code]...
View 7 Replies
View Related
Oct 29, 2010
I have a HTML form containing two text box controls in it and a submit button. When a user enters information in those two textboxes and click on submit, the information is sent to a function in Javascript. In the javascript, the information from those textboxes is stored in a javascript variable. The problem is as follows:When I am inputting string text in the html text boxes and in the javascript when I am trying to print those values, it is giving me out an error saying NaN. However when i input integer values in the text boxes it is printing those numbers. Is there a conversion that I have to do for the string to be printed. I am new to Javascript and need your help. This is a basic code of Javascript. Below is the code that I have.
<html>
<script type = "text/javascript">
function square(form)
[code]....
View 2 Replies
View Related
May 10, 2010
This is a makeshift sort function for a table. I want to replace a div contents with a javascript function call. It works fine if I define the individual case, but the general case doesn't work. The problem lies with the +divHold+ part. It never converges to the passed value on the 2nd iteration. This is my Div:
[Code]...
View 4 Replies
View Related
Dec 10, 2011
I've this script:
When I press again the "a.item_add" link it doesn't work (doesn't fadein the div again). how can I "restart" the script ?
View 2 Replies
View Related